Home » Statistics & Probability Calculators » F-Test for Two Variances Calculator

F-Test for Two Variances Calculator

Home › Statistics & Probability Calculators › F-Test for Two Variances Calculator

F-Test for Two Variances Calculator

The F-test for two variances compares the spread of two independent samples by taking the ratio of their sample variances, F = s₁²/s₂², which follows an F distribution with n₁ − 1 and n₂ − 1 degrees of freedom when both populations are normal with equal variance. It is often run before a pooled t-test, or on its own to compare consistency, for example whether two machines fill bottles with the same variability.

Enter raw data or the standard deviation and size of each sample. The calculator gives the variances, the F ratio, the p-value (two-tailed p uses twice the smaller tail), the critical values, a confidence interval for the ratio σ₁²/σ₂² and the decision. Unlike some tables, it does not require you to put the larger variance on top: the tails are handled directly.

This test is sensitive to departures from normality, so for skewed data Levene’s or the Brown–Forsythe test is more reliable. If the goal is a t-test, the Welch t-test avoids the equal-variance question entirely.

Separate values with commas, spaces or new lines. Leave blank to use the summary boxes.

Separate values with commas, spaces or new lines. Leave blank to use the summary boxes.

Result and step-by-step solution

F(7, 6) = 18.9658
p = 0.0022
Reject H₀ at α = 0.05. The result is statistically significant: there is enough evidence at the 5% level to conclude that the two population variances differ.
  1. State the hypotheses
    H₀: σ₁²/σ₂² = 1   H₁: σ₁²/σ₂² ≠ 1 (two-tailed test)
  2. Sample variances
    Sample 1 (n = 8): x̄₁ = Σx ÷ n = 159.2 ÷ 8 = 19.9; s = √[Σ(x − x̄₁)² ÷ (n − 1)] = √(36.92 ÷ 7) = 2.2966. s₁² = 5.2743
    Sample 2 (n = 7): x̄₂ = Σx ÷ n = 137.1 ÷ 7 = 19.5857; s = √[Σ(x − x̄₂)² ÷ (n − 1)] = √(1.6686 ÷ 6) = 0.5273. s₂² = 0.2781
  3. Test statistic
    F = s₁² ÷ s₂² = 5.2743 ÷ 0.2781 = 18.9658 with df₁ = 7, df₂ = 6
  4. p-value
    2 × min[P(F ≤ 18.9658), P(F ≥ 18.9658)] = 0.0022
  5. Decision
    p = 0.0022 < α = 0.05. Reject when F < 0.1954 or F > 5.6955.
95% CI for σ₁²/σ₂²3.33 to 97.078

The F-test is sensitive to non-normal data. For skewed samples, Levene’s test is more robust.

Frequently asked questions

Do I put the larger variance in the numerator?
Not here. Tables require it so you can use only the upper tail, but the calculator computes both tails, so enter the samples in whichever order matches your hypothesis.
How is the two-tailed p-value calculated?
Twice the smaller of P(F ≤ observed) and P(F ≥ observed), which is the convention used by most software.
What are the degrees of freedom?
n₁ − 1 for the numerator (sample 1) and n₂ − 1 for the denominator (sample 2).
Why is the F-test not recommended before a t-test?
It is unreliable for non-normal data and has low power with small samples, so it can fail to detect unequal variances exactly when they matter. Using Welch’s t-test by default is the usual advice.

Last reviewed: September 25, 2026. Calculations run in your browser and were validated against SciPy.

Scroll to Top