Short answer: df stands for degrees of freedom: the number of values that are free to vary once you have estimated something from the data. For a one-sample t-test, df = n − 1.
Last updated: November 2026.
The intuition
Pick 3 numbers that must average 10. You can choose the first two freely, say 6 and 11. The third is then forced to be 13. Only 2 of the 3 were free, so df = 3 − 1 = 2. Each parameter you estimate uses up one degree of freedom.
df for common tests
| Test | Degrees of freedom |
|---|---|
| Sample standard deviation / one-sample t-test | n − 1 |
| Paired t-test | number of pairs − 1 |
| Two-sample t-test (equal variances) | n₁ + n₂ − 2 |
| Chi-square test of independence | (rows − 1) × (columns − 1) |
| Chi-square goodness of fit | categories − 1 |
| Linear regression (residuals) | n − k − 1 (k = predictors) |
| One-way ANOVA | between: groups − 1; within: N − groups |
Why df matters
df sets the shape of the t and chi-square distributions, so it decides the critical value you compare your result to. With few degrees of freedom, the t-distribution has fatter tails, so you need a stronger result to reach significance. As df grows, t approaches the normal distribution.
Frequently asked questions
Why is it n − 1 and not n?
Because the sample mean was estimated from the same data, one value is no longer free. See sample standard deviation.
Can df be a decimal?
Yes. Welch’s t-test (unequal variances) uses an approximation that usually gives a non-whole number.






