Kruskal–Wallis test and Dunn’s post-hoc calculator

Enter raw values for three or more independent groups to run a tie-corrected Kruskal–Wallis H test, ε² effect size, Dunn’s pairwise comparisons and APA 7th reporting.

No accountDunn post-hoc includedAPA sentence & R/Python

Enter 3 or more independent groups

Non-parametric alternative to one-way ANOVA, with Dunn’s pairwise comparisons.

INDEPENDENT GROUPS

LIVE RESULT

INSTANT

Kruskal–Wallis H test

Observations must be independent across and within groups. Asymptotic chi-square approximation is reliable when every group has at least 5 observations.

READY-TO-USE APA 7TH RESULTS SENTENCE

Adjust inputs above to generate a draft reporting sentence.

VISUAL DIAGNOSTIC

Mean rank across groups (higher = larger values)

Reproduce in R (stats / FSA) and Python (SciPy)

How the Kruskal–Wallis H test works

The Kruskal–Wallis test pools all observations across k independent groups, assigns average ranks from 1 to N, and tests whether the mean ranks differ more than chance expectation. A tie-correction divisor adjusts H when duplicate observations appear.

H = [ 12 ÷ (N(N + 1)) × Σ(Rj² ÷ nj) − 3(N + 1) ] ÷ [ 1 − Σ(t³ − t) ÷ (N³ − N) ]
ε² = H ÷ (N − 1), η²H = max(0, (H − k + 1) ÷ (N − k))

Worked example & Dunn’s pairwise follow-up

Across the three sample groups (N = 18), Kruskal–Wallis H(2) = 12.56, p = .002, ε² = 0.74. Dunn’s post-hoc tests (Holm-adjusted) pinpoint which specific group pairs differ in mean rank while controlling family-wise error.

When to use Kruskal–Wallis vs. ANOVA

Common questions

Frequently asked questions

Which effect size should I report after Kruskal–Wallis?

Tomczak and Tomczak (2014) recommend epsilon-squared ε² = H / (N − 1) or rank eta-squared η²_H = (H − k + 1) / (N − k), both bounded between 0 and 1.

Why does Dunn’s test use the pooled ranking rather than re-ranking two groups at a time?

Dunn (1964) keeps the original N-observation rank scale and applies a tie-adjusted pooled rank variance, preserving consistency with the omnibus H test and correcting for multiple pairs.

Can I use Kruskal–Wallis for Likert-scale survey items across 3+ groups?

Yes, it is widely used when comparing ordinal single-item scores or strongly skewed continuous outcomes across three or more independent groups.