Levene Test Calculator

Levene Test Calculator

Test whether two or more groups have equal variances — the homogeneity assumption behind ANOVA and the t-test. Paste each group’s values, then compare the mean-centred and median-centred (Brown–Forsythe) versions.

3 groups · 24 values
F STATISTIC · DF 2, 21
8.4860

Variances look unequal — with F(2, 21) = 8.4860 and p = 0.0020, the groups’ variances differ more than chance alone would explain. Do not run a standard ANOVA; use Welch’s ANOVA instead.

P-value
0.0020
Degrees of freedom
2, 21
Groups (k)
3
Total N
24
Largest SD
5.7817
Smallest SD
1.3093
VersionFdfp-value
Mean-centred8.48602, 210.0020
Median-centred (Brown–Forsythe)8.35412, 210.0021
GroupnMeanMedianSDVariance

Calculation

    Group spread — standard deviations

    Group 3 spreads far wider than Group 1 (SD 5.78 vs 1.31) — that is the inequality Levene’s test is detecting.

    Decision: with p = 0.0020 below α = 0.05, reject equal variances. Run Welch’s ANOVA (or a nonparametric test) instead of the standard ANOVA, and use Games–Howell for post-hoc comparisons.
    Which version? If the data are roughly symmetric, the mean-centred version is fine. If they are skewed or contain outliers, trust the median-centred (Brown–Forsythe) version — it stays valid where the mean version can mislead. When both agree, as here, the conclusion does not depend on the choice.

    Levene’s test checks whether several groups have equal variances — the homogeneity assumption behind ANOVA and the t-test. Unlike the F-test it works for more than two groups, and the median version (Brown–Forsythe) stays valid when data are skewed. This calculator reports both versions side by side.

    How to use the Levene test calculator

    Paste each group’s values into its own box. The calculator runs a one-way ANOVA on the absolute deviations from each group’s centre, and reports the F statistic, degrees of freedom and p-value for both the mean-centred and the median-centred (Brown–Forsythe) versions.

    1. Paste the values for Group 1, one number per value, separated by commas, spaces or line breaks.
    2. Do the same for Group 2, then add more groups with + Add group if you need them (up to 6 groups). Each group needs at least 2 values.
    3. Choose the version to headline with the toggle: Mean-centred (the classic Levene test) or Median-centred (Brown–Forsythe). Both versions are always shown in the table below the headline.
    4. Set the significance level (α), usually 0.05, and click Calculate — or just type, because the results update as you type.
    5. Read the headline F statistic and p-value, then check the group SDs table and the chart: the widest bar is the group driving the result.

    Try it now: the three teaching-method groups in Example 1 give a mean-centred F(2, 21) = 8.49, p = .002 — the variances are unequal, so a standard ANOVA is off the table. Switch to the median-centred version and the answer barely moves: F(2, 21) = 8.35, p = .002.

    What Levene’s test measures

    Levene’s test (Levene, 1960) asks whether the spread of several groups is the same. It does this with a neat trick: for every value, take its absolute distance from its own group’s centre, then run a one-way ANOVA on those distances. If the groups’ variances are equal, their average distances are similar; if one group spreads much wider, its average distance is larger and the F statistic grows.

    The test statistic is

    W = [(N − k) / (k − 1)] × [ Σ ni (Z̄i − Z̄)² / ΣΣ (Zij − Z̄i)² ]

    where Zij = |Xij − centrei| is the absolute deviation of value j in group i from its group centre, Z̄i is the mean of those deviations in group i, Z̄ is their grand mean, k is the number of groups and N is the total sample size. Under the null hypothesis of equal variances, W follows an F distribution with (k − 1, N − k) degrees of freedom. The p-value is the upper tail of that F distribution. NIST describes the test and its two versions in 1.3.5.10. Levene Test for Equality of Variances.

    Mean or median — which version should you use?

    The only difference between the two versions is the centre used for the deviations. The classic version centres on the group mean; the Brown–Forsythe version (Brown & Forsythe, 1974) centres on the group median. The median version is the more robust of the two.

    VersionCentreUse it whenWatch out
    Mean-centred (Levene, 1960)Group meanData are roughly symmetric in each groupCan be misled by skew or outliers
    Median-centred (Brown–Forsythe)Group medianData are skewed, heavy-tailed or contain outliersSlightly less power when data are normal

    The rule: if your data look roughly symmetric, the mean version is fine. If they are skewed or contain outliers, trust the median version. When the two versions agree — as they do in both worked examples below — the conclusion does not depend on the choice, and you can report either one (or both). If they disagree, report the median version and say why.

    Levene’s test is not a test of means. A significant result says the variances differ; it says nothing about whether the group means differ. That is the ANOVA’s job — and a significant Levene result changes which ANOVA you should run, not whether the means differ.

    The ANOVA-assumption workflow

    Levene’s test sits at the start of the ANOVA workflow. Use it to check the homogeneity-of-variance assumption before you run your ANOVA or t-test:

    1. Run Levene’s test. If p ≥ 0.05, there is no evidence against equal variances: run the standard one-way ANOVA (or the two-way ANOVA for two factors), and follow a significant result with Tukey HSD post-hoc tests.
    2. If p < 0.05, do not run the standard ANOVA. Run Welch’s ANOVA instead — it does not assume equal variances — and use Games–Howell for post-hoc comparisons.
    3. For two groups only, the same logic applies to the two-sample t-test: unequal variances call for Welch’s t-test. The F-test compares two variances directly, but it assumes normality; Levene’s test is the robust multi-group alternative.
    4. Check normality too. Levene’s test assumes independent observations but is fairly robust to non-normality, especially the median version. Still, run the Shapiro–Wilk test on each group’s residuals if you want the full assumption check.

    Worked Example 1 — three teaching methods

    Three teaching methods are compared on test scores, with 8 students in each group. The question is whether the three groups spread equally — the homogeneity assumption you must check before running a one-way ANOVA.

    GroupScoresnMeanMedianSD
    Method 112, 14, 11, 13, 15, 12, 14, 13813.0013.001.3093
    Method 218, 22, 25, 19, 21, 24, 20, 26821.8821.502.9001
    Method 330, 38, 28, 40, 35, 26, 42, 33834.0034.005.7817

    Click Load Example 1 — teaching methods in the calculator to run it yourself. The absolute deviations from the group means average 1.00, 2.375 and 4.75; the ANOVA on those deviations gives:

    VersionSSBSSWMSBMSWF(2, 21)p-value
    Mean-centred57.583371.250028.79173.39298.4860.0020
    Median-centred (Brown–Forsythe)57.583372.375028.79173.44648.35410.0021

    Interpretation: the variances are clearly unequal — the SDs run 1.31, 2.90 and 5.78, a more than four-fold spread. With p = .002, well below 0.05, do not run a standard ANOVA on these scores; use Welch’s ANOVA or a nonparametric test instead. Both versions agree, so the conclusion does not depend on the centring choice.

    Worked Example 2 — two groups, equal variances

    Two groups of 10 measurements each are compared. The scores look similar in spread, and Levene’s test should agree.

    GroupScoresnMeanMedianSD
    Group 150, 52, 48, 51, 49, 53, 47, 50, 52, 481050.0050.002.0000
    Group 260, 63, 58, 61, 59, 64, 57, 62, 60, 611060.5060.502.1731

    Click Load Example 2 — two groups in the calculator. Both versions give the same answer here — the data are symmetric, so the mean and the median of each group coincide:

    Mean-centred: F(1, 18) = 0.0375, p = 0.8486. Median-centred (Brown–Forsythe): F(1, 18) = 0.0375, p = 0.8486.

    Interpretation: there is no evidence of unequal variances — the two SDs (2.00 and 2.17) are nearly identical and p = .849 is far above 0.05. The homogeneity assumption holds, so a standard ANOVA or two-sample t-test is fine.

    Assumptions and limitations

    • Independent observations. The values in one group must not be linked to the values in another (no paired or repeated measurements). For paired data, use a paired test instead.
    • At least 2 values per group. A group with a single value has no spread to measure, and the test cannot run.
    • It tests variances, not means or shapes. Two groups can pass Levene’s test and still differ in shape (one skewed, one symmetric) — the test only compares spread.
    • The mean version is somewhat sensitive to non-normality. That is why the median (Brown–Forsythe) version exists: if your data are skewed, report the median version.
    • It does not say which variances differ. With three or more groups, a significant result only tells you that at least one pair differs. Look at the group SDs table and the chart to see which group stands out.
    • A non-significant result does not prove equal variances. With small samples the test has low power, so a large p-value may just mean the test could not detect the difference. Report the SDs alongside the p-value so readers can judge the size of the inequality themselves.

    How to report Levene’s test (APA)

    Report the test name, the version used, the F statistic with its degrees of freedom, and the p-value — then say what you did next. Copy the sentence and adapt the numbers:

    ‘Levene’s test indicated unequal variances across the three groups, F(2, 21) = 8.49, p = .002; therefore Welch’s ANOVA was used.’

    For the equal-variance case in Example 2:

    ‘Levene’s test indicated equal variances across the two groups, F(1, 18) = 0.04, p = .849.’

    Template: ‘Levene’s test [indicated unequal / indicated equal] variances across the [k] groups, F(df1, df2) = [F], p = [.p]; therefore [Welch’s ANOVA was used / a standard ANOVA was used].’

    Cite this tool: Shafiq, A. (2026). Levene Test Calculator. Empirical Rule Calculator. https://empiricalrulecalculators.com/levene-test-calculator/

    Frequently asked questions

    Levene vs F-test vs Bartlett — which do I use?

    Use the F-test only for two groups when the data are normal — it is the most powerful option there, but it breaks down badly with non-normal data. Use Bartlett’s test for several groups when the data are normal. Use Levene’s test whenever you have more than two groups, or whenever normality is doubtful — it is the robust, general-purpose choice, and the median (Brown–Forsythe) version stays valid with skewed data.

    Mean or median version?

    Use the mean-centred version when the data in each group are roughly symmetric, and the median-centred (Brown–Forsythe) version when they are skewed, heavy-tailed or contain outliers. When the two agree, report either one; when they disagree, report the median version and say why.

    What do I do if Levene’s test is significant?

    Do not run the standard ANOVA or the equal-variance t-test. For more than two groups, run Welch’s ANOVA followed by Games–Howell post-hoc tests. For two groups, run Welch’s t-test. Alternatively, transform the data (for example a log transform) or use a nonparametric test such as Kruskal–Wallis — but report what you did and why.

    Is Levene’s test sensitive to non-normality?

    The mean-centred version is somewhat sensitive: heavy skew or outliers can inflate the false-positive rate. The median-centred (Brown–Forsythe) version was designed to fix exactly that, and is much more robust. If you are unsure about normality, run the Shapiro–Wilk test first and lean on the median version.

    How many groups can I compare?

    There is no hard limit in the maths — the test works for any number of groups k ≥ 2, and this calculator supports up to 6 groups. In practice, keep the groups to a sensible number: with many small groups the test loses power, and a significant result tells you little about which pair differs. Each group needs at least 2 values.

    Sources: Levene, H. (1960). Robust tests for equality of variances. In I. Olkin (Ed.), Contributions to Probability and Statistics. Stanford University Press. Brown, M. B., & Forsythe, A. B. (1974). Robust tests for the equality of variances. Journal of the American Statistical Association, 69(346), 364–367. NIST Engineering Statistics Handbook, 1.3.5.10. Levene Test for Equality of Variances. Computed with SciPy 1.11.4 (scipy.stats.levene, mean and median centres). See all statistics tools.

    Next steps

    📊
    ● LiveANOVA

    One-Way ANOVA Calculator

    Run the ANOVA your Levene test just cleared — one factor, several groups, F-test and post-hoc guidance.

    Try Calculator →

    🎲
    ● LiveVariance Test

    F-Test Calculator

    Compare two variances directly with an F-test — the two-group, normality-based alternative to Levene.

    Try Calculator →

    📊
    ● LiveANOVA

    Two-Way ANOVA Calculator

    Test two factors at once, with their interaction — main effects, F-tests and eta-squared.

    Try Calculator →

    More Tools to Explore

    Keep going with the calculators that pair with Levene’s test — ANOVA, variance tests and the assumption checks that come first.

    📊 ● LiveANOVA

    One-Way ANOVA Calculator

    Run the ANOVA your Levene test just cleared — one factor, several groups, F-test and post-hoc guidance.

    Try Calculator →
    🎲 ● LiveVariance Test

    F-Test Calculator

    Compare two variances directly with an F-test — the two-group, normality-based alternative to Levene.

    Try Calculator →
    📊 ● LiveANOVA

    Two-Way ANOVA Calculator

    Test two factors at once, with their interaction — main effects, F-tests and eta-squared.

    Try Calculator →
    🎲 ● LiveHypothesis Test

    Two-Sample T-Test Calculator

    Compare two means with a t-test — and use Welch’s version when Levene says the variances differ.

    Try Calculator →
    🔔 ● LiveNormality

    Shapiro-Wilk Test Calculator

    Check the normality assumption for each group before you trust the ANOVA.

    Try Calculator →
    🎲 ● LiveHypothesis Test

    Chi-Square Test Calculator

    Test independence and goodness of fit with the chi-square test — another workhorse for thesis data.

    Try Calculator →
    🧭

    Explore All Tools

    Browse all the free statistics tools on this site in one place.

    Browse All Tools