Math calculator

Bartlett's Test Calculator

The most powerful test of equal variances, and the assumption it needs.

Most powerful, given normality

Roughly symmetric groups with genuinely different spreads — the case Bartlett is built for, and where it is the most powerful choice.

3 groups, 30 observations, 2 degrees of freedom

Bartlett's K² = 42.801615, p = 5.078638e-10

Levene's robust test on the same data gives p = 0.000007. They agree, which is the condition under which Bartlett can be trusted.

Bartlett's K²

42.801615

chi-square, df 2

p-value

5.078638e-10

assumes normality

Levene p (robust)

0.000007

the cross-check

Pooled variance

23.977778

the null's single estimate

Each group with its variance, its ratio to the pooled variance, and a normality check
GroupnVarianceSDvs pooledShapiro-Wilk p
Group 1102.500001.581140.1043×0.84860
Group 21068.888898.299932.8730×0.79945
Group 3100.544440.737860.0227×0.03586

The last column is a normality check on each group, because Bartlett’s validity depends on it entirely. A p below 0.05 there is a reason to read Levene instead of this test — though at these sample sizes a normality test has little power, so passing it is weak reassurance.

At least one group fails a normality test, which is the condition Bartlett cannot survive. On lognormal data this test rejects 40.40% of TRUE nulls — it reports a difference in spread that is not there, two times in five. The Levene p-value of 0.000007 is the one to report.

What Bartlett does when the variances are actually equal

800 replications at n = 20 per group, both samples from the same distribution each time. 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
PopulationBartlettF-testLevene (median)Levene (mean)
normal3.88%3.88%3.38%4.63%
Heavy-tailed18.25%18.25%4.63%6.38%
skewed37.25%37.25%3.13%13.88%
uniform0.63%0.63%4.50%7.63%

Bartlett holds its level on the first row and fails in both directions afterwards — far too often on skewed and heavy-tailed data, and almost never on flat data, where it has very little power. That is not a flaw in the implementation; it is what building a statistic out of logs of variances costs.

The statistic compares each group’s variance to the pooled one, on a log scale. When every group variance equals the pooled variance the logs cancel and K² is exactly zero. The further any group sits from the pool, the larger it grows — and because the comparison is logarithmic, one extreme group moves it further than several mild ones.
Use it when you have good reason to believe the groups are normal. Under that assumption it is the most powerful of the three — it will detect a real difference in spread that Levene misses. Without it, Levene with the median centre is the honest default, and the cost is a little power on data that really was normal.

What this tool shows

Bartlett holds its level on normal data at 4.20% and rejects 40.40% of TRUE nulls on skewed data. Both halves are measured on this page, because the trade is the whole story: under normality it is the most powerful of the three tests, and without it, it reports a difference in spread that is not there two times in five. The tool runs a normality check on every group.

  • Bartlett's K² across any number of groups, with its chi-square p-value
  • A Shapiro-Wilk normality check on every group, since validity depends on it
  • Levene's robust test on the same data as a cross-check
  • Each group’s variance as a ratio to the pooled variance
  • A measured false-positive table across four population shapes
  • A warning when any group fails its normality check
Any number of groups Most powerful Normality checked Robust cross-check

Valid only if the groups really are normal.

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

Bartlett’s test compares each group’s variance to the pooled variance on a log scale, and asks whether the total discrepancy is more than chance. When every group variance equals the pooled one the logs cancel and the statistic is exactly zero. It is the most powerful of the three tests under normality — and Levene’s test is the one to use without it.

At a glance

Formula shown
K² = [(N − k)·ln(s²ₚ) − Σ(nᵢ − 1)·ln(s²ᵢ)] / C, where s²ₚ is the pooled variance and C = 1 + [Σ1/(nᵢ−1) − 1/(N−k)] / (3(k−1)) is the small-sample correction. It is compared against a chi-square on k − 1 degrees of freedom. Because the comparison is logarithmic, one group far from the pool moves the statistic further than several mildly different ones.
Scenario support
Checking the equal-variance assumption before ANOVA when the groups are known to be normal, comparing precision across instruments in a calibrated process, and any variance comparison where normality is established rather than hoped for.
Educational estimate
Planning support from the values you enter — not professional advice.

Most powerful, and the least trustworthy

The two halves of Bartlett’s reputation are both true, and the measured table separates them.

On normal data it holds its level at 4.20% and detects real differences in spread that Levene misses. That extra power is genuine and it is why the test survives.

On heavy-tailed data it rejects 16.87% of true nulls. More than three times the nominal rate, on samples from a t-distribution with 5 degrees of freedom.

On skewed data it rejects 40.40%. A difference in spread reported two times in five when there is none.

And on flat data it rejects 0.67%, far below nominal — so it also has almost no power there. It is not conservative-and-safe; it is wrong in whichever direction the tails depart.

It tracks the F-test almost exactly on two groups, verified across 500 random comparisons in the suite: the two agree about significance in over 95% of them. They share the same assumption and therefore the same failure.

Why logs of variances make it fragile

The statistic’s construction explains both its power and its brittleness.

It compares ln(pooled variance) against a weighted sum of ln(group variances). Taking logs makes the comparison scale-free and gives the statistic its clean chi-square reference — under normality.

A sample variance from a heavy-tailed group is itself highly variable, because it depends on a fourth moment. Its log inherits that variability, and the chi-square reference does not know about it.

So one wide group moves the statistic further than several mildly different ones, which is visible on the “one wide group” preset — two identical groups and one far wider produce a large K² concentrated in a single term.

The correction factor C only handles small samples, not non-normality. It adjusts for the bias in the chi-square approximation at small nᵢ and does nothing about tail behaviour.

Which is why no sample size rescues it. More data makes the wrong reference distribution more confidently wrong rather than less.

Checking the assumption, and why that barely helps

The tool runs a Shapiro-Wilk test on every group, because Bartlett’s validity depends on normality entirely. It is worth being honest about how much that check is worth.

A normality test at these sample sizes has very little power. A normality test on ten observations detects a mildly skewed population under 10% of the time — so passing it is weak reassurance.

And the departures that break Bartlett are exactly the ones a small sample cannot see. Tail behaviour is what matters, and tails are where samples carry least information.

A FAILED normality check is informative, though. If a test with almost no power still rejects, the departure is large, and Bartlett’s result should not be reported. The tool flags that case.

The stronger check is agreement with a robust test. Where Bartlett and Levene agree, Bartlett’s extra power is a bonus rather than a risk. Where they disagree, the disagreement is the finding — and Levene is the one to report.

Against the other two

Three tests for the same question, and a clear ordering once the assumption is settled.

Against the F-test: Bartlett generalises to any number of groups where a variance ratio compares exactly two. On two groups they are near-equivalent and share the same failure mode.

Against Levene: Bartlett is more powerful under normality and much worse without it. Levene gives up a little power on the normal row — 3.67% against Bartlett’s 4.20% false-positive rate, and correspondingly slightly less sensitivity — and holds its level everywhere else.

So the decision rule is about what you know, not about the data in front of you. If normality is established by the measurement process rather than hoped for, Bartlett. Otherwise Levene.

And for a highly non-normal case there is a fourth option: transform the data first. A log transform on positive skewed data often makes every group approximately normal, after which Bartlett is valid on the transformed scale — which is a different question, but often the one you meant.

Reading the group table

The statistic is one number for the whole comparison. The per-group table is where the finding is.

The ratio to the pooled variance localises the difference. A group at 4× the pool and two at 0.6× tells you which one is responsible; K² does not.

Group sizes matter to the weighting. Each group contributes in proportion to nᵢ − 1, so a large group slightly off the pool can outweigh a small group far from it.

A near-zero statistic is meaningful. It means every group variance is close to the pooled one, which is the closest this test comes to positive evidence of equal spreads — though still not a demonstration of it.

And a significant result with all ratios near 1 means large samples, not a large effect. The table shows the sizes so that reading is available.

Reporting Bartlett's test

Four things, and the second is the one that makes the result defensible.

Report K² with its degrees of freedom. “K²(2) = 8.4, p = 0.015” carries the group count; a bare p-value does not.

Say how normality was established. Not “a normality test passed” — at these sample sizes that is weak. A measurement process known to produce normal errors, or a robust test agreeing, is the evidence that matters.

Give the group variances. They are the effect size, and they say which group differs and by how much.

And report the robust test too where they disagree. Publishing the more convenient of two p-values from tests with different assumptions is a choice the reader cannot see, and the disagreement is itself informative.

Sources and methodology

References for Bartlett's test and the robustness question.

Method. The statistic includes the standard small-sample correction factor and is compared against a chi-square on k − 1 degrees of freedom; identical groups are verified to give exactly zero. The robustness table is a measurement rather than a citation — 800 replications per shape draw every sample from the same distribution, so all rejections are false positives — and the suite asserts that Bartlett tracks the F-test to within 2 percentage points on both the heavy-tailed and skewed rows, which is why the two share a failure mode. Agreement between them on two-group data is verified across 500 random comparisons. Scale and location invariance are checked, and a per-group Shapiro-Wilk test is run in the tool because the validity depends on it. 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%.
F-TestThe variance ratio with Levene and Bartlett computed beside it, and a measured false-positive table: on skewed data the F-test reports a difference in spread 40.40% of the time when there is none.
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.
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?
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.
Standard DeviationSample and population standard deviation, plus variance, mean, median, quartiles, z-scores, outliers, and confidence intervals.

More in Math, or browse all calculators.

Educational use disclaimer

An educational tool. Bartlett’s test is valid only when every group is normally distributed, and the measured table on this page shows it reporting differences that do not exist on skewed and heavy-tailed data — no sample size corrects that, so a result here should not be reported without independent grounds for the normality assumption.

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 the most powerful equal-variance test under normality, with both halves of that sentence measured: 4.20% false positives on genuinely normal data — correct — and 40.40% on skewed data.
  2. Added a per-group normality check, because the test's entire advantage is conditional on an assumption that is usually asserted rather than examined.
  3. Included the Bartlett correction factor in the output rather than folding it into the statistic, so the small-sample adjustment is visible.
  4. Set out where Bartlett genuinely beats Levene — established normality and small groups, where the extra power is real — and where it should not be used at all.
  5. Verified against 53 assertions shared with the F-test and Levene pages, including the calibration sweep that produces the 4.20% and 40.40% figures.

Add this calculator to your site

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