Kruskal-Wallis H Test

Compare three or more independent groups on an ordinal or non-normal outcome without assuming normality.

The Kruskal-Wallis H Test is the nonparametric alternative to One-Way ANOVA. It tests whether three or more independent groups come from the same distribution by ranking all observations together and comparing the mean ranks across groups. Like ANOVA, it is an omnibus test — a significant result tells you that at least one group differs from the others, but not which ones.

The test is appropriate in health sciences, psychology, and education when data are measured on an ordinal scale or when the normality assumption of ANOVA is clearly violated and sample sizes are too small for the Central Limit Theorem to rescue. For example, a clinical researcher might compare patient satisfaction ratings across three hospital wards, or an HR analyst might compare job engagement scores across five departments when the distributions are heavily skewed.

StatRyx automates the full Kruskal-Wallis workflow: it ranks the data, computes the H-statistic, evaluates significance, calculates eta-squared (ε²) as an effect size, and runs Dunn's post-hoc test with Bonferroni correction to identify which specific group pairs differ — all formatted in APA 7 style.

When to use the Kruskal-Wallis H Test

When not to use it

Worked example

GroupnMedianIQRMean Rank
Participative357.56.0–8.568.2
Democratic356.55.0–8.055.7
Autocratic354.03.0–5.532.6

How to report it (APA 7)

A Kruskal-Wallis H test was conducted to compare job satisfaction scores across three management styles. Satisfaction differed significantly across conditions, H(2) = 14.73, p = .001, ε² = .19. Dunn's post-hoc test with Bonferroni correction revealed that participative management (Mdn = 7.5) produced significantly higher satisfaction than autocratic management (Mdn = 4.0, p = .003).

Frequently asked questions

Is the Kruskal-Wallis test free on StatRyx?

Yes. You can run it without an account (3 free analyses), and a free account adds 10 more — a one-time allowance, no payment needed. Every result includes the APA 7 write-up. Paid plans (Student from $9/month) add more analyses and Word, PDF and Excel export.

Do I need to code to run a Kruskal-Wallis test?

No coding required. Describe your groups and outcome in plain English and StatRyx handles all the ranking, test calculation, and post-hoc comparisons automatically.

What sample size do I need for a Kruskal-Wallis test?

The Kruskal-Wallis test can be used with as few as 5 participants per group, though power increases with larger samples. For adequate power to detect a medium effect across three groups at α = .05, aim for at least 20–30 participants per group.

Which post-hoc test does StatRyx use after Kruskal-Wallis?

StatRyx uses Dunn's test with Bonferroni correction by default. Dunn's test is specifically designed for follow-up pairwise comparisons after a significant Kruskal-Wallis, preserving ranks and controlling the familywise error rate.

What is epsilon-squared (ε²) and how large should it be?

Epsilon-squared (ε²) is the effect size for Kruskal-Wallis, ranging from 0 to 1. Values of .01, .06, and .14 are interpreted as small, medium, and large effects respectively — the same thresholds as ANOVA's eta-squared. Always report it alongside H and p in APA style.

Run a Kruskal-Wallis H Test on your data →

Related analyses