Intermediate

Degrees of Freedom Calculator

Degrees of freedom (df) determine the shape of the t-distribution, F-distribution or chi-square distribution used in a hypothesis test. Select your test type and enter your sample sizes to calculate df instantly.

Statistical test

Number of observations in your sample
Degrees of freedom
29

df = n − 1

n
30
05.410.916.321.827.232.638.143.5df = 29Degrees of freedom on a scale — more df means a closer approximation to the normal distribution
Step by step
  1. 1

    Sample size

    n = 30 = 30
  2. 2

    Degrees of freedom

    n − 1 = 30 − 1 = 29
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Degrees of freedom tell a test how many independent pieces of information the data contribute. One-sample t: n−1. Pooled two-sample t: n₁+n₂−2. Welch's t: Satterthwaite formula (depends on both n and s). ANOVA: k−1 between, N−k within. Chi-square: (r−1)(c−1). More df = distribution closer to normal = smaller critical values.

Formula
One-sample t: df = n − 1 • Two-sample t: df = n₁ + n₂ − 2 • Welch: Satterthwaite • ANOVA: df_B = k − 1, df_W = N − k • χ²: (r−1)(c−1)
How this is calculated

Degrees of freedom represent the number of independent values in a statistic that are free to vary once constraints (like knowing the mean) are imposed. A sample of n observations has n − 1 degrees of freedom when estimating variance, because the mean consumes one degree of freedom. This is why the one-sample t-test uses df = n − 1 and the pooled two-sample t-test uses df = n₁ + n₂ − 2 (both means are estimated).

When two samples have different variances, the Welch–Satterthwaite approximation computes df from the sample sizes and standard deviations: df = (s₁²/n₁ + s₂²/n₂)² / [(s₁²/n₁)²/(n₁−1) + (s₂²/n₂)²/(n₂−1)]. This gives a non-integer value that is usually rounded down; the result is always less than or equal to the pooled df and provides a more conservative (and often more accurate) test when variances differ.

For a one-way ANOVA: the between-groups df = k − 1 (k groups each consume one parameter, the group mean, minus one for the grand mean), and within-groups df = N − k (N total observations minus one per group). For a chi-square test of independence the df = (rows − 1)(columns − 1), reflecting the number of cell frequencies that are free once row and column totals are fixed. Degrees of freedom govern which row of a critical-value table you look up.

Frequently asked questions

With a small sample the sample variance is a noisy estimate of the population variance, so the t-distribution must have heavier tails to capture that uncertainty. As df increases (larger sample), the variance estimate improves and the t-distribution converges to the standard normal (z) distribution. At df = ∞ they are identical.

The Satterthwaite approximation involves a ratio of sums of variances, which generally yields a fractional result. In practice you round down to a whole number when consulting a printed t-table, but statistical software uses the exact fractional value with a continuous t-distribution.

Very small df (e.g. df = 1 or 2) means the t-distribution has extremely heavy tails, so you need a much larger test statistic to reach statistical significance. This reflects high uncertainty from a tiny sample. As a rule of thumb, df < 5 requires caution and large critical values.

Also known as

df t-test calculator
Welch t-test degrees of freedom
ANOVA degrees of freedom calculator
chi-square degrees of freedom
Satterthwaite approximation calculator
statistical test df formula

APA

TG we-Calculate Editorial Team. (2026). Degrees of Freedom Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/degrees-of-freedom-calculator

Chicago

TG we-Calculate Editorial Team. "Degrees of Freedom Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/degrees-of-freedom-calculator.

IEEE

TG we-Calculate Editorial Team, "Degrees of Freedom Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/degrees-of-freedom-calculator

BibTeX

@misc{wecalculate_degrees_of_freedom_calculator, title = {Degrees of Freedom Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/degrees-of-freedom-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?