How to use this calculator
Compare rank distributions across two or more independent groups using one pooled ranking.
- Enter Observations, Matching integer group labels. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Kruskal Wallis independent groups test explained
The Kruskal–Wallis test compares independent groups using pooled ranks. It tests for distributional differences; interpreting it as a median test also requires similarly shaped group distributions.
Inputs, symbols, and units
x— Observations- Observations. Use comma-separated values in the stated order.
g— Matching integer group labels- Matching integer group labels. Use comma-separated values in the stated order.
Formula and method
Tie-corrected pooled-rank H
H = [12/(N(N+1))] × Σ(Rⱼ²/nⱼ) − 3(N+1), then divide by the tie correction 1 − Σ(t³−t)/(N³−N). The asymptotic p-value uses χ² degrees of freedom equal to the group count minus one.
A worked scenario
Observations = 1, 2, 3, 4, 5, 6, 7, 8, 10; Matching integer group labels = 1, 1, 1, 2, 2, 2, 3, 3, 3.
- Kruskal–Wallis H: 7.2
- Degrees of freedom: 2
- Approximate p-value: 0.02732372
Assumptions and edge cases
Chi-square p-value is asymptotic; small group sizes and strongly differing shapes complicate interpretation.
Frequently asked questions
Is this repeated-measures ANOVA?
No, groups must be independent.
Does significance identify which groups differ?
No, follow-up comparisons require separate planning.
Are ties corrected?
Yes.
How do I use the Kruskal Wallis independent groups test calculator?
Enter Observations, Matching integer group labels. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Kruskal Wallis independent groups test?
Observations = 1, 2, 3, 4, 5, 6, 7, 8, 10; Matching integer group labels = 1, 1, 1, 2, 2, 2, 3, 3, 3. Kruskal–Wallis H: 7.2 Degrees of freedom: 2 Approximate p-value: 0.02732372
Method reference: SciPy kruskal definition.
Read our calculation methodology.