Kruskal-Wallis Test Calculator
Non-parametric one-way ANOVA on 3+ independent groups. Reports ranks, H (with tie correction), df and an exact chi-square p-value.
What is the Kruskal-Wallis test?
The Kruskal-Wallis H test is the rank-based counterpart of one-way ANOVA. It asks whether three or more independent samples come from the same distribution. Because it works on ranks rather than raw values it doesn't require normality and stays reliable when your data are ordinal, skewed or contain outliers.
H = 12 / (N(N + 1)) · Σ Rᵢ² / nᵢ − 3(N + 1), df = k − 1
Under the null hypothesis H is approximately chi-square with k − 1 degrees of freedom. When ties are present, H is divided by 1 − Σ(t³ − t)/(N³ − N) so the p-value stays accurate.
Features of this calculator
- Handles any number of groups (k ≥ 3) with unequal group sizes
- Average-rank method for ties, plus explicit tie correction to H
- Exact chi-square p-value from the k − 1 df approximation
- Editable α with automatic reject / fail-to-reject verdict
- Full step-by-step working (Given → Formula → Substitute → Answer)
- Per-group rank sums and full pooled ranking table on demand
+What is the Kruskal-Wallis test?
A non-parametric alternative to one-way ANOVA. It compares 3 or more independent groups by pooling all values, assigning ranks 1..N (average ranks for ties) and asking whether the average ranks differ more than chance would predict.
+When should I use Kruskal-Wallis instead of ANOVA?
Use it when the data are ordinal, clearly non-normal, or have strong outliers; or when at least one group is small so normality can't be checked. Because it only uses ranks it is robust to skew and outliers. If normality plus equal variances hold, ANOVA is more powerful.
+How is the H statistic computed?
H = 12/(N(N+1)) · Σ Rᵢ²/nᵢ − 3(N+1), where Rᵢ is the sum of ranks in group i, nᵢ is that group's size and N = Σnᵢ. With ties, H is divided by 1 − Σ(t³ − t)/(N³ − N) so the test isn't too conservative.
+What distribution gives the p-value?
Under H₀, H is approximately chi-square with k − 1 degrees of freedom, where k is the number of groups. This calculator reports the exact chi-square p-value from that approximation; for very small samples an exact permutation test is a little more accurate.
+What does a significant result mean?
It says the k groups do not all come from the same distribution — but it doesn't tell you which pairs differ. Follow up with Dunn's test or pairwise Mann-Whitney tests with a Bonferroni or Holm correction.