Kruskal-Wallis Test Calculator
Compare two or more groups by rank, with the tie-corrected H and its chi-square p-value.
Kruskal-Wallis Test Calculator
Compare two or more groups by rank, with the tie-corrected H and its chi-square p-value.
What the page prints, and what it refuses
Every figure is printed with the rule or formula that produced it, and any numerical tolerance is stated on the result rather than implied. The page refuses an input the formula does not define and names the value it read; it prints no answer it cannot support.
The calculation runs entirely in this browser tab; nothing is uploaded.
The page ranks every value across all groups and asks whether the group rank sums differ. Three groups of 1–3, 4–6 and 7–9 give H = 7.2 with two degrees of freedom and p = 0.0273.
Ties share the average of the ranks they span, and the statistic is divided by the tie correction. The page prints the correction and the uncorrected H, so a tied data set is not quietly treated as untied.
Why the statistic is chi-square
H = 12 ÷ (N(N + 1)) · Σ Rᵢ²/nᵢ − 3(N + 1), where Rᵢ is a group's rank sum. Under the null that all groups come from one distribution, H is approximately chi-square with k − 1 degrees of freedom.
The tie correction divides H by 1 − Σ(t³ − t) ÷ (N³ − N), summed over tied groups of size t. The page applies it whenever ties exist and prints the factor, so the adjustment is visible.
How to use Kruskal-Wallis Test Calculator
Enter one group per line, with that group's values comma-separated. Every group may have a different size.
Press Run. The result prints the corrected H, p, df, the group and value counts, the correction and the uncorrected H.
What to Expect
Best for
- Comparing three or more groups without a normality assumption
- Checking a non-parametric test by hand
- Seeing the effect of ties on H
Not ideal for
- Two groups, where the Mann–Whitney page is the direct test
- A repeated-measures design
- A post-hoc pairwise comparison, which this page does not run
What this tool keeps
- Every value and its group
What may need cleanup
- Nothing: H and p are final numbers
Common errors
- Fewer than two groups is refused
- An all-identical column is refused as undefined
Example use cases
- Test three groups of three
- Check a tied data set
- Compare with a one-way ANOVA
Sample input
1,2,3 / 4,5,6 / 7,8,9
Sample output
H = 7.2, df = 2, p = 0.0273, tie correction 1
Who this is for
- Researchers with ordinal data
- Students comparing rank tests
Frequently asked questions
When should I use this instead of ANOVA?
When the data are ordinal or clearly non-normal and the groups are independent. The page tests ranks, so it does not assume a normal distribution or equal variances.
What does the tie correction do?
It rescales H upward when values repeat, because tied ranks carry less information than distinct ones. A correction of 1 means no ties were present.
Does a significant H say which group differs?
No. It says at least one group differs. Finding which pair needs a post-hoc test, which this page does not run.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.