FreeStatisticalTools.com

Mann-Whitney U Test: When to Use It Instead of a T-Test (With Examples)

The nonparametric alternative to the independent t-test, explained with a worked example, effect size r and an APA-ready write-up.

4 min readNonparametric tests

The Mann-Whitney U test (also called the Wilcoxon rank-sum test) compares two independent groups when you cannot, or should not, compare their means with a t-test. Instead of means, it works with the ranks of the scores, which makes it a good choice for ordinal data, small skewed samples and data with outliers.

This guide explains when to choose it, what it actually tests, how to read the output and how to report it.

Free tool · runs in your browserMann-Whitney U Test CalculatorFree Mann-Whitney U test (Wilcoxon rank-sum) calculator with mean ranks, z, exact or asymptotic p-value and effect size r. For ordinal or skewed data.Run a Mann-Whitney U test →
In this guide
  1. When should you use the Mann-Whitney U test?
  2. What does the Mann-Whitney U test actually test?
  3. Assumptions
  4. How the U statistic is calculated
  5. Worked example
    1. Effect size r
  6. How to report the Mann-Whitney U test in APA 7
  7. Mann-Whitney U vs t-test: which has more power?
  8. Common mistakes
  9. Frequently asked questions

When should you use the Mann-Whitney U test?

Choose it over the independent samples t-test when:

  • your outcome is ordinal, for example a single 5- or 7-point Likert item, a pain rating or a ranking;
  • your sample is small (say, fewer than 20–30 per group) and clearly skewed;
  • there are outliers you cannot justify removing;
  • you are comparing things like waiting times, incomes or counts, which are often heavily right-skewed.

The design requirements are the same as for the independent t-test: two groups, and different people in each group. For two related measurements (the same people before and after), use the Wilcoxon signed-rank test. For three or more groups, use the Kruskal-Wallis test.

What does the Mann-Whitney U test actually test?

The test pools both groups, ranks all the scores from lowest to highest, and checks whether one group's ranks tend to be higher than the other's. Formally, it tests whether a randomly chosen score from group A is equally likely to be higher or lower than a randomly chosen score from group B.

It is often described as a "test of medians", but that is only true if the two distributions have the same shape (one is just shifted relative to the other). If the shapes differ, report it as a difference in rank distributions or mean ranks, not medians.

Assumptions

  1. Two independent groups.
  2. An outcome that is at least ordinal.
  3. Independent observations.
  4. For a median interpretation: similar distribution shapes in both groups.

Normality is not required.

How the U statistic is calculated

  1. Rank all N = n₁ + n₂ scores together. Tied scores get the average of the ranks they span.
  2. Add up the ranks in each group (R₁ and R₂).
  3. Compute U₁ = n₁n₂ + n₁(n₁ + 1)/2 − R₁, and U₂ = n₁n₂ − U₁.
  4. The test statistic U is the smaller of U₁ and U₂.

For larger samples, U is converted to a z-score (with a correction for ties), which gives the p-value. For small samples without many ties, an exact p-value is better. The free calculator chooses between exact and asymptotic p-values for you.

Worked example

A company asks customers to rate their support experience from 1 (very poor) to 7 (excellent). 18 customers used in-app chat and 20 used email. Because the outcome is a single rating item, the Mann-Whitney U test is appropriate.

GroupnMedianMean rank
In-app chat185.523.50
Email204.515.90

Result: U = 108, z = 2.15, p = .032.

Interpretation: customers who used in-app chat gave significantly higher ratings than customers who used email. Their mean rank was 23.50 compared with 15.90.

Effect size r

The usual effect size is r = z / √N:

r = 2.15 / √38 = .35

Cohen's rough benchmarks for r are .10 (small), .30 (medium) and .50 (large), so this is a medium effect. Some researchers report the rank-biserial correlation instead; both describe how strongly group membership relates to the ranks.

How to report the Mann-Whitney U test in APA 7

Report the medians (or mean ranks), U, z, the exact p-value and r.

How to report it (APA 7)

A Mann-Whitney U test showed that customers who used in-app chat rated their support experience higher (Mdn = 5.5) than customers who used email (Mdn = 4.5), U = 108, z = 2.15, p = .032, r = .35.

If the distributions have different shapes, report mean ranks instead of medians:

Mean-rank version

Ratings were higher in the chat group (mean rank = 23.50) than in the email group (mean rank = 15.90), U = 108, z = 2.15, p = .032, r = .35.

Mann-Whitney U vs t-test: which has more power?

A common worry is that nonparametric tests "lose power". When data really are normal, the Mann-Whitney U test is about 95% as efficient as the t-test, so you lose very little. When data are heavily skewed or have outliers, it can be considerably more powerful than the t-test. In other words, it is a safe choice when you are unsure.

Independent t-testMann-Whitney U test
ComparesMeansRank distributions
OutcomeContinuousOrdinal or continuous
Normality neededApproximately (or large n)No
Sensitive to outliersYesMuch less
Effect sizeCohen's dr or rank-biserial correlation

Common mistakes

  • Calling it a test of medians when the group distributions have clearly different shapes.
  • Using it for paired data. Before-and-after data from the same people need the Wilcoxon signed-rank test.
  • Leaving out the effect size. A p-value alone does not tell readers how big the difference is.
  • Running it on summed scale scores with large samples just because a normality test was significant. With large samples, the t-test is usually fine; look at the plots before deciding.

Frequently asked questions

Is the Mann-Whitney U test the same as the Wilcoxon rank-sum test?

Yes. They are two versions of the same test and give the same p-value. Note that the Wilcoxon signed-rank test is a different test, used for paired data.

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

Use it when the outcome is ordinal (such as a single Likert item), when samples are small and skewed, or when outliers would distort the means.

Does the Mann-Whitney U test compare medians?

Only if both groups have distributions of similar shape. Otherwise it compares the overall rank distributions, and you should report mean ranks.

How do I calculate the effect size for a Mann-Whitney U test?

Divide the z statistic by the square root of the total sample size: r = z / √N. Values around .10, .30 and .50 are commonly read as small, medium and large.

Cite the tool (APA 7)
Xavier, B. (2026). Mann-Whitney U Test Calculator [Web application]. FreeStatisticalTools.com. https://freestatisticaltools.com/mann-whitney-u-test-calculator/

Free tools used in this guide

Cite this article

If this guide helped your thesis, paper or class, please cite it. If you ran the analysis with one of our tools, cite the tool as well (each tool page has its own citation).

bibinxavier54 (2026, October 14). Mann-Whitney U Test: When to Use It Instead of a T-Test (With Examples). FreeStatisticalTools.com Blog. https://freestatisticaltools.com/blog/mann-whitney-u-test/

About bibinxavier54

Bibin Xavier is a researcher and the creator of FreeStatisticalTools.com, a set of free, browser-based statistics tools for students and researchers.

Author profile →

Ask a question or leave a comment

Your email address will not be published. Required fields are marked *