Skip to content
AZ Tools

One-Way ANOVA Calculator (Welch, Kruskal–Wallis)

Compare the means of several groups: one-way ANOVA, Welch's ANOVA, Kruskal–Wallis and Levene's test, with the ANOVA table and effect sizes.

Levene's p = 0.3412 gives no evidence that the spreads differ at α = 0.05, so the classic F is read. Its p = 0.01591 is below α: at least one group mean differs from the others.

Tests

TestStatisticdfp-value
One-way ANOVA (F)4.84612, 270.01591
Welch's ANOVA (F)5.1812, 17.1280.01739
Kruskal–Wallis (H)7.988220.01842
Brown–Forsythe / Levene (W)1.11922, 270.3412

ANOVA table

SourcedfSum of squaresMean square
Between groups23.76631.8832
Within groups2710.49210.3886
Total2914.2584

η² = 0.2641 · ω² = 0.2041

GroupnMeanSDMedian
ctrl105.0320.58315.155
trt1104.6610.79374.55
trt2105.5260.44265.435

Calculated in the browser: F tails from the regularized incomplete beta function, the Kruskal–Wallis tail from the incomplete gamma. The data are kept in local storage.

How to use

  1. Paste each group's values on its own line, optionally starting with a name and a colon.
  2. Read the sentence at the top: it checks Levene's test first, then reports whichever F — classic or Welch — suits your data.
  3. Compare the four tests in the table; if they disagree, the spreads or the shape of the data are why.
  4. Use the ANOVA table and η² or ω² to judge how much of the variation the groups explain.
  5. Load R's PlantGrowth example to see a documented case, then edit a group to see the tests move.

About this tool

Show

Paste one line of numbers per group and get four tests side by side: the classic one-way ANOVA with its full table of sums of squares, Welch's ANOVA, the rank-based Kruskal–Wallis test, and the Brown–Forsythe version of Levene's test for equal spreads, together with η², ω² and a summary of each group. The example is R's PlantGrowth data, the set R documents its own aov function with, and it gives F = 4.846 on 2 and 27 degrees of freedom and p = 0.01591 here exactly as it does there, with Welch's F = 5.181 on 17.128 denominator degrees of freedom and a Kruskal–Wallis statistic of 7.9882. The reason to show all four is that they can disagree sharply. The classic F pools the variance of every group and assumes they are equal; when they are not, particularly with unequal group sizes, it can miss a large difference or report one that is not there. With a tight group of five, a scattered group of eight and a third of four, the classic test here gives F = 0.70 and p = 0.51 while Welch's gives F = 41.2 and p = 0.0002 — and Levene's test flags the unequal spreads at p = 0.003. So the tool reads Levene's result first and says which F it is going by. Kruskal–Wallis compares ranks rather than means, with the usual correction for ties, and is the one to lean on when groups are skewed or contain outliers. ω² is reported alongside η² because η² overstates the effect in small samples; ω² can come out slightly negative when the effect is essentially zero, and it is shown as computed rather than clipped. A significant result says only that some group differs; which ones need a post-hoc comparison such as Tukey's, which this tool does not perform.

Frequently asked questions

When should I read Welch's ANOVA instead of the classic one?

Whenever the groups' spreads may differ, which in practice is most of the time. The classic F assumes equal variances; Welch's does not, and loses very little when they happen to be equal. The tool reads the Brown–Forsythe version of Levene's test and switches to Welch's F when the spreads differ at your α, but many statisticians simply read Welch's F by default.

What is Kruskal–Wallis for?

It tests whether the groups come from the same distribution using only the ranks of the values, so it is not thrown by skewed data or a few extreme values the way a comparison of means is. It is often described as the non-parametric version of one-way ANOVA. Ties are handled with mid-ranks and the standard correction.

Which groups differ?

ANOVA does not say — a significant F means at least one mean differs from the others. To find which, run a post-hoc test that controls the error rate across all pairs, such as Tukey's HSD, or Games–Howell when the variances differ. Running a separate t-test on every pair inflates the chance of a false positive.

What is the difference between η² and ω²?

η² is the share of the total sum of squares that lies between groups. It is biased upwards, most noticeably in small samples, because some of that share is chance. ω² subtracts the part expected by chance and is the better estimate of the effect in the population; with no real effect it can be slightly negative, which is reported as it is.

How does this relate to the t-test?

With two groups, one-way ANOVA is exactly the pooled two-sample t-test: F equals t squared and the p-values are identical. Welch's ANOVA with two groups is likewise Welch's t-test. ANOVA's value is in comparing three or more groups at once without inflating the false-positive rate.

Related tools