All tools

Kruskal-Wallis test

Kruskal-Wallis is the non-parametric alternative to one-way ANOVA. It compares three or more independent groups when the data aren’t normal or the scale is ordinal, such as Likert. Instead of means, it compares ranks. Paste each group’s scores in its own box; you can add up to 8 groups.

Group 1
Group 2
Group 3

One per line, or separated by commas or spaces.

The calculation runs in your browser. We don’t store what you type.

How it’s calculated

All values are sorted together and ranked (1 for the smallest); ties get the average rank.

H = 12 / (N(N + 1)) × Σ (Rᵢ² / nᵢ) − 3(N + 1), where Rᵢ is each group’s rank sum. It is then divided by the tie correction, as in SPSS.

The p-value comes from the chi-square distribution with k − 1 degrees of freedom.

Pairwise comparisons use Dunn’s test with the Bonferroni correction, the same SPSS shows under "Pairwise Comparisons".

The effect size is epsilon squared: ε² = H / (N − 1).

How to read the result

  • p < 0.05: at least one group tends to have different values. Check the pairwise comparisons to see which.
  • Report each group’s median and mean rank, not the means.
  • Epsilon squared: 0.01 small, 0.06 medium and 0.14 large.

Frequently asked questions

Does it match SPSS?
Yes. H (which SPSS calls chi-square or "Test Statistic"), degrees of freedom and p-value match. Pairwise comparisons match the "Adj. Sig." in the model view.
Kruskal-Wallis or ANOVA?
If each group’s data are normal with similar variances, use ANOVA. If not, or with Likert scales, use Kruskal-Wallis.
How many values per group do I need?
At least 2, although with fewer than 5 per group the test almost never detects differences.
Is it for your thesis?See the step-by-step guide to running your thesis survey: sample, questionnaire, consent, pilot test and analysis.Thesis surveys

Know what you want to ask?

Build the survey in SurvIQ, share it by link, WhatsApp or QR code, and watch results come in live. The Free plan is free forever.

Create a free survey

More tools