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

FeatureKruskal-WallisOne-Way ANOVA
Normality required?NoYes (or large n by CLT)
Equal variances?Not requiredRecommended (Levene test)
TestsDistributions (location)Means
Works with ordinal?YesNo
Statistical powerSlightly lower for normal dataHighest for normal data
Post-hoc testDunn's test (Bonferroni)Tukey's HSD, Bonferroni

Disclaimer

For educational and exploratory use only. The chi-square approximation is accurate for n_j ≥ 5 per group.

Frequently Asked Questions