Skip to main content

Degrees of Freedom Calculator

Select a scenario and provide relevant counts to obtain the appropriate degrees of freedom.

Degrees of freedom: 11

Instructions

  1. Select the test scenario that matches your analysis.
  2. Enter the sample sizes or table dimensions required.
  3. Review the resulting degrees of freedom, including between/within values for ANOVA.
  4. Use the reported df when looking up critical values or computing p-values.

Formula

One-sample t-test: df = n − 1

Two-sample t-test (equal variance): df = n₁ + n₂ − 2

Chi-square test: df = (r − 1)(c − 1)

One-way ANOVA: dfbetween = k − 1, dfwithin = N − k

About This Tool

Degrees of freedom quantify the number of independent pieces of information available for estimating parameters. They are essential for choosing the correct reference distribution in hypothesis tests and confidence intervals.

Different tests have unique df formulas based on constraints and sample sizes. This calculator covers common scenarios encountered in introductory and applied statistics.

Common Questions

Why do two-sample t-tests subtract two?

Estimating separate means consumes two degrees of freedom, leaving n₁ + n₂ − 2 for variability estimation.

Can df be zero?

Yes, with minimal sample sizes. Tests with df ≤ 0 are undefined, so gather more data.

How do unequal variances affect df?

Welch's t-test uses a different df formula. This tool assumes equal variances for the two-sample t-test.

Why do ANOVA reports show two df values?

ANOVA partitions variance into between-group and within-group components, each with its own df used in the F-statistic.