Degrees of Freedom Calculator
Pick your statistical test and enter your sample sizes to get the correct degrees of freedom for looking up critical values or p-values.
What degrees of freedom means
Degrees of freedom (df) is the number of independent values that are free to vary when estimating a statistic. It’s a required input for looking up critical values in t-distribution, chi-square, and F-distribution tables, and it directly affects how a p-value is calculated for a given test.
The formulas used
This calculator applies the standard formula for each common test: a one-sample or paired t-test uses df = n – 1; an independent two-sample t-test (equal-variance/pooled) uses df = n1 + n2 – 2; a chi-square test of independence uses df = (rows – 1) × (columns – 1); and a one-way ANOVA uses df-between = k – 1 and df-within = N – k, where k is the number of groups and N is the total sample size.
- Choosing the wrong test type will give you the wrong degrees of freedom, so confirm your test design before reading a result off a statistical table.
- This tool assumes standard, equal-variance assumptions; some variants (like Welch’s t-test) use a different, non-integer df formula.
For general educational and statistical-planning purposes only.