The KruskalWallis test calculator is designed to compare the medians of three or more independent treatments (groups).
The following formula is used to compute the KruskalWallis Hstatistic:
H = 

Σ 

 B(N + 1) 
Where,
N = Total number of data points,
R_{i} = Sum of ranks of the i^{th} group,
n_{i} = Number of data points (observations) in the i^{th} group.
Let's understand the stepbystep calculation with an example.
Compute the Hstatistic and Pvalue for the following groups:
Step 1: Rank the data:
First, assign ranks to all the values from all the groups.
Group  Value  Rank 

Group 3  5  1 
Group 3  6  2 
Group 1  10  3 
Group 2  12  4 
Group 3  14  5 
Group 1  15  6 
Group 1  23  7 
Group 2  26  8 
Group 2  32  9 
Step 2: Find the sum of ranks for each group:
R_{1} = 3 + 6 + 7 = 16.
R_{2} = 4 + 8 + 9 = 21.
R_{3} = 1 + 2 + 5 = 8.
N = 9 (Total number of observations).
Step 3: Substitute values into the formula:
H = 

Σ 

 B(N + 1) 
= 

( 

+ 

+ 

)   3(9 + 1) 
= 

( 

+ 

+ 

)   30 
H = 3.82222
Also, you can find the Pvalue using the Pvalue from ChiSquare Score Calculator by entering the ChiSquare Score (H) = 3.82222 and the Degrees of Freedom (DF) = k  1 = 3  1 = 2. Where, k = number of groups.
As a result, we get:
Pvalue = 0.1479