Kruskal-Wallis H-Test (3-Group Non-Parametric One-Way ANOVA by Ranks) Calculator

Compute Kruskal-Wallis H statistic, χ²(2) significance, and ε² / η²_H effect size.

Kruskal-Wallis H Statistic (df = 2)
9.29 H
Inferred Group 3 Rank Sum (R₃) 215 R₃
Epsilon-Squared Effect Size (ε²) 0.32 ε²
Critical χ²(df=2, α=0.05) Threshold 5.991 χ²_crit
Inputs
⚡ Scenarios:
n per group
Sample size per group (n₁ = n₂ = n₃ = n; total N = 3n).
R₁
Sum of ranks in Group 1 (R₁).
R₂
Sum of ranks in Group 2 (R₂; R₃ is inferred from N(N+1)/2 − R₁ − R₂).
Results & Graph
Kruskal-Wallis H Statistic (df = 2)
9.29 H
Inferred Group 3 Rank Sum (R₃)
215 R₃
Epsilon-Squared Effect Size (ε²)
0.32 ε²
Critical χ²(df=2, α=0.05) Threshold
5.991 χ²_crit

Kruskal-Wallis H Statistic (df = 2)

Graph 1 • Kruskal-Wallis H-Test • Domain Architecture & Live Telemetry Maps Per Group Sample Size N, Group1 Rank Sum R1, Group2 Rank Sum R2 through Kruskal-Wallis H-Test Formula.
Kruskal-Wallis H Statistic (df: 9.29 H Kruskal-Wallis H-Test • Invariants & Metrics Kruskal-Wallis H Statistic ( 9.29 H Inferred Group 3 Rank Sum (R 215 R₃ Epsilon-Squared Effect Size 0.32 ε² Critical χ²(df=2, α=0.05) Th 5.991 χ²_crit
Graph 2 • Kruskal-Wallis H Statistic (df = 2) Across Per Group Sample Size N Sweep (40% → 160%) Evaluates H = [ 12 / (N(N + 1)) ] × Σ (R_i² / n_i) − 3(N + 1); ε² = H / ((N² − 1 across 7 operating points (current input highlighted).
0 H 328.3 H 656.6 H 596.9 4 136.5 6 13.88 8 9.29 10 43.73 12 89.06 14 137.0 16
Graph 3 • Joint Sensitivity: Per Group Sample Size N × Group1 Rank Sum R1 Compares Kruskal-Wallis H Statistic (df = 2) when Group1 Rank Sum R1 is shifted +25% (solid) vs. −25% (dashed).
0 H 43.26 H 86.53 H --- Group1 Rank Sum R1 @ 75% 75.70 -30% 2.41 -15% 3.38 +0% 33.11 +15% 54.19 +30%
Summary: Across 3 groups of n=10 (N=30, rank sums 95, 155, 215), Kruskal-Wallis H(2) = 9.29 (Significant p < 0.05 (H ≥ 5.991)) with ε² = 0.32.
Summary: Across 3 groups of n=10 (N=30, rank sums 95, 155, 215), Kruskal-Wallis H(2) = 9.29 (Significant p < 0.05 (H ≥ 5.991)) with ε² = 0.32.
Interactive chart & math engine powered by CalculatorGraph

Formula & Mathematical Methodology: Kruskal-Wallis H-Test Formula

H = [ 12 / (N(N + 1)) ] × Σ (Ri² / ni) − 3(N + 1)
ε² = H / (N² − 1N + 1)
H = [ 12 / (N(N + 1)) ] × Σ (R_i² / n_i) − 3(N + 1); ε² = H / ((N² − 1) / (N + 1))
  • perGroupSampleSizeN: Per Group Sample Size N (n per group)
  • group1RankSumR1: Group1 Rank Sum R1 (R₁)
  • group2RankSumR2: Group2 Rank Sum R2 (R₂)

Rounding: Internal floating-point calculations run in 64-bit IEEE-754 double precision; display values round to 2–4 decimal places.

Worked Example: Worked Mathematical Example: Kruskal-Wallis H-Test

Compute Kruskal-Wallis H statistic, χ²(2) significance, and ε² / η²_H effect size.

  1. Specify the function parameters, matrix entries, or confusion matrix counts.
  2. Apply the closed-form or iterative formula: H = [ 12 / (N(N + 1)) ] × Σ (R_i² / n_i) − 3(N + 1); ε² = H / ((N² − 1) / (N + 1)).
  3. Examine the primary result, error bounds, and 3 interactive SVG plots.
Result: Computes Kruskal-Wallis H-Test via H = [ 12 / (N(N + 1)) ] × Σ (R_i² / n_i) − 3(N + 1); ε² = H / ((N² − 1) / (N + 1)).

Frequently Asked Questions

How does the Kruskal-Wallis H-Test (3-Group Non-Parametric One-Way ANOVA by Ranks) Calculator compute the solution?

It evaluates H = [ 12 / (N(N + 1)) ] × Σ (R_i² / n_i) − 3(N + 1); ε² = H / ((N² − 1) / (N + 1)) directly in your browser and updates three custom SVG visualizations in real time.

Can I solve backwards for an input parameter using Goal Seek?

Yes. Click "🎯 Goal Seek" in the results toolbar to solve backwards for any numeric input field.

Does this calculator run locally offline?

Yes. All calculations run 100% locally in your browser and work offline via the CalculatorGraph PWA.

Mathematics & Statistics · Non-Parametric & Hypothesis Testing

Kruskal-Wallis H-Test (3-Group Non-Parametric One-Way ANOVA by Ranks) Calculator: inputs, method, and how to read the result

Compute Kruskal-Wallis H statistic, χ²(2) significance, and ε² / η²_H effect size.

Choose inputs for the case you are checking

The defaults are illustrative. Replace them with values for your case and keep the units shown beside each field.

  • Per Group Sample Size N: Sample size per group (n₁ = n₂ = n₃ = n; total N = 3n).
  • Group1 Rank Sum R1: Sum of ranks in Group 1 (R₁).
  • Group2 Rank Sum R2: Sum of ranks in Group 2 (R₂; R₃ is inferred from N(N+1)/2 − R₁ − R₂).

What the calculation includes

With the default values shown, Kruskal-Wallis H Statistic (df = 2) is 9.29 H. The calculation follows Kruskal-Wallis H-Test Formula; the formula and variable definitions above show how the inputs combine.

One-input check: With the other defaults held constant, changing Per Group Sample Size N from 10 n per group to 11 n per group changes Kruskal-Wallis H Statistic (df = 2) from 9.29 H to 24.175 H. This is a comparison inside the calculator's stated model, not a prediction.

Where to use caution

  • Uses exact analytical or standard numerical analysis formulations from NIST DLMF.
  • Double-precision floating-point arithmetic has ~15–17 significant decimal digits of precision.

Scope: Global Mathematical & Statistical Standard Check the assumptions and limitations against your situation before relying on the estimate.

More in Mathematics & Statistics: Scientific Calculator, Statistics & Standard Deviation Calculator, Permutations, Combinations, Probability, Sample Size & P-Value Calculator.