Kruskal-Wallis Test Calculator

Enter your group data (up to 5 groups) and significance level (α) to run the Kruskal-Wallis Test — a non-parametric alternative to one-way ANOVA. Paste or type comma-separated values for each group, and get back the H statistic, degrees of freedom, p-value, and a clear reject/fail-to-reject decision. Works without assuming normality, making it ideal for ordinal data or small samples with outliers.

Typically 0.05. Common values: 0.01, 0.05, 0.10.

Select how many groups you are comparing.

Enter values separated by commas, spaces, or new lines.

Enter values separated by commas, spaces, or new lines.

Leave blank if not using this group.

Leave blank if not using this group.

Leave blank if not using this group.

Results

H Statistic

--

P-Value

--

Degrees of Freedom (k−1)

--

Total Sample Size (N)

--

Decision

--

χ² Critical Value

--

Group Median Comparison

Results Table

Frequently Asked Questions

What is the Kruskal-Wallis test?

The Kruskal-Wallis test is a non-parametric statistical test used to determine whether there are statistically significant differences between two or more independent groups. It is the non-parametric equivalent of one-way ANOVA and works by ranking all observations together, then comparing mean ranks across groups. It does not assume a normal distribution.

What are the assumptions of the Kruskal-Wallis test?

The test assumes that observations are independent across groups, the dependent variable is at least ordinal, and the groups have similarly shaped distributions (though they don't need to be normal). Unlike ANOVA, it does not require equal variances or normality.

How is the Kruskal-Wallis H statistic calculated?

All observations across all groups are pooled and ranked. The H statistic is calculated as H = (12 / N(N+1)) × Σ(Rᵢ² / nᵢ) − 3(N+1), where N is the total sample size, Rᵢ is the sum of ranks in group i, and nᵢ is the sample size of group i. H follows a chi-squared distribution with k−1 degrees of freedom.

When should I use Kruskal-Wallis instead of one-way ANOVA?

Use Kruskal-Wallis when your data violates the normality assumption required by ANOVA, when you have ordinal data (e.g. Likert scale responses), when sample sizes are small, or when outliers are present that you cannot remove. It is a robust alternative that sacrifices some statistical power in exchange for fewer assumptions.

What does a significant Kruskal-Wallis result mean?

A significant result (p < α) indicates that at least one group's distribution differs from the others. It does not tell you which specific groups differ. To identify which pairs differ, you should follow up with a post-hoc test such as Dunn's test with a correction method like Bonferroni or Sidak.

What sample size do I need for the Kruskal-Wallis test?

The test works with small samples, but having at least 5 observations per group is generally recommended for the chi-squared approximation to be reliable. Very small groups (n < 5) may require exact p-value computation rather than the chi-squared approximation.

How do I interpret the p-value from this calculator?

If the p-value is less than your chosen significance level (α, typically 0.05), you reject the null hypothesis and conclude that at least one group is statistically different. If p ≥ α, you fail to reject the null hypothesis and conclude there is insufficient evidence of a difference between groups.

What is the difference between Kruskal-Wallis and Mann-Whitney U?

Mann-Whitney U is used to compare exactly two independent groups, while Kruskal-Wallis generalizes this to three or more groups. In fact, when only two groups are provided, the Kruskal-Wallis test produces results equivalent to the Mann-Whitney U test with normal approximation.

More Statistics Tools