Calculate degrees of freedom for common statistical tests.
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.
Degrees of Freedom
One sample: n − 1; two sample: n₁ + n₂ − 2; contingency: (r − 1)(c − 1)
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.
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.
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.