Kruskal-Wallis H Test Calculator
Compare three independent groups with a rank-based nonparametric test and get the H statistic, degrees of freedom, and p value instantly.
About the Kruskal-Wallis H test
Kruskal-Wallis examples
| Groups | Result | Interpretation |
|---|---|---|
| 1,2,3 | 4,5,6 | 7,8,9 | H = 7.2, p = 0.027324 | Clearly ordered groups produce a significant overall result. |
| 1,4,7 | 2,5,8 | 3,6,9 | H = 0.8, p = 0.670320 | Interleaved ranks provide little evidence of a group difference. |
| 2,2,4 | 3,3,5 | 4,4,6 | Tie-corrected test | Repeated values receive average ranks and a tie correction. |
How to use the Kruskal-Wallis calculator
- Enter the observations for the first independent group, separated by commas or spaces.
- Enter matching numeric data for the second and third independent groups.
- Click Calculate H Test to rank the pooled observations and compute the tie-corrected statistic.
- Compare the p value with your chosen significance level and review the interpretation.
Kruskal-Wallis test FAQ
When should I use the Kruskal-Wallis test?
Use it to compare three or more independent groups when a one-way ANOVA's distribution assumptions are doubtful. It is also suitable for ordinal outcomes that can be meaningfully ranked.
Does a significant result show which groups differ?
No. A significant H statistic only indicates that at least one group differs, so post-hoc pairwise tests are needed to locate the differences.
Does the test compare medians?
It compares group rank distributions. It can be interpreted as a median comparison when the group distributions have similarly shaped spreads.
How are tied values handled?
Tied observations receive their average rank. The H statistic is then divided by the standard tie-correction factor to preserve the chi-square approximation.
What assumptions does the test make?
Observations must be independent within and between groups, and the response should be at least ordinal. Representative sampling is also important for generalizing the conclusion.