F-Test Calculator

F-Test Calculator

Compare two variances with the F-test — the classic variance-ratio test. Enter a variance or a standard deviation for each group, with its sample size, and get the F statistic, p-values, critical values and the confidence interval for the variance ratio.

Group 1

Variance or SD, whichever you choose below

Group 2

Variance or SD, whichever you choose below
Two-tailed (the usual choice): H₀ is σ₁² = σ₂².
Normality matters. The F-test assumes both samples come from normal distributions, and it is sensitive to non-normality. If your data are skewed or heavy-tailed, Levene's test is the safer choice.
F STATISTIC · DF 15, 20
2.5000

Two-tailed p-value
Upper-tailed p
Lower-tailed p
Variance ratio (σ₁²/σ₂²)
95% CI, variance ratio
90% CI, variance ratio

Calculation

    F-distribution — rejection region

    The F-test compares two variances — usually to check whether two groups are equally variable before running a t-test. It is the classic variance-ratio test, but it is sensitive to non-normality, so this calculator also tells you when Levene's test is the safer choice. Enter two variances (or SDs) and sample sizes.

    How to use the F-test calculator

    1. Enter group 1. Type its variance or its standard deviation, choose which one you entered, and give the sample size.
    2. Enter group 2. Do the same for the second group. The two groups do not need equal sample sizes.
    3. Choose the significance level. The usual choice is 0.05. The calculator tests two-tailed by default, which is what you want unless you stated a direction in advance.
    4. Read the headline answer. The F statistic sits at the top, with the two-tailed p-value, the one-tailed p-values, the variance ratio and its 95% and 90% confidence intervals. The calculation ledger shows every step, and the chart shades the rejection region.

    Try it now: click Load Example 1 for the two production lines (s₁² = 25, n₁ = 16; s₂² = 10, n₂ = 21): F = 2.50, two-tailed p = 0.0572, 95% CI [0.9716, 6.8898] — not significant at the 5% level. Click Load Example 2 for the two teaching methods (s₁ = 6.2, n₁ = 11; s₂ = 4.1, n₂ = 13): F = 2.2867, two-tailed p = 0.1764, 95% CI [0.6778, 8.2801].

    When should you use an F-test?

    • Comparing two variances. You have two independent samples and want to know whether their spreads differ — for example, whether a new process is more consistent than the old one.
    • Before a two-sample t-test. The classic pooled-variance t-test assumes equal variances. Run the F-test first: if the variances differ significantly, use Welch's t-test instead, which does not pool.
    • Checking an assumption. ANOVA also assumes equal variances across groups. The F-test is the two-group version of that homogeneity check.
    • Quality control. Two machines, two operators or two suppliers produce the same product — the F-test tells you whether one is more variable than the other.
    • When your data are approximately normal. The F-test assumes normality. Check it with the Shapiro-Wilk test; if normality is doubtful, Levene's test is the safer choice.

    F-test vs Levene's test: which one do you need?

    F-testLevene's test
    What it testsWhether two variances are equal, using their ratioWhether variances are equal across two or more groups, using deviations from the group centre
    AssumptionBoth samples from normal distributionsOnly that the data are continuous — no normality needed
    Sensitive to non-normality?Yes — this is its main weaknessNo — it is far more robust
    Use it whenYour data are normal and you want the most powerful two-variance testYour data are skewed, heavy-tailed or have outliers
    Number of groupsTwoTwo or more
    Rule of thumb: if your data are normal, the F-test is the most powerful way to compare two variances. If normality is doubtful — skewed data, heavy tails or outliers — use Levene's test instead. When in doubt, check normality first or go straight to Levene's test.

    How the F-test works

    The F-test compares two sample variances by taking their ratio. The null hypothesis is that the two population variances are equal, H₀: σ₁² = σ₂². If the ratio is far from 1, the data are inconsistent with equal variances.

    The F statistic. F = s₁² / s₂², where s₁² and s₂² are the two sample variances. Under the null hypothesis, F follows an F-distribution with df₁ = n₁ − 1 and df₂ = n₂ − 1 degrees of freedom. If you entered standard deviations instead of variances, the calculator squares them first (s² = s × s). You can explore the distribution itself with the F-distribution calculator.

    The p-values. The upper-tailed p-value is P(F(df₁, df₂) > F) and the lower-tailed p-value is P(F(df₁, df₂) < F). The two-tailed p-value is 2 × min(upper, lower) — the smaller tail is doubled, so it does not matter which group you called group 1: swapping the groups leaves the two-tailed p-value unchanged.

    Critical values and the decision. At significance level α, reject H₀ when F is below the lower critical value F(α/2, df₁, df₂) or above the upper critical value F(1 − α/2, df₁, df₂). The chart shades both tails of the rejection region so you can see where your F falls.

    The variance-ratio confidence interval. A 95% confidence interval for σ₁²/σ₂² is [F / F*(0.975, df₁, df₂), F × F*(0.975, df₂, df₁)], where F* is the 97.5th percentile of the F-distribution. The interval and the p-value must agree: the 95% interval contains 1 exactly when the two-tailed test at α = 0.05 is not significant. If the interval excludes 1, the variances differ significantly. A single variance has its own interval — see the confidence interval for a variance calculator.

    Worked Example 1 — Two production lines

    Two production lines fill the same product. Line 1 has a sample variance of s₁² = 25 from n₁ = 16 fills; line 2 has s₂² = 10 from n₂ = 21 fills. Is one line more variable than the other?

    F = 25 / 10 = 2.50, with df₁ = 15 and df₂ = 20. The upper-tailed p-value is 0.0286 and the lower-tailed p-value is 0.9714, so the two-tailed p-value is 2 × 0.0286 = 0.0572. The 95% confidence interval for the variance ratio is [0.9716, 6.8898], and the 90% interval is [1.1347, 5.8188]. The critical values at α = 0.05 are 0.3629 and 2.5731.

    Interpretation: the result is not significant at α = .05 (p = 0.0572). The 95% confidence interval just includes 1 (its lower bound is 0.9716), so the evidence for unequal variances is borderline — the lines may well be equally variable, and a larger sample would be needed to settle it.

    Worked Example 2 — Two teaching methods

    Two teaching methods are compared on a test. Method 1 gives s₁ = 6.2 from n₁ = 11 students; method 2 gives s₂ = 4.1 from n₂ = 13 students. Do the methods differ in variability?

    First square the standard deviations: s₁² = 6.2² = 38.44 and s₂² = 4.1² = 16.81. Then F = 38.44 / 16.81 = 2.2867, with df₁ = 10 and df₂ = 12. The upper-tailed p-value is 0.0882 and the lower-tailed p-value is 0.9118, so the two-tailed p-value is 2 × 0.0882 = 0.1764. The 95% confidence interval for the variance ratio is [0.6778, 8.2801]. The critical values at α = 0.05 are 0.2762 and 3.3736.

    Interpretation: there is no significant difference in variances (p = 0.1764). The confidence interval is wide — from 0.68 to 8.28 — which reflects the small samples: with only 11 and 13 students, the data cannot pin the variance ratio down precisely.

    How to read the results together

    • F near 1 means the two sample variances are similar. F far from 1 in either direction (well above 1, or close to 0) points to unequal variances.
    • The two-tailed p-value is the headline test: below α, reject equal variances; above α, do not.
    • The one-tailed p-values tell you which direction the difference points. The upper-tailed p is small when group 1 is more variable; the lower-tailed p is small when group 2 is more variable.
    • The confidence interval shows the plausible range for the variance ratio. If it contains 1, the variances could be equal; if it excludes 1, they differ. A wide interval means the estimate is imprecise, usually because the samples are small.
    • Check the agreement. The 95% interval and the two-tailed test at α = 0.05 always agree — if they ever seem not to, one of them was computed with different inputs.

    Assumptions

    • Independent random samples. The two groups must be independent of each other, and the observations within each group must be independent.
    • Normality. Both samples must come from normal distributions. This is the F-test's weak point: it is sensitive to non-normality, far more so than the t-test. Check normality with the Shapiro-Wilk test; if it fails, use Levene's test instead.
    • Continuous scale. The measurements should be on a continuous scale, so that a variance is meaningful.
    • Variances, not means. The F-test compares spreads. If you want to compare the group means, use the two-sample t-test — and if the F-test says the variances differ, use its Welch's (unequal variances) version.
    • No pairing. The two samples are independent. For paired measurements on the same subjects, the F-test does not apply.

    How to report an F-test (APA)

    Report the F statistic with its degrees of freedom, the p-value and the confidence interval for the variance ratio. Give the p-value to three decimal places (or as p < .001 when it is smaller), and the interval to two decimal places.

    Copyable sentence (Example 1):

    An F-test showed no significant difference between the variances of the two production lines, F(15, 20) = 2.50, p = .057, 95% CI for the variance ratio [0.97, 6.89].

    Copyable sentence (Example 2):

    An F-test showed no significant difference between the variances of the two teaching methods, F(10, 12) = 2.29, p = .176, 95% CI for the variance ratio [0.68, 8.28].

    If the test is significant, name the direction. For example: the variance of group 1 was significantly larger than that of group 2, F(15, 20) = 4.10, p = .004, 95% CI for the variance ratio [1.59, 11.30]. Always report the interval alongside the p-value — it shows how large the difference could plausibly be, not just whether it cleared the significance threshold.

    Cite this tool

    Shafiq, A. (2026). F-Test Calculator. Empirical Rule Calculators. https://empiricalrulecalculators.com/f-test-calculator/

    Frequently asked questions

    F-test or Levene's test — which should I use?

    Use the F-test when both samples are approximately normal — it is the most powerful test for two variances. Use Levene's test when normality is doubtful: it works with deviations from the group centre, so skewed data, heavy tails and outliers do not distort it the way they distort the F-test. If you are unsure, check normality with the Shapiro-Wilk test first, or go straight to Levene's test.

    What is the variance ratio CI telling me?

    The confidence interval for σ₁²/σ₂² is the range of variance ratios compatible with your data. A 95% interval of [0.97, 6.89] means the true ratio could plausibly be anywhere in that range. If the interval contains 1, the variances could be equal — and the two-tailed test will be non-significant. If it excludes 1, the data are inconsistent with equal variances. A wide interval means the estimate is imprecise, usually because the samples are small.

    One-tailed or two-tailed F-test?

    Two-tailed is the default and the usual choice: it tests whether the variances differ in either direction. A one-tailed test checks a specific direction — for example, that group 1 is more variable than group 2 — and has more power in that direction but none in the other. Choose the direction before seeing the data; switching after seeing the result is not legitimate. This calculator reports both one-tailed p-values and the two-tailed p-value, so you can see all three.

    Why is the F-test sensitive to non-normality?

    The F statistic is a ratio of two variance estimates, and how much a sample variance bounces around depends on the kurtosis (tailedness) of the population, not just its variance. Under normality the F-distribution describes that bouncing exactly. With heavy-tailed or skewed data the sample variances vary more than the F-distribution expects, so the test rejects the null hypothesis too often — sometimes far too often. That is why a normality check comes first, and why Levene's test is the safer choice for non-normal data.

    What if my variances are significantly different?

    Do not pool them. For comparing means, use Welch's t-test (the unequal-variances version of the two-sample t-test), which does not assume equal variances. For ANOVA, use Welch's ANOVA or transform the data. And report the difference itself, with its confidence interval — a significant F-test is a finding about your data, not just a failed assumption check.

    Source: all examples on this page were checked against SciPy 1.11.4 (scipy.stats.f). The two-tailed p-value is computed as 2 × min(upper, lower), where the upper p-value is P(F(df₁, df₂) > F) and the lower p-value is P(F(df₁, df₂) < F).

    See all 106 free statistics tools on Empirical Rule Calculators.

    Next steps

    🎲● LiveProbability

    F-Distribution Calculator

    Look up F probabilities and critical values for any degrees of freedom.

    Try Calculator →

    🎲● LiveHypothesis Test

    Two-Sample T-Test Calculator

    Compare two means with Welch’s or the pooled-variance t-test.

    Try Calculator →

    📊● LiveConfidence Interval

    Confidence Interval for a Variance Calculator

    Build a chi-square confidence interval for a single variance.

    Try Calculator →