What are degrees of freedom? Definition
Degrees of freedom describe how many independent values can vary in a statistical calculation after constraints are applied. They are a core part of t-tests, chi-square tests, ANOVA, regression, and many other inferential methods.
The exact value depends on the test design. A one-sample t-test uses a different formula from a chi-square table or an ANOVA model, so the calculator starts by asking for the test type.
How to find degrees of freedom - formulas
For a one-sample t-test, degrees of freedom equal N - 1. For a two-sample t-test with equal variances, they equal N1 + N2 - 2.
For a chi-square contingency table, degrees of freedom equal (rows - 1) x (columns - 1). For ANOVA, within-group degrees of freedom equal N - k, between-group degrees of freedom equal k - 1, and total degrees of freedom equal N - 1. Welch's unequal-variance t-test uses the Welch-Satterthwaite approximation and can produce a decimal value.
Example: How to calculate degrees of freedom by hand?
If a one-sample test has 11 observations, the degrees of freedom are 11 - 1 = 10. The single constraint is the sample mean estimated from the data.
If a chi-square table has 3 rows and 4 columns, the degrees of freedom are (3 - 1) x (4 - 1) = 6. The row and column totals constrain how many table cells can vary freely.
Degrees of freedom calculator
Choose the statistical test type, then fill only the fields relevant to that test. The result panel updates with the degrees of freedom and the formula branch used.
Calculated degrees-of-freedom outputs are shown as results, not editable inputs. This avoids the common mistake of typing the final answer manually instead of entering sample sizes, rows, columns, groups, or variance values.
FAQs
Why can Welch degrees of freedom be a decimal? Welch's method estimates degrees of freedom from two sample variances and sample sizes, so the approximation is not always a whole number.
Can degrees of freedom be negative? No. If a formula creates a negative value, the inputs are not valid for that statistical test, such as having more ANOVA groups than observations.