Kruskal-Wallis H Test Calculator
Enter one group per line. Separate numbers by commas or spaces. Example:
5, 7, 8, 610, 12, 9, 114, 3, 5, 6
What this Kruskal-Wallis calculator does
This tool runs a Kruskal-Wallis test, a nonparametric alternative to one-way ANOVA. It compares three or more independent groups using ranks rather than raw values, which makes it useful when your data are skewed, ordinal, or violate normality assumptions.
When to use the Kruskal-Wallis test
- You have independent groups (different participants/items in each group).
- Your outcome is at least ordinal (rankable).
- Normality is questionable, or outliers make ANOVA risky.
- You want to test whether at least one group differs from the others.
How the statistic is computed
1) Pool and rank all observations
All values across groups are combined and ranked from smallest to largest. Tied values receive the average of their rank positions.
2) Compute the H statistic
The test statistic is:
H = (12 / (N(N+1))) * Σ(Rᵢ² / nᵢ) - 3(N+1)
where Rᵢ is the rank sum in group i, nᵢ is group size,
and N is total sample size.
3) Apply tie correction
If ties exist, the calculator applies the standard correction factor:
C = 1 - Σ(t³ - t)/(N³ - N), then uses H/C.
4) Approximate p-value
The p-value is computed from a chi-square distribution with
df = k - 1, where k is the number of groups.
Interpreting results
- Small p-value (p < α): reject the null hypothesis; at least one group differs.
- Large p-value (p ≥ α): not enough evidence for a difference among group distributions.
- The test does not identify which groups differ. Use post-hoc tests (e.g., Dunn's test) for pairwise follow-up.
Assumptions and caveats
- Observations should be independent.
- Groups should have similarly shaped distributions for median-focused interpretation.
- Very small samples reduce power and can make asymptotic p-values less accurate.
Quick workflow
- Paste your groups (one per line).
- Set alpha, usually 0.05.
- Click Calculate.
- Read H, degrees of freedom, p-value, and decision statement.