Use this free degrees of freedom calculator for t tests, Welch, chi-square tables and one-way ANOVA. Pick the design, enter the sample sizes, and get the exact df in seconds.

Degrees Freedom Calculator

The right df for six common designs — including fractional Welch df, done by the full Satterthwaite equation.

Six designs Full Welch equation ANOVA both df values Free to use

Enter your values

Fill in the fields below — the result appears with every step shown.

Shown on the printed, PDF and PNG copies of your result. Leave blank to stay anonymous.

Enter a valid value for design / test.

Pick the test or design; only the inputs it needs are used.

Enter a valid value for sample size n (or n1).

Enter a valid value for second sample size n2.

Enter a valid value for sd of sample 1 (welch only).

Enter a valid value for sd of sample 2 (welch only).

Enter a valid value for table rows (chi-square).

Enter a valid value for table columns (chi-square).

Enter a valid value for groups (anova).

Enter a valid value for total observations n (anova).

Local browser calculation

Review your inputs and the tool’s supported scope before using the result.

Calculator loading… If this message stays, this view is not running the calculator's script — open this file in a full browser tab, then press Calculate.

Your result will appear here

Enter your values above, then press Calculate — or press Enter in any field.
TinyExe Degrees Freedom Calculator tinyexe.comFree online calculators

TinyExe · Degrees Freedom Result

Calculated locally in your browser

Calculated on
—

–
—

Name

—

Design / test

—

Sample size n (or n1)

—

Second sample size n2

—

How this was calculated

    What to do next

      TinyExe · tinyexe.com — Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.

      Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      Embed this tool

      Add this Degrees Freedom Calculator to your own page — copy the code below and paste it where you want the tool to appear.

      The embed loads the live calculator in a frame, so it stays up to date automatically. Choose a width, check the code, then copy it. When you publish on WordPress, keep the src pointing at your live tool URL.

      Works in WordPress (Custom HTML block), HTML pages, and most site builders.

      The short answer

      Degrees of freedom depend on the design: a one-sample or paired t test uses n minus 1, a pooled two-sample t test uses n1 plus n2 minus 2, a chi-square table uses (rows minus 1) times (columns minus 1), and one-way ANOVA error uses total N minus the number of groups.

      • One-sample and paired t: df = n-1
      • Pooled two-sample t: df = n1+n2-2; Welch df is fractional
      • Chi-square: (r-1)(c-1); ANOVA error: N-k

      Quick df reference

      Reference values for this calculator.

      DesignFormulaExample
      One-sample tn-1n=25 -> 24
      Pooled two-sample tn1+n2-215+15 -> 28
      Chi-square 2x2(r-1)(c-1)1
      ANOVA errorN-kN=60, k=3 -> 57

      The formula

      The exact formula this calculator uses — every variable in it is explained in the card below.

      The formula

      One-sample/paired t: df = n-1 ; Pooled two-sample t: df = n1+n2-2 ; Welch: df = (s1^2/n1 + s2^2/n2)^2 / [ (s1^2/n1)^2/(n1-1) + (s2^2/n2)^2/(n2-1) ] ; Chi-square table: df = (r-1)(c-1) ; One-way ANOVA error: df = N-k

      One calculator covering the six designs students and analysts actually meet, including the Welch-Satterthwaite equation whose fractional result surprises people. Enhancement: ANOVA mode also reports the between-groups df (k-1) alongside the error df, so both numbers an ANOVA table needs are on screen.

      Worked examples

      Worked examples with the full working shown — try them in the calculator to check.

      Example 1

      One-sample t with 25 students

      one-sample t, n = 25

      CalculationSteps
      Mode: one_sample. Apply df = n - 1. Degrees of freedom = 24.df = 24 — df = n - 1

      Result

      Example 2

      Welch with equal SDs and sizes

      Welch t, n1=n2=10, s1=s2=5

      CalculationSteps
      Mode: welch. Apply Welch-Satterthwaite df. Degrees of freedom = 18. Welch df is not a whole number; use it as-is in tables/software, do not round down silently.df = 18 — Welch-Satterthwaite df Welch df is not a whole number; use it as-is in tables/software, do not round down silently.

      Result

      Example 3

      Chi-square on a 3 by 4 table

      contingency table with 3 rows and 4 columns

      CalculationSteps
      Mode: chi_square_table. Apply df = (rows-1)(cols-1). Degrees of freedom = 6.df = 6 — df = (rows-1)(cols-1)

      Result

      How to use this calculator

      Step 1

      Choose the design: one-sample, paired, pooled two-sample, Welch, chi-square table, or one-way ANOVA.

      Step 2

      Enter the sample sizes (and both SDs for Welch, rows/columns for chi-square, groups and total N for ANOVA).

      Step 3

      Apply the design's formula — the calculator shows which one it used.

      Step 4

      Use the resulting df with your test statistic in a table or p-value tool.

      Step 5

      For ANOVA, note the between-groups df (k-1) shown in the details as well as the error df.

      In short: Degrees of freedom are the number of independent pieces of information available to estimate variability in a statistical test.

      Frequently asked questions

      What are degrees of freedom in plain words?

      They count how many values in a calculation are free to vary once the summary statistics are fixed. Estimating a mean from a sample 'uses up' one degree of freedom, which is why a one-sample t test has n-1.

      Why is the Welch result not a whole number?

      The Welch-Satterthwaite equation balances the two samples' variances and sizes, producing a fractional df. That is correct — software uses the fraction directly when finding p-values.

      Which df does a paired t test use?

      n-1, where n is the number of pairs, not the number of individual measurements. Eighteen pairs give df = 17.

      How do I get df for a chi-square test of independence?

      Multiply (rows-1) by (columns-1) in the contingency table. A 3x4 table has (2)(3) = 6 degrees of freedom.

      What are the two df values in one-way ANOVA?

      Between-groups df = k-1 (k groups) and error (within-groups) df = N-k (N total observations). An F statistic is reported with both: F(df_between, df_error).

      About this calculator

      A degrees of freedom calculator returns the df value a statistical test needs before you can look up a critical value or a p-value. Because each design spends its information differently, this tool asks which design you are running and applies that design's formula.

      Every estimated parameter costs information. A sample mean is computed from the data, so once the mean is fixed only n-1 of the observations can still vary freely. That single idea explains most df formulas: start with the number of observations and subtract the number of independent quantities estimated along the way.

      The Welch case is the honest complication. When two groups have different variances, there is no exact whole-number df, so the Welch-Satterthwaite equation produces a compromise value — often fractional — that makes the t approximation behave correctly. Reporting it as a decimal is right; rounding it down is a quiet error still found in student work.

      Printed tables make df feel like a formality, but it changes answers: the 95% t critical value is 2.776 at df 4 and 2.228 at df 10. Using the wrong row of the table shifts every confidence interval and test decision built on it.

      Use it when reporting t tests, chi-square tests of independence, or one-way ANOVA, when checking software output by hand, or when working from printed critical-value tables that are indexed by df.

      How to calculate it yourself

      Step 1

      Choose the design: one-sample, paired, pooled two-sample, Welch, chi-square table, or one-way ANOVA.

      Step 2

      Enter the sample sizes (and both SDs for Welch, rows/columns for chi-square, groups and total N for ANOVA).

      Step 3

      Apply the design's formula — the calculator shows which one it used.

      Step 4

      Use the resulting df with your test statistic in a table or p-value tool.

      Step 5

      For ANOVA, note the between-groups df (k-1) shown in the details as well as the error df.

      Real-life examples

      Paired reading scores

      A teacher tests 18 pupils before and after a reading programme. Paired data uses df = n-1 where n is the number of pairs, so she runs paired mode with n = 18.

      Mode: paired. Apply df = n - 1. Degrees of freedom = 17.

      df = 17 — df = n - 1

      ANOVA on three fertilisers

      A grower trials 3 fertilisers on 60 plots in total. The one-way ANOVA error degrees of freedom are N-k, and the calculator also gives the between-groups df of 2.

      Mode: anova_oneway. Apply error df = N - k. Degrees of freedom = 57. Between-groups df = k - 1 = 2.

      df = 57 — error df = N - k Between-groups df = k - 1 = 2.

      Ideas & use cases

      • Table check: verify the df10 at 95% critical value 2.228 and df4 value 2.776 against your df results when revising for an exam.
      • Welch versus pooled: run both modes on the same sample sizes to see how much df the unequal-variance correction costs.
      • Design planning: for a planned ANOVA, try different group counts at a fixed total N to see the error df you will have left for detecting effects.

      Limitations & sources

      • Covers one-sample, paired, pooled and Welch t designs, chi-square contingency tables and one-way ANOVA error/between df. It does not cover regression residual df beyond the same N-k logic, repeated-measures corrections, or mixed models.

      Sources: Welch-Satterthwaite equation: Welch (1947); NIST/SEMATECH e-Handbook of Statistical Methods, degrees of freedom sections

      Degrees Freedom Calculator · TinyExe calculator suite Free to use · No sign-up · Instant results