Levene's Test Calculator

StatisticsLast updated: August 22, 2026

Levene's test examines whether the population variances of two or more groups are equal. Every observation is converted into its absolute distance from the center of its own group, and a one-way ANOVA is run on those distances: when the spread differs between groups, so do the mean absolute deviations, and the W statistic grows.

The independent samples t-test and one-way ANOVA pool the variances, assuming the groups share a common one. When that assumption breaks and the group sizes are unbalanced as well, the Type I error rate climbs far above the nominal level. This calculator uses the median-centered Brown-Forsythe version by default, computes the mean-centered classic Levene result alongside it, tabulates each group variance together with its confidence interval, and visualizes the spread with a box plot.

Write all the values of one group on each line. You can start a line with a label in the form "Name: values". At least 2 groups and at least 2 values per group are required; the group sizes do not have to be equal.
The median-centered version keeps the Type I error close to the nominal level for skewed distributions and in the presence of outliers; this is the "Based on Median" row in SPSS.
Sets the false positive risk. In the social sciences 5% is the common choice.

Levene / Brown-Forsythe Test Statistic

zᵢⱼ = | xᵢⱼ − centerᵢ |        center = median (Brown-Forsythe) or mean (Levene)
z̄ᵢ = Σⱼ zᵢⱼ / nᵢ              — within-group mean absolute deviation
z̄  = ΣΣ zᵢⱼ / N               — overall mean absolute deviation
W = [ (N − k) / (k − 1) ] · Σ nᵢ (z̄ᵢ − z̄)² / ΣΣ (zᵢⱼ − z̄ᵢ)²
df₁ = k − 1,   df₂ = N − k,   W ~ F(df₁, df₂)
Group variance:  sᵢ² = Σ(xᵢⱼ − x̄ᵢ)² / (nᵢ − 1)
Variance CI:     [ (n−1)s² / χ²_{1−α/2} , (n−1)s² / χ²_{α/2} ]
H₀: σ₁² = σ₂² = … = σₖ²   ·   H₁: at least one variance differs

The median-centered version was proposed by Brown and Forsythe (1974) and is robust to departures from normality; it is the "Based on Median" row in the SPSS Explore and One-Way ANOVA output, and the default of car::leveneTest(center = median) in R. The mean-centered version should be preferred only when the groups are approximately normal.

How to Calculate

  1. Write all the values of one group on each line; if you like, start a line with a label in the form "Group name: values".
  2. Choose the measure of center — if you are not confident about normality, stay with the default median (Brown-Forsythe) option.
  3. Set the significance level; α = 0.05 is standard for an assumption check.
  4. Read W, df₁, df₂, and the p-value: if p < α, the variances are NOT homogeneous, meaning the assumption has been violated.
  5. In the group variance table, look at which group breaks the pattern of spread and whether the variance confidence intervals overlap.
  6. Compare the box heights in the box plot; if the assumption is violated, switch to a Welch-corrected t-test or Welch ANOVA.

Worked Examples

Three teaching methods — different variances (n = 10 x3)

The Brown-Forsythe test gives W(2; 27) = 8.170 with p = 0.002; since the critical F is 3.3541, W lies above that bound and homogeneity of variance is rejected. The group variances are 3.73, 23.60, and 6.68, so the largest-to-smallest ratio is 6.32. The mean absolute deviation of the blended-method group is 4.20 against 1.60 and 2.10 for the others — Welch ANOVA should be used in place of a classic ANOVA.

Levene W statistic: 8.1701 · df₁ (between groups): 2 · df₂ (within groups): 27

Three groups with homogeneous variances (n = 12 x3)

Although the means are very different, the spreads are almost identical: the variances are 2.09, 1.90, and 1.90, and the ratio is only 1.10. With Brown-Forsythe W(2; 33) = 0.0447 and p = 0.956, the homogeneity of variance assumption holds comfortably. This is the textbook situation in which a classic one-way ANOVA can be applied with confidence.

Levene W statistic: 0.0447 · df₁ (between groups): 2 · df₂ (within groups): 33

How an outlier affects the choice of center (2 groups)

A single value of 31 in the control group raises its variance to 11.39 (against 2.22 in the treatment group). The mean-centered classic Levene gives W(1; 18) = 0.6125 with p = 0.444; on the same data the median-centered Brown-Forsythe gives W = 0.0847 with p = 0.774. The choice of center changes W more than sevenfold — a direct illustration of why the median-centered version is the default when outliers are present.

Levene W statistic: 0.6125 · df₁ (between groups): 1 · df₂ (within groups): 18

Frequently Asked Questions

What does a p-value above 0.05 mean in Levene's test?
It means the difference between the group variances can be explained by chance, so there is no evidence that the homogeneity of variance assumption has been violated. Be careful: in this test the result you want is NON-significance — unlike other hypothesis tests, a large p is good news. Even so, because the test has low power in small samples, p > 0.05 does not prove that the variances are equal.
What is the difference between Brown-Forsythe and Levene?
Both use the same formula; the only difference is the center around which the absolute deviations are computed. The original Levene (1960) uses the group mean, Brown-Forsythe (1974) the group median. Because the median is unaffected by extreme values, it keeps the true Type I error much closer to the nominal level for skewed and heavy-tailed distributions, which is why the median is the default in modern practice.
Should I use Levene's test or Bartlett's test?
If you are not confident that the groups are normally distributed, use Levene (especially the median-centered Brown-Forsythe). Bartlett's test is extremely sensitive to the normality assumption and frequently produces false positives on non-normal data even when the variances are equal. Bartlett's only advantage is that it is more powerful than Levene when the data really is normal.
Where does Levene's test appear in SPSS, and which row should I read?
In the independent samples t-test it sits in the "Levene's Test for Equality of Variances" column on the left of the output; in one-way ANOVA it appears in a separate table once Options > Homogeneity of variance test is selected. The Explore menu returns four rows at once, and the "Based on Median" row should be preferred for reporting. If Levene is significant in a t-test, read the "Equal variances not assumed" row below.
If homogeneity of variance fails, can I still use ANOVA?
You can, but you should prefer Welch ANOVA to the classic F test. When the group sizes are equal and the variance ratio is below 4, classic ANOVA is quite robust; the real danger is unbalanced groups combined with a large difference in variance. If the smaller group has the larger variance the test becomes conservative, and if it has the smaller variance it becomes far too liberal.
Does Levene's test require normality?
No, and that is its main appeal. The fit of the W statistic to an F distribution is an asymptotic approximation, and the median-centered version is quite robust to departures from normality. Still, if the number of observations per group is very small (n < 5) or the group sizes are extremely unbalanced, the p-value is only roughly correct; the calculator warns you in those situations.
With two groups, doesn't the variance ratio F test give the same answer?
They ask the same question but under different assumptions. The classic F test based on the ratio of two variances is, like Bartlett, very sensitive to normality and misleads even under small departures. Because Levene works on absolute deviations, it is far less affected by the shape of the distribution, which is why Levene / Brown-Forsythe is preferred in the two-group case as well.