Percentages and Math

Mann-Whitney U Test Calculator

Paste the values for two groups to test whether one tends to be larger than the other.

Your numbers

Separate the numbers with commas, spaces or new lines. Example data.

Example data.

More options

Result

P value (two-sided)

0.009324

Exact, from every possible arrangement of the ranks.

P value
0.009324
U for group A
50
U for group B
6
z (normal approximation)
2.4881
P value, exact
0.009324
P value, normal approximation
0.012841
Rank-biserial correlation
0.7857
Chance a random A value beats a random B value
89.3%

Groups

GroupValuesMedianRank sumU
Group A7247850
Group B815.5426
How this was calculated
  1. Rank all 15 values together from smallest to largest, giving tied values the average of their ranks.
  2. Rank sum of group A = 78. U for A = rank sum - n(n + 1) / 2 = 78 - 28 = 50, and U for B = 7 x 8 - 50 = 6.
  3. With no tied values and small samples, the p value counts how many of the equally likely rank arrangements give a U at least this far from the middle.
  • The test compares ranks, so it needs no normal distribution, but it assumes the observations are independent and the two groups are measured on the same scale. A small p value says the groups differ in rank, not by how much, and it does not show a cause.

Calculated using SumPanda.com · https://sumpanda.com/mann-whitney-u-test-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the mann-whitney u test calculator

  1. Paste the values for group A and group B, separated by commas, spaces or new lines. The examples show how.
  2. Choose the alternative: two-sided asks whether the groups differ at all, while the one-sided options ask whether A tends to be higher or lower than B.
  3. Open the options if you want to turn off the continuity correction used with the normal approximation.
  4. Read the p value, the U statistics, the rank sums and the effect sizes. For small samples without ties the exact p value is shown first.

Formula

rank all values together, giving tied values the average of their ranks

U for A = rank sum of A - n1 (n1 + 1) / 2, and U for B = n1 x n2 - U for A

mean of U = n1 n2 / 2, variance = n1 n2 / 12 x ((N + 1) - sum of (t^3 - t) / (N (N - 1)))

z = (U - mean of U - 0.5) / standard deviation, p from the normal curve

The exact p value counts how many of the equally likely arrangements of the ranks give a U at least as extreme. It is used when there are no ties and the samples are small. Otherwise the normal approximation with a tie correction is used.

Seven values against eight

Group A is 19, 22, 16, 29, 24, 31, 27 and group B is 20, 11, 17, 12, 21, 14, 18, 9. A has a rank sum of 78, so U for A is 78 - 28 = 50 and U for B is 7 x 8 - 50 = 6. The two-sided exact p value is 0.009324, and the normal approximation with continuity correction gives z = 2.488 and p = 0.012841.

The rank-biserial correlation is (50 - 6) / 56 = 0.7857, and the chance that a random value from A is larger than a random value from B is 50 / 56 = 89.3%. The medians are 24 and 15.5. The one-sided exact p value that A tends higher is 0.004662.

What the test compares

The Mann-Whitney U test, also called the Wilcoxon rank sum test, asks whether a random value from one group tends to be larger than a random value from the other. It works on ranks, so it does not assume a normal distribution and is not thrown off by one extreme value the way a t test can be.

If the two groups have the same shape, a significant result also means their medians differ, but in general it is a statement about which group tends to be larger. For comparing means with a t test, see the P Value Calculator, and for three or more groups the ANOVA Calculator.

Reading the result

A small p value says the difference in ranks is unlikely if the groups were really the same. It does not say how large or important the difference is, which is what the rank-biserial correlation and the chance that A beats B describe. Independence matters: if the same people appear in both groups, a paired test is the right choice.

More statistics tools

For related statistical tests and measures, try the Fisher Exact Test Calculator, P Value Adjustment Calculator and Cohen's d Calculator.

Assumptions and limits

  • The observations are independent, and each group is a separate sample.
  • The values can be ordered, and both groups are measured on the same scale.
  • The exact p value is shown only when there are no ties and the samples are small.
  • Group data are examples until you replace them.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

When should I use the Mann-Whitney U test instead of a t test?

Use it when the data are skewed, have outliers, or are ordinal ratings, or when the samples are small and you do not want to assume a normal distribution. It compares ranks instead of means.

What does U mean?

U counts, over every pair made of one value from each group, how often the value from that group is larger, with ties counting half. The two U values add up to n1 times n2.

What is the exact p value?

It lists every way the ranks could be shared between the groups, assuming they are all equally likely, and finds the share that is at least as extreme as yours. It needs no normal approximation.

How do ties change the test?

Tied values get the average of their ranks and the standard deviation is reduced to match. The exact p value does not apply with ties, so the corrected normal approximation is used.