Mann-Whitney U Test Calculator Formula

Understand the math behind the mann-whitney u test calculator. Each variable explained with a worked example.

Formulas Used

U Statistic

u1 = n1 * n2 + (n1 * (n1 + 1)) / 2 - r1

U2 Statistic

u2 = n1 * n2 - (n1 * n2 + (n1 * (n1 + 1)) / 2 - r1)

Z Approximation

z_approx = (n1 * n2 + (n1 * (n1 + 1)) / 2 - r1 - n1 * n2 / 2) / sqrt(n1 * n2 * (n1 + n2 + 1) / 12)

Variables

VariableDescriptionDefault
n1Sample 1 Size10
n2Sample 2 Size12
r1Rank Sum of Sample 185

How It Works

Mann-Whitney U Test

U = n1*n2 + n1*(n1+1)/2 - R1

Compares two independent groups without assuming normality.

Worked Example

n1=10, n2=12, R1=85.

n1 = 10n2 = 12r1 = 85
  1. 01U1 = 120 + 55 - 85 = 90
  2. 02U2 = 120 - 90 = 30

Ready to run the numbers?

Open Mann-Whitney U Test Calculator