About the F-Test Calculator
This F-test calculator checks whether two populations have equal variances. Paste two samples, or enter each group’s standard deviation and sample size, and it returns the F statistic (the ratio of the two sample variances), the numerator and denominator degrees of freedom, the p-value for a two-tailed or one-tailed test, the critical F values at your significance level, and a confidence interval for the ratio of variances.
The F-test for equality of variances is used to compare the consistency of two machines, methods, suppliers or investment returns, and as a quick check before choosing between the pooled and Welch t-tests. It matches Excel’s F.TEST and the classic textbook test taught in introductory statistics and quality-control courses.
The test assumes both samples are independent and drawn from normally distributed populations, and it is quite sensitive to non-normality: skewed or heavy-tailed data can produce a small p-value even when variances are equal. For non-normal data, Levene’s or the Brown–Forsythe test is more robust.
With the default inputs, the f statistic (s₁² ÷ s₂²) is 8.5556. Change any value above to recalculate instantly.
How to use the f-test calculator
- 1Paste both samples, or switch to summary input and enter each SD and sample size.
- 2Choose a two-tailed test (variances differ) or a one-tailed test (one is larger).
- 3Pick the significance level.
- 4Read F and the p-value; reject equal variances if p is below α.
- 5Check the confidence interval for the variance ratio to judge how different they are.
Formula and method
Under the null hypothesis that both populations have the same variance and are normal, the ratio of the sample variances follows an F distribution with n₁ − 1 numerator and n₂ − 1 denominator degrees of freedom. Values near 1 support equal variances; values far above or below 1 are evidence against it. Sample variances use the n − 1 denominator.
The p-value comes from the F cumulative distribution, computed here with the regularized incomplete beta function: P(F ≤ f) = I_x(df₁/2, df₂/2) with x = df₁f ÷ (df₁f + df₂). For a two-tailed test the smaller tail is doubled (as in Excel’s F.TEST). The confidence interval for σ₁²/σ₂² is [F ÷ F₁₋α/₂, F ÷ F_α/₂].
- s₁², s₂²
- Sample variances of groups 1 and 2
- n₁, n₂
- Sample sizes
- F
- Test statistic (ratio of variances)
- α
- Significance level
Worked examples
Comparing the consistency of two machines
Machine 1’s output has variance 9.167 and machine 2’s has 1.071, so F = 8.556 with (9, 7) degrees of freedom. That exceeds the upper critical value 4.823 and gives a two-tailed p-value of 0.0099, so the variances differ significantly at the 5% level.
From standard deviations, two-tailed
With s₁ = 4.2 (n = 21) and s₂ = 2.8 (n = 16), F = 17.64 ÷ 7.84 = 2.25 on (20, 15) df. The two-tailed p-value is 0.114, so there is not enough evidence to say the variances differ at α = 0.05.
Same data, right-tailed test
Testing whether group 1 is more variable, the p-value is the upper tail alone, 0.057. F = 2.25 falls just short of the one-tailed critical value 2.328, so H₀ is again not rejected at 5% — although it would be at 10%.
Frequently asked questions
What does an F-test tell you?+
The F-test for two variances tells you whether two populations differ in variability. A large F (or one far below 1) with a small p-value means the spread of one group is significantly different from the other; a p-value above α means the data are consistent with equal variances.
How do you calculate the F statistic?+
Square each sample standard deviation to get the variances and divide: F = s₁² ÷ s₂². Many textbooks put the larger variance on top so that F ≥ 1 and only the upper critical value is needed; the two-tailed p-value is the same either way.
What are the degrees of freedom for an F-test?+
The numerator degrees of freedom are n₁ − 1 and the denominator degrees of freedom are n₂ − 1, where n₁ is the size of the sample whose variance is on top of the ratio. Swapping the samples swaps the degrees of freedom and inverts F.
Is the F-test the same as ANOVA?+
Both use the F distribution, but they test different things. This F-test compares two variances directly. One-way ANOVA uses an F ratio of between-group to within-group variance to test whether several group means are equal.
What are the assumptions of the F-test for variances?+
The two samples must be independent random samples from normally distributed populations. The test is very sensitive to non-normality — even mild skewness or outliers can make it reject too often — so for non-normal data use Levene’s or the Brown–Forsythe test instead.