A bright university study desk with hand-drawn statistical graphs, a laptop and notebooks
Degrees of freedom sound abstract, but the working rules are mercifully short — most students only ever need four of them.

To find degrees of freedom, count how many values in your calculation are free to vary once every constraint has been applied. The shortcuts that cover the vast majority of exam questions are: a one-sample t-test gives n − 1; two independent samples give n₁ + n₂ − 2; a chi-square test of association gives (rows − 1) × (columns − 1); and a sample variance uses n − 1. If you only memorise those four, you will handle nearly every question that A-level, undergraduate or professional courses throw at you.

The idea in plain English

Imagine I tell you that three numbers add up to 10, and I let you pick the first two freely. You choose 3 and 5 — and now the third number is forced: it must be 2. Two of the numbers were free; the last one was not. That is degrees of freedom in a nutshell: two degrees of freedom, because one constraint (the total) ate one of your three free choices.

Every statistical formula carries constraints like that total. Each constraint you impose — estimating a mean, fixing a row total in a table — costs you one degree of freedom. The number left over tells your test how much independent information it is really working with, which in turn decides the exact shape of the distribution you compare your result against.

The formulas you will actually use

Rather than deriving anything, most students just need the right recipe for the test in front of them:

  • Sample variance / one-sample t-test: df = n − 1, where n is the sample size. Estimating the mean from the data costs one degree of freedom.
  • Two independent samples t-test: df = n₁ + n₂ − 2. You estimate two means, so you lose two.
  • Paired t-test: df = n − 1, where n is the number of pairs. Analyse the differences as a single sample.
  • Chi-square test of association: df = (rows − 1) × (columns − 1) for a contingency table.
  • Chi-square goodness of fit: df = categories − 1 (minus one more for each parameter you estimated from the data).
  • Correlation (Pearson’s r) significance test: df = n − 2.
  • One-way ANOVA: two values — between-groups df = number of groups − 1, and within-groups df = total observations − number of groups.

Worked examples, exam style

Example 1. A psychology student measures reaction times for 15 volunteers before and after drinking coffee. She runs a paired t-test. Degrees of freedom = 15 − 1 = 14. She would look up her t-value in the t-table under the df = 14 row.

Example 2. A biology class tests whether seed germination depends on light condition, recording results in a table with 2 rows (germinated / not germinated) and 3 columns (full light / partial shade / darkness). Degrees of freedom = (2 − 1) × (3 − 1) = 2.

Example 3. Comparing exam scores between two seminar groups of 22 and 26 students with an independent t-test: df = 22 + 26 − 2 = 46.

Notice the pattern in each case: start with the total number of independent observations, then subtract one for every quantity the data itself had to estimate. The BBC Bitesize statistics pages walk through similar worked examples if you want extra practice in a UK curriculum style.

Why examiners care so much

Degrees of freedom are not bookkeeping for its own sake — they change your answer. The t-distribution used in small-sample tests is actually a family of curves, one per degree of freedom. With few degrees of freedom the curve has fat tails, meaning you need a bigger test statistic to claim significance; as df grows, the curve snuggles up to the normal distribution.

That is why t-tables and chi-square tables are organised by df: the critical value for a result at the 5% level with df = 4 is noticeably larger than with df = 40. Plug in the wrong df and you will read off the wrong threshold — and potentially the wrong conclusion. Mark schemes penalise exactly this slip, so it is worth double-checking before you reach for the tables.

Common mistakes to avoid

The classic error is using n instead of n − 1 for a single sample — easy to do under time pressure, and it shifts every critical value you look up. The second is mixing up paired and independent designs: paired data uses the number of pairs, not the total number of measurements. The third is forgetting that ANOVA reports two degrees of freedom, not one — write them as a pair, e.g. F(2, 27).

Finally, remember that degrees of freedom can never be negative. If your formula gives you zero or less, you have miscounted your constraints — step back and recount what the data had to estimate.

What to study next

Degrees of freedom usually appear alongside hypothesis testing, so make sure you are comfortable with null hypotheses, p-values and choosing between parametric and non-parametric tests. If you are weighing up degree choices more broadly, our guides on how to get into law school and how long a masters degree takes — where statistics often reappears in research methods modules — may help you plan ahead.

Frequently asked questions

  1. Q: What are degrees of freedom in simple terms?
    A: The number of values in a statistical calculation that are free to vary after accounting for constraints. Each quantity estimated from the data (like a mean) uses up one degree of freedom.
  2. Q: Why is it n − 1 and not n for sample variance?
    A: Because the sample mean is calculated from the same data, one value is no longer free — it is fixed by the mean and the other n − 1 values. Dividing by n − 1 (Bessel’s correction) also makes the variance an unbiased estimate.
  3. Q: Can degrees of freedom be a decimal?
    A: Yes, with Welch’s t-test for unequal variances the formula can produce a fractional df. Most tables round down to be conservative; software handles the exact value.
  4. Q: Do I need degrees of freedom for a z-test?
    A: No. The z-test uses the standard normal distribution, which has no degrees-of-freedom parameter — one reason z-tests only suit large samples or known population variances.