Kruskal-Wallis Test Calculator
Reviewed by CalcMulti Editorial Team·Last updated: ·← Statistics Hub
The Kruskal-Wallis test is the non-parametric alternative to one-way ANOVA. It tests whether two or more independent groups come from the same distribution, without requiring normality or equal variances.
Enter data for 2 to 5 groups. The calculator computes the H-statistic (approximated to chi-square with k−1 degrees of freedom) and p-value. Use this test when ANOVA assumptions (normality, homogeneity of variance) are clearly violated.
Formula
H = [12 / N(N+1)] × Σ(R_j² / n_j) − 3(N+1)
- N
- total number of observations across all groups
- n_j
- number of observations in group j
- R_j
- sum of ranks for group j (all values pooled and ranked together)
- k
- number of groups; df = k − 1
Enter Group Data
Kruskal-Wallis vs One-Way ANOVA
| Feature | Kruskal-Wallis | One-Way ANOVA |
|---|---|---|
| Normality required? | No | Yes (or large n by CLT) |
| Equal variances? | Not required | Recommended (Levene test) |
| Tests | Distributions (location) | Means |
| Works with ordinal? | Yes | No |
| Statistical power | Slightly lower for normal data | Highest for normal data |
| Post-hoc test | Dunn's test (Bonferroni) | Tukey's HSD, Bonferroni |
Related Calculators
Parametric one-way ANOVA (assumes normality)
Mann-Whitney U CalculatorNon-parametric test for two independent groups
Wilcoxon Signed-Rank TestNon-parametric test for paired data
Normality Test CalculatorDecide if you need non-parametric methods
Chi-Square CalculatorChi-square test for categorical data
Statistics HubAll statistics calculators
Disclaimer
For educational and exploratory use only. The chi-square approximation is accurate for n_j ≥ 5 per group.