How this calculation works
Pool all measurements, assign average ranks to tied observations and sum ranks within each original group. Correct the H statistic for pooled ties before using the approximate chi-square reference.
H = (12/(N(N+1)) × sum(rank sum²/group n) − 3(N+1)) / tie correctionA worked example
Groups [1,2,3], [4,5,6] and [7,8,9] have rank sums 6, 15 and 24. With no ties, H = 7.2 on two degrees of freedom and approximate p = exp(−3.6).
Good to know
Independent samples and approximate inference only. A location or median interpretation needs comparable shapes. No exact/permutation method, post-hoc tests or causal conclusion.
Reference: R statistical documentation: Kruskal–Wallis test (opens in a new tab) ↗
Ranks come from the combined observations
Ranking each group independently would erase the between-group ordering being tested. The page pools all values first and then returns rank sums to their original groups.
Equal numerical values receive the average of their occupied rank positions. The same tie groups also determine the correction factor.
The one way anova groups calculator adds compare group means with a classical one-way ANOVA, showing between/within sums, F, degrees of freedom and eta-squared with explicit assumptions.
The tie correction matters
Repeated observations reduce rank dispersion. The correction adjusts the uncorrected H statistic to reflect those pooled ties rather than pretending every rank is distinct.
If every value is tied, no rank dispersion remains and the correction is zero. The page rejects that degenerate calculation instead of dividing by zero.
Interpret the hypothesis and approximation carefully
The p value uses a chi-square approximation, which can be unsuitable with very small groups. An exact or permutation procedure can answer a different computational version of the question.
Different group shapes can affect rank comparisons. Without a compatible shape assumption, do not read the output as a pure test of medians.
Use the result with the next measurement
The one way ANOVA groups calculator compares means on the original scale. Its variance assumptions and effect-size summary differ from this pooled-rank calculation.
Independent samples and approximate inference only. A location or median interpretation needs comparable shapes. No exact/permutation method, post-hoc tests or causal conclusion.
A few questions, answered
Are ranks assigned within groups?
No, values are pooled before ranking.
How are ties handled?
Average ranks and a pooled tie correction.
Is the p value exact?
No, it uses a chi-square approximation.