Degrees of Freedom Calculator

Compute degrees of freedom for common tests, see the formula with your numbers plugged in, and get the one-tailed critical value at α.

Full tests: t-test, chi-square, ANOVA.

What degrees of freedom mean

df counts how many pieces of information are free to vary after fitting the model or estimating parameters. For a sample variance with mean fixed, only n − 1 deviations can vary independently — the last is pinned by Σ(xᵢ − x̄) = 0.

Why Welch df is fractional

Welch treats the variance ratio as uncertain; the Satterthwaite formula blends the two group variances into a non-integer df between min(n₁−1, n₂−1) and n₁+n₂−2.

df_W = (Sx₁²/n₁ + Sx₂²/n₂)² / [(Sx₁²/n₁)²/(n₁−1) + (Sx₂²/n₂)²/(n₂−1)]

Pooled t: df = n₁ + n₂ − 2

χ² independence: df = (r − 1)(c − 1)

Quick reference

Testdf
One-sample / paired tn − 1
Two-sample pooled tn₁ + n₂ − 2
Two-sample WelchSatterthwaite (non-integer)
χ² goodness of fitk − 1 − (# estimated parameters)
χ² independence(r − 1)(c − 1)
One-way ANOVAk − 1 and N − k
Simple regression tn − 2

Frequently Asked Questions

Why subtract 1 for a t test?

One degree is spent estimating the sample mean before estimating spread, leaving n − 1 for the variance.

Can df be a decimal?

Yes for Welch’s t; textbook t tables use the nearest lower integer, but software uses the exact value.

What df goes with chi-square?

Categories minus 1 minus any parameters you estimated from the same data (goodness of fit) or (r−1)(c−1) for tables.

How do I get F critical values?

For one-way ANOVA the between-groups F uses df₁ = k−1 and df₂ = N−k; this page reports F at your α for that pair.

Regression says n − p − 1 — why?

You estimate p slopes plus an intercept, consuming p+1 degrees, leaving n − p − 1 error df.

Is correlation df also n − 2?

For testing H₀: ρ = 0 with one sample of pairs (x,y), the t test uses df = n − 2.

Two-way ANOVA error df?

N − ab when you have one observation per cell; each cell mean costs one degree.

Does this replace the full calculator?

No — it explains df and critical values; run the linked t, χ², or ANOVA tool for test statistics and p-values.

Embed This Calculator

Add this free calculator to your course page or LMS.

Adjust the height value to fit your page.