Skip to main content

KRUSKAL-WALLIS TEST CALCULATOR

Kruskal-Wallis H test calculator with Dunn post hoc tests.

Compare three or more independent groups when the data are ordinal or not normal. You get H, df, the p value, epsilon squared, medians, mean ranks, Bonferroni-adjusted Dunn comparisons, and an APA sentence.

GROUPS

One group per line

NON-PARAMETRIC

Write each group as "Name: value, value, …". The name is optional.

METHOD

Kruskal-Wallis test: formula, post hoc tests, and reporting

When to use it

  • Three or more independent groups (different people in each)
  • Ordinal outcome (such as a Likert item) or skewed numeric data
  • It is the non-parametric alternative to one-way ANOVA
  • For the same people measured 3+ times, use the Friedman test

Formula

H = [12 ÷ (N(N+1))] × Σ (Rᵢ² ÷ nᵢ) − 3(N+1), df = k − 1

Rᵢ is the rank sum of group i after ranking all values together. With ties, H is divided by 1 − Σ(t³ − t) ÷ (N³ − N). H is compared with a chi-square distribution.

Post hoc: Dunn's test

A significant H says at least one group differs, not which. Dunn's test compares every pair of mean ranks; with three groups there are three comparisons, so Bonferroni multiplies each p by 3.

How to report it (APA style)

“A Kruskal-Wallis H test showed a statistically significant difference in engagement between teaching methods, H(2) = 14.58, p < .001, ε² = .73. Dunn's post hoc tests with Bonferroni correction showed that the flipped group scored higher than the lecture group (p < .001).” Report medians for each group.

References

  • Kruskal, W. H., & Wallis, W. A. (1952). Use of ranks in one-criterion variance analysis. Journal of the American Statistical Association, 47(260), 583–621.
  • Dunn, O. J. (1964). Multiple comparisons using rank sums. Technometrics, 6(3), 241–252.
  • Tomczak, M., & Tomczak, E. (2014). The need to report effect size estimates revisited. Trends in Sport Sciences, 1(21), 19–25.