Degrees of Freedom Calculator
Calculate degrees of freedom for common statistical tests.
About Degrees of Freedom Calculator
Each parameter estimated from the data consumes one degree of freedom. That is why a sample variance divides by n − 1 rather than n: the mean has already been estimated from the same data. Using the wrong degrees of freedom shifts every critical value and p-value, and the error is largest in small samples where it matters most.
Formula
Degrees of Freedom
One sample: n − 1; two sample: n₁ + n₂ − 2; contingency: (r − 1)(c − 1)
- degrees of freedom
- Independent pieces of information available after estimating parameters
Worked example
With the default values below, Degrees of Freedom Calculator returns One-Sample Degrees of Freedom of 29. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Sample size 1minimum 1
- 30
- Sample size 2minimum 0
- 25
- Parameters estimatedaccepts 0–20
- 1
- Rows in a contingency tableaccepts 1–30
- 3
- Columns in a contingency tableaccepts 1–30
- 4
Results
- One-Sample Degrees of Freedom
- 29
- Two-Sample Pooled Degrees of Freedom
- 53
- Regression Residual Degrees of Freedom
- 28
- Contingency Table Degrees of Freedom
- 6
- Paired-Sample Degrees of Freedom
- 24
Step by step
- 1Values used
- 2Degrees of Freedom
- 3One-Sample Degrees of Freedom= 29
- 4Two-Sample Pooled Degrees of Freedom= 53
- 5Regression Residual Degrees of Freedom= 28
- 6Contingency Table Degrees of Freedom= 6
- 7Paired-Sample Degrees of Freedom= 24
Assumptions and limits
- The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How is Degrees of Freedom calculated?
One sample: n − 1; two sample: n₁ + n₂ − 2; contingency: (r − 1)(c − 1) Each parameter estimated from the data consumes one degree of freedom. That is why a sample variance divides by n − 1 rather than n: the mean has already been estimated from the same data.
Why does Degrees of Freedom matter?
Using the wrong degrees of freedom shifts every critical value and p-value, and the error is largest in small samples where it matters most.
What values do I need to enter?
This calculator takes 5 inputs: Sample size 1, Sample size 2, Parameters estimated, Rows in a contingency table, Columns in a contingency table. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Related Calculators
- Weighted Mean Calculator
- Trimmed Mean Calculator
- Winsorized Mean Calculator
- Coefficient of Variation Calculator
- Standard Error of Mean Calculator
- Standard Error of Proportion Calculator
- A/B Test Duration Calculator
- A/B Test Sample Size Calculator
- A/B Test Significance Calculator
- Absolute Risk Reduction Calculator
You might also need
- Trimmed Mean CalculatorCommonly used together
- Weighted Mean CalculatorCommonly used together
- Winsorized Mean CalculatorCommonly used together
- A/B Test Duration CalculatorAlso in Data & Analytics
- A/B Test Sample Size CalculatorAlso in Data & Analytics
- A/B Test Significance CalculatorAlso in Data & Analytics
