Degrees of Freedom Calculator
Compute df for the specific test you're running — one-sample, pooled and Welch's t-tests, paired t-test, chi-square goodness-of-fit and independence, one-way ANOVA and simple linear regression.
Formula: df = n − 1
Degrees of freedom explained, step by step
Every parameter you estimate from data costs one degree of freedom. Each card below covers one place df shows up in the tests this calculator supports.
1. Degrees of freedom — what stays free after constraints
Degrees of freedom is the count of values that are still free to vary after every constraint your calculation imposes is fixed. Every parameter you estimate from the data burns one degree. That's why the sample standard deviation divides by n − 1: once the mean is fixed, only n − 1 residuals are free.
2. df by test — the standard formulas
Most tests have a plug-in formula: one-sample t uses n − 1, pooled two-sample t uses n₁ + n₂ − 2, paired t uses n_pairs − 1, chi-square goodness of fit uses k − 1, chi-square independence uses (r − 1)(c − 1), one-way ANOVA reports (k − 1, N − k), and simple linear regression residuals use n − 2.
3. Welch–Satterthwaite — the non-integer df
Welch's two-sample t-test uses a moment-matched df that depends on both sample sizes and both variances. It's usually non-integer and never exceeds the pooled df. Round down (never up) if you must consult a printed table.
4. Why it matters — a family of curves
The t, χ² and F distributions are indexed by df — small df means heavier tails and larger critical values. Plugging the wrong df into the same statistic can push a p-value from 0.03 to 0.10 with no other change. Feed the df from this calculator directly into the matching test tool.
Features of this calculator
- Eight test types on one page — no more guessing which df formula applies.
- Live shape of the reference t-distribution rendered from the computed df.
- Show / hide step-by-step working, including the full Welch-Satterthwaite expansion.
- Handles the two most-confused cases explicitly: pooled vs Welch's t-test and chi-square GoF vs independence.