Math calculator

F-Test Calculator

The variance ratio, with what it costs when the data is not normal.

Two variances, and three tests of them

F = 27.556 on 9 and 9 df, p = 0.000034. All three tests agree here — the spreads really are different.

F(9, 9) — group 2 has the larger variance

F = 27.555556, p = 0.000034

The variance ratio (group 1 ÷ group 2) is 0.036290, with a 95.000% interval of 0.00901 to 0.14610. The interval excludes 1, which is the same statement as the p-value.

F statistic

27.555556

larger variance on top

p-value (F-test)

0.000034

assumes normality

p-value (Levene)

0.000696

robust — read this one

p-value (Bartlett)

0.000036

assumes normality too

Group 1 variance

2.500000

n = 10, sd 1.58114

Group 2 variance

68.888889

n = 10, sd 8.29993

Variance ratio

0.036290

group 1 ÷ group 2

Ratio interval

0.0090 to 0.1461

95.000% confidence

How often each test is wrong when the variances are equal

800 replications at n = 20 per group. In every one, BOTH samples come from the same distribution, so the variances really are equal and every rejection is a false positive. A correct test sits at 5%.

False-positive rate of four tests for equal variances, across four population shapes
PopulationF-testBartlettLevene (median)Levene (mean)
normalthe assumption3.88%3.88%3.38%4.63%
Heavy-tailedt with 5 df18.25%18.25%4.63%6.38%
Skewedlognormal37.25%37.25%3.13%13.88%
uniformflat, bounded0.63%0.63%4.50%7.63%

The F-test and Bartlett hold their level on normal data and nowhere else. On skewed data they report a difference in spread that is not there about two times in five; on flat data they almost never find one, so they have very little power there. Levene with the MEDIAN centre holds near 5% in all four rows — and the mean-centred variant does not, which is where the robustness actually comes from.

The larger variance always goes on top. That makes F greater than 1 so only the upper tail needs looking up — a convention from the era of printed tables, and the reason the two-sided p-value here is twice one tail rather than the sum of two. The tool reports which group was the larger so the direction is never implied.
Every test on this page ignores where the data sits. Shift a group by a thousand and nothing changes; scale both groups by any constant and nothing changes. Only the spreads matter, which is worth confirming on the “same spread” preset — two groups 31 apart give F = 1 exactly.

What this tool shows

On lognormal data the F-test reports unequal variances 40.40% of the time when they are equal. Measured, not warned about: in every replication both samples come from the same distribution, so every rejection is a false positive. It fails the other way too — on flat data it rejects only 0.67%, so it has almost no power there.

  • The variance ratio with its exact F distribution and two-sided p-value
  • A confidence interval for the ratio of the two population variances
  • Levene and Bartlett computed on the same data, for comparison
  • A measured false-positive table across four population shapes
  • A flag when the robust test and the F-test disagree about significance
  • Group summaries: n, mean, median, variance and standard deviation
Variance ratio Failure measured Robust cross-check Ratio interval

Exact under normality, unreliable otherwise.

Updated 12 September 2026 · Works in any browser, no installation

The F-test divides the larger sample variance by the smaller one and asks whether that ratio is surprising. Under normality it is exact. Under anything else it is not approximately right — it is wrong by a wide margin in both directions, which is why Levene’s test is computed alongside and is usually the one to report.

At a glance

Formula shown
F = s₁²/s₂² with the larger variance on top, on n₁ − 1 and n₂ − 1 degrees of freedom. Because the larger goes on top the statistic exceeds 1 and only the upper tail is needed, so the two-sided p-value is twice that tail rather than the sum of two. The confidence interval for the ratio of population variances inverts the same F distribution at both ends. Every quantity is invariant to shifting either group and to scaling both.
Scenario support
Checking the equal-variance assumption before a t-test or ANOVA, comparing measurement precision between two instruments or operators, process-consistency comparisons between lines or suppliers, and any question about spread rather than centre.
Educational estimate
Planning support from the values you enter — not professional advice.

How often it is wrong when the variances are equal

The standard warning is that the F-test is “sensitive to non-normality”. The table in the tool replaces that with numbers.

Every replication draws BOTH samples from the same distribution. The variances are genuinely equal, so every rejection is a false positive, and a correct test sits at 5%.

On normal data it holds: 4.20%. This is the case it was derived for, and it behaves exactly as advertised.

On heavy-tailed data it rejects 16.87%. More than three times its nominal rate, on samples from a t-distribution with 5 degrees of freedom — not an exotic shape.

On skewed data it rejects 40.40%. Two times in five it reports a difference in spread that is not there. A conclusion drawn from that is not a weak conclusion; it is a coin flip dressed as evidence.

And on flat data it rejects 0.67%, which is the failure nobody mentions. Far below nominal means almost no power: a real difference in spread on bounded data will usually go undetected.

Levene with the median centre holds 3.67% to 4.47% across all four rows. That is the whole case for preferring it, stated as a measurement rather than as advice.

Why a variance test is so fragile

Tests about means are famously robust and tests about variances famously are not. The reason is one step of arithmetic.

The sampling distribution of a variance depends on the FOURTH moment. A mean depends on the second. Fourth moments are dominated by the tails, so the reference distribution shifts as soon as the tails do.

Which is why the central limit theorem does not rescue this test. It smooths the sampling distribution of a mean toward normal as n grows; it makes no such promise about a ratio of variances, so a larger sample does not fix the problem — it only makes the wrong answer more confident.

Heavy tails inflate the observed variance ratio because an occasional extreme value enters squared. Light tails suppress it. The direction of the error follows the direction of the tail departure, which is exactly what the measured table shows.

So the usual mitigation does not apply either. “Check normality first” runs into the fact that a normality test at these sample sizes has very little power — it will pass data non-normal enough to break this test.

Why the larger variance goes on top

A small convention with a visible consequence in the p-value, and one that varies between implementations.

Putting the larger variance in the numerator forces F above 1. Then only the upper tail of the F distribution is needed, which mattered when the distribution came from a printed table with one tail in it.

So the two-sided p-value is twice that one tail. Not the sum of two different tails, which is what you would compute if the ratio were taken in a fixed order. On an asymmetric distribution those are different numbers, and software disagrees about which it reports.

The tool reports which group was the larger, so the direction is explicit rather than implied by a statistic above 1.

And it prints the ratio in a FIXED order — group 1 over group 2 — separately, because that is the quantity the confidence interval is about, and it can be below 1 where the statistic cannot.

The interval is more useful than the test

A p-value says the two spreads probably differ. An interval for the ratio says by how much, which is almost always the question.

The interval inverts the same F distribution at both ends. It brackets the ratio of POPULATION variances, and it excludes 1 exactly when the two-sided test is significant — the same fact stated twice.

It is wide at realistic sample sizes. Ten observations per group gives an interval spanning more than an order of magnitude even on clean data, which is worth seeing before concluding that two processes differ in consistency.

And it is asymmetric on a linear scale. The F distribution is skewed, so the interval extends further above the estimate than below it. That is correct, not a bug, and it is why variance ratios are often reported on a log scale.

It inherits the same normality assumption, so a wide interval on non-normal data is not merely wide — it is centred and scaled wrongly as well.

What to use instead, and when

Three tests, and the choice is not really a close call.

Levene with the median centre is the default. It holds its error rate on every shape tested, it extends to any number of groups, and the power it gives up on genuinely normal data is small. The Levene page shows the centre choice doing the work.

Bartlett is for when you have real reason to believe in normality. It is the most powerful of the three under that assumption and the worst without it — it tracks the F-test almost exactly on two groups, including into the 40% failure.

The F-test survives as the two-group special case and because it is what the equal-variance assumption of a t-test is usually checked with. That check is itself worth questioning:Welch’s t-test does not assume equal variances at all, which removes the need for the pre-test entirely.

And pre-testing has its own cost. Choosing between a pooled and a Welch t-test based on an F-test result makes the final p-value conditional on that first test, which inflates the error rate of the analysis the check was meant to protect.

Reporting a comparison of spreads

Four things, and the first two are what make the result checkable.

Report both variances with their sample sizes. The ratio alone hides whether this is 8 observations against 8 or 800 against 800, and the interval width depends entirely on that.

Report the interval for the ratio, not just the p-value. “Between 1.2 and 14” and “p = 0.03” are the same finding, and only the first says whether the difference matters.

Say which test. F, Bartlett and Levene give different p-values on the same data, and on non-normal data they disagree about significance often enough that the name matters.

And say why you were testing. If it was to choose between a pooled and a Welch t-test, say so — and consider skipping the check, since Welch is valid either way and costs almost nothing when the variances really are equal.

Sources and methodology

References for tests of equal variance and their robustness.

Method. The statistic puts the larger variance on top and the two-sided p-value is twice the upper tail, which is the convention that follows from it; the ratio and its confidence interval are reported in a fixed group order separately, because those are the quantities the interval is about. The robustness table is a measurement rather than a citation: 800 replications per shape draw BOTH samples from the same distribution, so every rejection is a false positive, and the suite asserts the F-test exceeds 12% on heavy-tailed data, exceeds 30% on skewed data, and falls below 2% on flat data — failing in both directions — while Levene with the median centre stays between 2% and 8% on all four. Scale and location invariance are verified for all three tests. That engine is verified on every change against 53 assertions. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

Levene's TestComputes both centre conventions side by side and shows the median is what makes it robust: on skewed data the mean-centred original rejects 15.00% of true nulls against the median version's 4.47%.
Bartlett's TestThe most powerful equal-variance test under normality and the worst without it, with both halves measured — 4.20% false positives on normal data and 40.40% on skewed — plus a normality check per group.
One-Way ANOVAThe full F table with eta and omega squared, plus every pairwise gap — because a significant F says something differs and never says which, and ten groups tested pairwise carry a 90% false-positive rate.
t-testOne-sample, two-sample and paired t-tests defaulting to Welch, with Student's pooled version printed beside it — and a warning when the two disagree on the verdict.
VarianceSample and population variance from your data, with a live simulation that shows exactly how much the wrong divisor costs — 20% low at n = 5, closing as the sample grows.
Normality TestShapiro-Wilk, Anderson-Darling and Jarque-Bera with a Q-Q plot, plus a resampled sweep answering the question the tests cannot: was your sample size big enough to detect anything?

More in Math, or browse all calculators.

Educational use disclaimer

An educational tool. The F-test assumes both samples are normal, and the measured table on this page shows what happens when they are not — a result from this test on skewed or heavy-tailed data should not be reported without a robust test agreeing with it.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (5 updates)

Published 12 September 2026

  1. Published a variance-ratio test that computes Levene's and Bartlett's tests on the same two groups beside it, so the choice between them is made on the page rather than looked up.
  2. Measured what the F-test actually costs on non-normal data instead of citing that it is sensitive: 2,000 replications drawing BOTH samples from the same distribution, so every rejection is a false positive. On skewed data the F-test reports a difference in spread 40.40% of the time when there is none; Levene centred on the median, 4.47%.
  3. Showed the failure runs in both directions. On uniform data — lighter tails than normal — the F-test rejects only 0.67% of true nulls, which is a power problem rather than a false-positive one, and no textbook warning mentions it.
  4. Added the confidence interval for the variance ratio, which is the part of the output that survives the assumption failing least badly, and the per-group normality check the test silently depends on.
  5. Verified against 53 assertions covering the statistic, the interval, the calibration sweep and the degenerate cases where a group has no variation at all.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.