All tools

Mann-Whitney U test

The Mann-Whitney U test is the non-parametric alternative to the t-test for two independent groups. Use it when the scores aren’t normal, the groups are small, or with ordinal scales such as Likert. Instead of comparing means, it compares ranks: whether one group tends to have higher values than the other.

Group A

One per line, or separated by commas or spaces. You can paste a column from Excel.

Group B

One per line, or separated by commas or spaces. You can paste a column from Excel.

The calculation runs in your browser. We don’t store what you type.

How it’s calculated

All values are sorted together and ranked (1 for the smallest). Ties get the average rank.

U₁ = R₁ − n₁(n₁ + 1) / 2, where R₁ is the rank sum of group A. U₂ = n₁n₂ − U₁, and U = the smaller of the two is reported, as in SPSS.

Z = (U − n₁n₂ / 2) / σ, with σ corrected for ties. The asymptotic p-value comes from the normal distribution, two-tailed and without continuity correction, as in SPSS.

When there are no ties and the groups are small, the exact p-value is also calculated by counting every possible arrangement.

The effect size is r = |Z| / √N, with N the total number of values.

How to read the result

  • p < 0.05: the two groups differ. Look at the mean ranks (or medians) to see which one tends to have higher values.
  • With small groups (under 20 each) and no ties, report the exact p-value.
  • Effect size r: 0.1 small, 0.3 medium and 0.5 large.

Frequently asked questions

Does it match SPSS?
Yes. U, Wilcoxon W, Z and "Asymp. Sig. (2-tailed)" match Analyze > Nonparametric Tests > Legacy Dialogs > 2 Independent Samples.
Why report the median and not the mean?
Because the test doesn’t compare means. The median and mean rank describe each group better when the data aren’t normal.
What if it’s the same people before and after?
Then the samples are paired and you need the Wilcoxon signed-rank test, not Mann-Whitney U.
Is it for your thesis?See the step-by-step guide to running your thesis survey: sample, questionnaire, consent, pilot test and analysis.Thesis surveys

Know what you want to ask?

Build the survey in SurvIQ, share it by link, WhatsApp or QR code, and watch results come in live. The Free plan is free forever.

Create a free survey

More tools