Skip to content

Kruskal-Wallis Test

Nonparametric replacement for one-way ANOVA. H statistic, p-value, Dunn post-hoc and effect size.

Open the Kruskal-Wallis (k groups) calculator

When to use it

Use as the rank-based alternative to one-way ANOVA when residuals are heavily non-normal, when group sizes are very small, or when the response is ordinal rather than continuous. Tests whether the distributions of three or more independent groups are stochastically different.

When NOT to use it

Do not use for two groups (use Mann-Whitney U). Do not use for paired data across conditions (use Friedman). If ANOVA assumptions hold, prefer ANOVA; it has more power. Do not interpret as a test of equal medians unless the within-group distributions are similar in shape.

What you get

Kruskal-Wallis H statistic with df = k - 1 and p, with the tie-corrected variant where ties are present; rank means per group; Dunn post-hoc with letter display when k > 2; epsilon-squared and eta-squared (rank-based) effect sizes.

How to interpret the output

Reject the null when H is large (or equivalently when p is below alpha). The Dunn post-hoc handles which groups differ, with optional Bonferroni or Holm adjustment for the family of pairwise tests. Epsilon-squared above 0.16 is conventionally a large effect (Tomczak and Tomczak 2014). H is on the chi-square scale and the p uses the chi-square approximation, valid when group sizes are at least 5.

Common pitfalls

Try it in StatVeda

The Kruskal-Wallis (k groups) engine runs entirely in the browser. No signup, no install, no data sent to a server. Paste your data, hit Run, copy the output.

Open Kruskal-Wallis (k groups)

References

Related concepts

Related calculators