Skip to main content

Enter values

Pick the test/model you’re using — we’ll show only the inputs needed for that df formula.

Options:

Chips prefill common statistical test setups and run the calculation.

Result:

No results yet. Enter values and click Calculate.

How to use this calculator

  • Choose a scenario (t, χ², ANOVA, F, regression).
  • Enter the required inputs (sample sizes, groups, table size, etc.).
  • Click Calculate to get df (and df₁/df₂ when applicable).

How this calculator works

  • t-tests: df track how many independent values remain after estimating a mean (or pooled variance).
  • Welch’s t: df are computed via a stable approximation and can be non-integer.
  • χ² tests: df depend on table dimensions (independence) or categories and estimated parameters (GOF).
  • ANOVA / F: report df for numerator (model) and denominator (error).
  • Regression: df split into model (predictors) and error (leftover variation).

Formula & Equation Used

One-sample/paired t: df = n − 1

Two-sample t (pooled): df = n₁ + n₂ − 2

χ² independence: df = (r − 1)(c − 1)

χ² goodness-of-fit: df = k − 1 − m

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

Variance ratio (F): df₁ = n₁ − 1, df₂ = n₂ − 1

Regression (p predictors): dferror = n − p − 1

Example Problems & Step-by-Step Solutions

Example 1 — One-sample t-test

n = 20

  1. Use df = n − 1.
  2. df = 20 − 1 = 19.

Example 2 — χ² independence test

r = 3, c = 4

  1. Use df = (r − 1)(c − 1).
  2. df = (3 − 1)(4 − 1) = 2 · 3 = 6.

Example 3 — One-way ANOVA

k = 4 groups, N = 28

  1. Between-groups df = k − 1 = 4 − 1 = 3.
  2. Within-groups df = N − k = 28 − 4 = 24.

Frequently Asked Questions

Q: Can df be non-integer?

Yes — Welch’s t-test often produces non-integer df (software uses this routinely).

Q: Why does df decrease when I estimate parameters?

Because each estimated parameter adds a constraint — fewer values can vary freely.

Q: For χ² goodness-of-fit, what is m?

m is how many parameters you estimate from the data (e.g., estimating a mean/variance changes df).

Q: Why are there two df values for F?

F compares two variances (or model vs. error), so it uses numerator df₁ and denominator df₂.

Q: What if my class uses a different df convention?

Use your instructor’s convention — this calculator is meant for common intro statistics formulas.

Probability Distribution Calculator
Calculate probabilities for normal, binomial, Poisson, t, chi-square, F, and other common distributions
Critical Value Calculator
Find critical values for Z, t, χ², or F distributions using α and tail type
Allele Frequency Calculator
Calculate allele frequencies (p, q) with Hardy–Weinberg checks and visuals
Confidence Interval Calculator
Calculate confidence intervals for means, proportions, or raw data inputs
P-Value Calculator
Compute p-values from Z, t, χ², or F test statistics with one- or two-tailed options
Binomial Distribution Calculator
Calculate binomial probabilities, expected values, cumulative probabilities, and exact success outcomes
Statistics & Data Analysis Lab
Upload datasets, analyze statistics visually, run hypothesis tests, and interpret results with interactive charts
Hardy–Weinberg Calculator
Compute allele and genotype frequencies with χ² comparison
Normal Distribution Calculator
Calculate normal distribution probabilities, z-scores, percentiles, and shaded bell-curve areas
Poisson Distribution Calculator
Calculate Poisson probabilities, expected event counts, cumulative probabilities, and rare event outcomes
Standard Deviation Calculator
Calculate standard deviation, variance, and mean from data
Standard Error Calculator
Calculate standard error for mean, proportion, or raw data inputs
Correlation Coefficient Calculator
Calculate Pearson’s r, Spearman’s rank correlation, r², regression line, significance, and relationship strength
All Calculators & ConvertersAll calculators