gizmobench
BrowseDaily

Levene Test Calculator

Levene's test asks whether several groups spread out by different amounts, and it answers by running a one-way ANOVA on each value's absolute distance from its own group's center. This page shows that working instead of hiding it. The groups 1, 2, 3, 4, 5 and 1, 3, 5, 7, 9 and 2, 3, 3, 4, 8 have means of 3, 5 and 4, their absolute deviations from those means average 1.2, 2.4 and 1.6, and the ANOVA of those deviations gives F 0.965517 on 2 and 12 degrees of freedom with p = 0.408495, every figure on screen where it can be checked. Switch the center to the median and the same groups give the Brown-Forsythe test, F 0.794872 with p = 0.474045. The arithmetic is exact on the digits you type, with F rounded once at the end, so adding a constant to every value or multiplying every value by the same nonzero number leaves F where it was, and when the deviations inside every group are identical F is reported as undefined rather than as an enormous number. Nothing is dropped: a word or an NA is refused with its group and position, and every value appears in the deviation table, the copied report and the CSV.

Your groups

Center

Absolute deviations from each group's mean: Levene's original test.

Group 1
Group 2
Group 3

3 of up to 20 groups, and up to 10,000 values across them.

ResultMean (Levene)Example data

2468Group 1Group 2Group 3

Text equivalent: 3 groups on one axis, each group's mean marked with a vertical line. Group 1: 5 values from 1 to 5, mean 3. Group 2: 5 values from 1 to 9, mean 5. Group 3: 5 values from 2 to 8, mean 4.

Example data: three groups of five, mean-centered. Replace them with your own values and run the test.

F
0.965517
Degrees of freedom
2, 12
p
0.408495
Against alpha 0.05
p not below alpha

p = 0.408495 is not below alpha = 0.05.

ANOVA on the absolute deviations

SourceSSdfMSFp
Between groups3.7333321.866670.9655170.408495
Within groups23.2121.93333
Total26.933314

Groups

GroupnMeanMedianVarianceSDMean deviation from meanDeviation SS
Group 15332.51.581141.22.8
Group 2555103.162282.411.2
Group 35435.52.345211.69.2

Variance and SD use n - 1. The deviations are taken from each group's mean, and the ANOVA above is run on them.

Absolute deviations

GroupPositionValue as enteredGroup meanAbsolute deviation
Group 11132
Group 12231
Group 13330
Group 14431
Group 15532
Group 21154
Group 22352
Group 23550
Group 24752
Group 25954
Group 31242
Group 32341
Group 33341
Group 34440
Group 35844
Rows 1 to 15 of 15
  • Each value is replaced by its absolute distance from its own group's mean, and a one-way ANOVA is run on those distances; its F is Levene's statistic.
  • The p-value is the upper tail of the F distribution on 2 and 12 degrees of freedom; a small p-value is computed directly by the continued fraction, never as one minus a cumulative, so it keeps its digits.
  • The largest sample variance (Group 2) is 4 times the smallest (Group 1).

Assumptions

  • The groups are independent samples, and the values inside each group are independent of one another.
  • Every value entered is used as entered: nothing is deleted, trimmed or set aside as an outlier.
  • The p-value refers the F ratio of the absolute deviations to the F distribution on k - 1 and N - k degrees of freedom, which is how both Levene's test and the Brown-Forsythe test are defined.
  • A p-value that is not below alpha is not evidence that the population variances are equal. The page reports the comparison and chooses no model or next step.

Worked cases

Each line is computed by the same code as the answer above. Load one to fill the groups, then run it.

  • Levene (mean)[1..5], [1, 3, 5, 7, 9], [2, 3, 3, 4, 8]
    F 0.965517, df 2 and 12, p 0.408495
  • Brown-Forsythe (median)the same three groups
    F 0.794872, df 2 and 12, p 0.474045
  • Invariancethe same groups, every value times 3 plus 10
    F 0.965517, df 2 and 12, p 0.408495
  • Zero spread within groups[1, 3, 1, 3], [2, 6, 2, 6], [4, 4, 4]
    F undefined: Inside every group the absolute deviations from the mean are all the same, so the within-group mean square is 0 and F would divide by it. F and p are undefined; the between-group sum of squares is 6.90909.

Common questions

What does Levene's test tell you?
It asks whether the groups come from populations with different variances. Each value is replaced by its absolute distance from its own group's center, and a one-way ANOVA compares the average distance across the groups: groups that spread out more have larger distances. A large F and a small p-value are evidence that the spreads differ. For the groups 1, 2, 3, 4, 5 and 1, 3, 5, 7, 9 and 2, 3, 3, 4, 8 the page reports F 0.965517 on 2 and 12 degrees of freedom and p = 0.408495, which is not below an alpha of 0.05.
What is the difference between Levene's test and the Brown-Forsythe test?
Only the center the distances are measured from. Levene's original test uses each group's mean, and the Brown-Forsythe test uses each group's median, so on this page Brown-Forsythe means the median-centered Levene test, not the Brown-Forsythe test for comparing means. The example groups have means of 3, 5 and 4 and medians of 3, 5 and 3, so the two versions differ only in the third group, and they give F 0.965517 with p = 0.408495 against F 0.794872 with p = 0.474045. One extreme value moves a median less than a mean, which is the reason usually given for the median version when a group is skewed. The Center switch picks either one for the same data, and Run test computes it. Median-centered Brown-Forsythe is a modified Levene test. A trimmed-mean center is another modification, which this calculator does not implement.
How do I read the p-value from Levene's test?
It is the chance, under the F distribution the test uses, of an F at least as large as yours if the absolute deviations in every group came from populations with the same mean, which is what equal spread looks like to this test. The page compares it with the alpha you set and says whether p is below alpha or not, and stops there. A p-value that is not below alpha is not evidence of equal variances: small groups can hide a real difference in spread. The page also recommends no follow-up test and chooses no model for you.
Why does it say F is undefined?
Because the within-group mean square is 0 and F would divide by it. Take the groups 1, 3, 1, 3 and 2, 6, 2, 6 and 4, 4, 4: their distances from the group means are all 1, all 2 and all 0, so there is no variation inside any group at all. The page says F and p are undefined and still prints the between-group sum of squares, instead of printing a huge F or a p of 0. The arithmetic is exact, so a zero here really is zero and not a rounding error.
Does adding a constant or changing units change the result?
No. Adding the same number to every value leaves every distance from the center unchanged, and multiplying every value by the same nonzero number scales every distance by the same factor, which cancels in F. The worked case that takes the example groups times 3 plus 10 gives F 0.965517 on 2 and 12 degrees of freedom, the same as the original, and because the arithmetic is exact it is the same to the last digit rather than merely close.
How much data can I enter?
From 2 to 20 groups, with at least 3 values in each and up to 10,000 values across all of them, each value with up to 50 significant digits. Past a limit the page refuses and names both numbers rather than trimming anything. Values can be separated by spaces, commas, semicolons or new lines, so a column pasted from a spreadsheet works. The values stay in this browser tab: the page remembers only the center and alpha you chose, never the data. An F statistic outside the supported numeric range is refused rather than printed as infinity or rounded from a positive value to zero. A sample variance ratio beyond that range is omitted with a note.
What happens to missing values or text in my data?
They are refused, not skipped. An entry such as NA or a word is reported with its group and its position, for example Group 2, value 3, and nothing is computed until it is deleted or replaced. The same goes for a number written with a thousands separator such as 1,250, because a comma also separates values here and the page will not guess which was meant. No value is ever removed on its own or treated as an outlier.
How accurate is the p-value?
The p-value is the upper tail of the F distribution at the stated degrees of freedom; a small p-value is computed directly by the continued fraction, never as one minus a cumulative, so it keeps its digits. In the tested exact rational and 80-digit reference fixtures, p-values agreed within 1e-12 in relative terms, with logarithms checked to the same tolerance for very small tails. Below 1e-300 the display switches to rounded notation from the logarithm. This is a chosen display cutoff, not the double underflow boundary: doubles can represent smaller values down to about 5e-324. Logarithmic notation also shows tails below that range instead of printing 0.
What can I export?
Copy report puts the test, F, the degrees of freedom, p, the ANOVA table, each group's mean, median, variance and SD, every value with its absolute deviation, the notes and the assumptions on the clipboard. Download CSV saves the same figures as a spreadsheet file, one row per value. Computed double-valued fields are exported without display rounding, except p-values below 1e-300, which use logarithmic notation rounded to five significant digits. Entered value tokens are retained, with an initial plus sign removed for spreadsheet compatibility. Group names that begin with =, +, - or @ get a leading apostrophe in the CSV so a spreadsheet does not read them as formulas.
What are the null hypothesis and a significant Levene result?
The null hypothesis H0 states equal population variances across all groups; the alternative is at least one differing population variance. Homogeneity of variance, or homoscedasticity, names this equal-spread assumption. On this page a significant result means p is below the alpha you entered, providing evidence against H0. It does not identify the differing pair or test the group means. A nonsignificant result does not establish equal variances, and neither outcome automatically selects a later test.
What assumptions does Levene's test make?
Use independent numeric samples with independent observations within each group. Groups may have different sample sizes. Levene's test is less sensitive to departures from normality than Bartlett's test, but it does not test normality or verify how the samples were collected. This calculator compares its deviation-based F statistic with the F distribution; it does not perform a permutation test. Its input limits are 2 to 20 groups, at least 3 values per group and 10,000 values in total.
What formula produces the Levene F statistic?
For k groups and N total observations, first calculate z_ij = |x_ij - center_i| using each group's mean or median. Let zbar_i be the group's average deviation and zbar the average of all N deviations. Between-group SS = sum_i n_i (zbar_i - zbar)^2; within-group SS = sum_i sum_j (z_ij - zbar_i)^2. Then F = [between-group SS / (k - 1)] / [within-group SS / (N - k)]. The ANOVA table shows these quantities, and the p-value is the upper F tail on k - 1 and N - k degrees of freedom. When within-group SS is zero, this calculator reports F and p as undefined.
How does Levene compare with Bartlett's test and the two-variance F-test?
Levene and Bartlett both examine equality of population variances across groups. Bartlett's test uses sample variances and is more sensitive to non-normal data; Levene compares absolute deviations from group centers. The classical F-test for two variances uses the ratio of two sample variances. Levene's F instead comes from ANOVA on deviations, so the statistics and degrees of freedom differ. This calculator runs Levene and median-centered Brown-Forsythe; it does not compute Bartlett's test or the classical two-variance F-test.
How is Levene's test different from ANOVA, a t-test or Welch's test?
Levene examines group spread. An ordinary one-way ANOVA or a t-test on the original observations examines group means. Welch's mean tests allow unequal population variances. The ANOVA table on this page is computed from absolute deviations, not from the original observations, so it is the working for a spread test. A significant Levene result is evidence against equal spread; it does not establish a difference in means or choose between pooled and Welch procedures. This page does not run those mean tests.

Tests evidence of differing population variances under independent sampling; a nonsignificant result does not prove equality. No automatic deletion, model selection or safety/quality certification. Brown-Forsythe here means median-centered Levene, not a mean-test variant.