Work out degrees of freedom (df) for the statistical test you are running. Choose a one-sample t-test, an independent two-sample t-test (pooled or Welch), a paired t-test, a chi-square test, or a one-way ANOVA, then enter your sample sizes.
Degrees of freedom determine which row of the t-distribution, chi-square distribution, or F-distribution table to use when finding a critical value or p-value.
Degrees of freedom (df) is the number of values in a calculation that are free to vary once certain constraints (such as a fixed sample mean) have been applied. In practice, df tells you which specific t-distribution, chi-square distribution, or F-distribution to use when working out a critical value or p-value for a hypothesis test. As df increases, these distributions approach the normal (t) or become more symmetric (chi-square), so the exact df matters most for small samples.
| Test | Degrees of Freedom Formula |
|---|---|
| One-sample t-test | df = n minus 1 |
| Paired t-test | df = n minus 1 (n = number of pairs) |
| Two-sample t-test, pooled (equal variances) | df = n1 + n2 minus 2 |
| Two-sample t-test, Welch (unequal variances) | Welch-Satterthwaite equation (see below), rounded down |
| Chi-square goodness of fit | df = k minus 1 (k = number of categories) |
| Chi-square test of independence | df = (rows minus 1) x (columns minus 1) |
| One-way ANOVA (between groups) | df = k minus 1 (k = number of groups) |
| One-way ANOVA (within groups / error) | df = N minus k (N = total sample size) |
When the two samples in an independent t-test have unequal variances, the standard n1 + n2 minus 2 formula overstates the precision of the test. Welch's t-test instead uses the Welch-Satterthwaite equation:
df = (s1²/n1 + s2²/n2)² / [ (s1²/n1)²/(n1 minus 1) + (s2²/n2)²/(n2 minus 1) ]
This produces a non-integer result that most software and textbooks round down to the nearest whole number. Welch's df will always be less than or equal to the pooled df (n1 + n2 minus 2), and is generally preferred whenever sample sizes or variances differ noticeably, since it does not assume equal population variances.
Every t-distribution, chi-square distribution, and F-distribution is actually a family of curves, one for each value of df. Looking up the wrong df row in a statistical table (or entering the wrong df into software) gives you the wrong critical value, and therefore the wrong conclusion about statistical significance. For small samples the difference between, say, df = 9 and df = 10 can shift a p-value across the 0.05 threshold, so it pays to calculate df carefully rather than estimate it.
Sources: Standard formulas for the t-distribution, chi-square distribution and one-way ANOVA as presented in introductory statistics texts (e.g. Moore, McCabe and Craig, "Introduction to the Practice of Statistics"). Welch-Satterthwaite equation per Welch (1947), "The generalization of Student's problem when several different population variances are involved," Biometrika.
This calculator provides the standard degrees of freedom formula for each test type. It does not perform the full hypothesis test itself. Confirm which test design (pooled vs Welch, one-way vs factorial ANOVA) matches your study before using the result.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-07-02 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.