Formula guide
| Method | Degrees of freedom formula | Main inputs |
|---|---|---|
| One-sample or paired t-test | df = n − 1 | Sample size |
| Pooled independent t-test | df = n₁ + n₂ − 2 | Two sample sizes |
| Welch’s t-test | Welch–Satterthwaite approximation | Sizes and variances |
| Chi-square independence | df = (r − 1)(c − 1) | Rows and columns |
| One-way ANOVA | k − 1 and N − k | Groups and observations |
| Multiple regression | df residual = n − p − 1 | Observations and predictors |
| Correlation | df = n − 2 | Paired observations |
How to use this calculator
- Select the statistical test or model.
- Enter the requested sample or design values.
- Choose precision and rounding preferences.
- Submit the form to view every result.
- Copy, print, or export the completed calculation.
Worked examples
| Statistical method | Example inputs | Degrees of freedom |
|---|---|---|
| One-sample t-test | n = 20 | 19 |
| Paired t-test | 15 pairs | 14 |
| Pooled t-test | n₁ = 12, n₂ = 14 | 24 |
| Correlation | n = 30 | 28 |
| Chi-square independence | 3 rows, 4 columns | 6 |
| One-way ANOVA | 5 groups, 40 observations | 4 and 35 |
| Multiple regression | 50 observations, 4 predictors | 45 residual |
Frequently asked questions
What are degrees of freedom?
Degrees of freedom count independent values available for estimation. Model constraints reduce that available information. Larger samples usually produce more degrees of freedom.
Why do formulas differ between tests?
Each test estimates different quantities from the same data. Estimated values consume independent information. Therefore, every design needs its own formula.
Can degrees of freedom be decimal?
Yes, Welch’s t-test often returns a decimal approximation. Unequal sample variances create weighted information. Software usually keeps the decimal value.
Should Welch’s result be rounded down?
Modern software can use the unrounded Welch value. Printed tables may require integer rows. Rounding down gives a conservative critical value.
What are numerator and denominator degrees?
F tests use two separate degrees of freedom. The numerator describes the tested effect. The denominator describes unexplained or residual variation.
Why does regression subtract predictors?
Every fitted coefficient uses one independent data dimension. An intercept usually uses another dimension. Remaining dimensions form the residual degrees of freedom.
How does sample size affect the result?
Larger samples usually increase degrees of freedom. More information improves estimate stability. Critical distributions then approach their large-sample forms.
What if the result is zero or negative?
The model has too many parameters or constraints. Additional observations are normally required. Simplifying the model may also restore valid freedom.
Does this calculator compute p-values?
This page calculates degrees of freedom only. It prepares values used by test distributions. A test statistic is still needed for p-values.