The rank test that is not a test of medians, however often it is called one.
Does one sample tend to exceed the other
Both medians are 4. The test rejects anyway.
U = 95.00000 over 19 and 19 observations
p = 0.010424
A random value from sample 1 exceeds one from sample 2 73.68% of the time, against 50% under the null. z = 2.56145.
U₁
266.00000
U₂
95.00000
P(X > Y)
73.684%
what the test actually measures
Rank-biserial r
0.473684
effect size, −1 to +1
Median 1
4.00000
Median 2
4.00000
Both medians are 4.00000, and the test rejects at p = 0.01042. This is why calling Mann-Whitney “a test of medians” is wrong. It tests whether P(X > Y) differs from 0.5 — here it is 73.7% — and that is a statement about which sample tends to be larger, not about where either one is centred. The two coincide only when the distributions have the same shape and differ purely by a shift, which these do not.
29 tied values, so the variance carries the tie correction: 33.379574 rather than 34.252737. Ties reduce the spread of U, so the uncorrected formula overstates it and the test comes out conservative — a real p-value smaller than the one reported. On discrete or rounded data, where ties are the norm rather than the exception, that gap matters, and many implementations skip it silently.
The means are 5.89474 and 2.57895, a gap of 3.31579. Ranks discard magnitude entirely, so this test is unaffected by how far out the extreme values are — only by their order. That is what makes it robust, and also what makes it blind to the size of a difference. Report the rank-biserial correlation or P(X > Y) as the effect size; U itself scales with the sample sizes and is not comparable across studies.
What this tool shows
Almost every source calls this a test of medians. It is not. It tests whether P(X > Y) differs from 0.5. The default dataset has identical medians of 4 and the test rejects at p ≈ 0.01, so both medians are always shown alongside the result.
U, z and the two-sided p-value
The tie correction to the variance, applied by default
P(X > Y) — what the test actually measures
Rank-biserial correlation as the effect size
Both medians, and a warning when they agree anyway
Both means, and what it means when they disagree with the ranks
Not a median test Tie correction applied Effect size included Midrank handling
Updated 8 September 2026 · Works in any browser, no installation
The Mann-Whitney U test asks whether one sample tends to produce larger values than the other. It works on ranks, so it makes no assumption about the shape of the distributions — and what it tests is stochastic ordering, P(X > Y) ≠ 0.5, which is a different claim from “the medians differ”.
At a glance
Formula shown
Rank all N = n₁ + n₂ observations together using midranks for ties. U₁ = R₁ − n₁(n₁+1)/2, where R₁ is the rank sum of sample 1. Under the null, U has mean n₁n₂/2 and variance n₁n₂(N+1)/12, reduced by a tie correction when tied values are present. U₁/(n₁n₂) is exactly P(X > Y) with ties counted as half.
Scenario support
Comparing two groups when the data is skewed, ordinal or has outliers; Likert-scale responses; reaction times; any comparison where a t-test’s normality assumption is doubtful; small samples where the shape cannot be checked.
Educational estimate
Planning support from the values you enter — not professional advice.
It is not a test of medians
This is the most widespread misdescription of any common statistical test, and it is easy to disprove.
Load the default dataset. Nineteen values in each sample. Both medians are exactly 4. The test returns z = 2.56 and p ≈ 0.010, comfortably rejecting.
What it actually tests is P(X > Y). Pick one value at random from each sample; the null hypothesis is that either is equally likely to be larger. Here sample 1 wins 73.7% of the time. That is a real, large difference — and it has nothing to do with where either sample is centred.
U is that probability, directly. U₁/(n₁n₂) equals P(X > Y) with ties counted as half, exactly. The test statistic is the effect size, which is unusual and useful.
The median reading requires an extra assumption — that the two distributions have the same shape and differ only by a shift in location. Under that assumption a difference in stochastic ordering is a difference in medians, and the usual description is fair. The assumption is rarely stated and frequently false: different spreads, different skews or different shapes all break it.
So report it as what it is. “Sample 1 tended to be higher (p = 0.01, P(X > Y) = 0.74)” is accurate and no harder to read. “The medians differed significantly” can be false while the p-value is real.
The tie correction most implementations skip
The textbook variance of U is n₁n₂(N + 1)/12, and it is only right when no two observations are equal.
Ties reduce the spread of U. Tied values share a midrank, which removes some of the variation the formula assumes is there. So the uncorrected variance is too large, the z statistic too small, and the test conservative — the true p-value is smaller than the one reported.
On the default dataset the correction moves the standard deviation from 34.25 to 33.38. Small, and it is the direction that matters: the uncorrected version understates the evidence, and the gap widens as ties multiply.
This matters most where the test is most used. Likert scales, counts, rounded measurements, ratings out of ten — discrete data is full of ties, and it is exactly the data whose non-normality sends people to a rank test in the first place. A tool that omits the correction is conservative on precisely the cases it was chosen for.
With many ties, an exact permutation test is better still. The normal approximation assumes U is roughly normal, which needs both samples above about eight and degrades when ties dominate. Below that, exact tables or a permutation approach avoid the approximation entirely.
When to prefer it over a t-test
The choice is usually framed as normal versus non-normal, and that framing is too crude.
Use it for genuinely ordinal data. Likert responses, rankings, severity grades. A t-test on a five-point scale treats the gap between “agree” and “neutral” as a real distance equal to the next one, which the scale does not promise. Ranks make no such claim.
Use it when outliers would dominate. Ranks discard magnitude, so one extreme value moves the result by one rank position rather than by its full distance. That is robustness in the precise sense — and it is also the cost, since a genuinely enormous effect looks the same as a moderate one.
Do not use it merely because a normality test failed. The t-test is about the sampling distribution of the mean, not the data, and with moderate samples the central limit theorem does most of the work. A significant Shapiro-Wilk on n = 200 detects a deviation too small to matter.
It is not always less powerful. The common belief that a rank test sacrifices power is only true under normality, and even there the loss is about 5%. On heavy-tailed or skewed data Mann-Whitney is frequently more powerful than a t-test, sometimes considerably.
The real limitation is what it reports. A t-test gives a difference in means with a confidence interval, in the data’s own units. Mann-Whitney gives a probability of superiority, which is honest but harder to act on. When both are defensible, the t-test’s output is more useful; when it is not defensible, this is the right tool.
Reporting it usefully
U itself is not comparable across studies — it scales with both sample sizes, so a U of 266 means nothing without n₁ and n₂. Three better options.
P(X > Y) is the most interpretable. “A randomly chosen patient on the treatment did better than a randomly chosen control 74% of the time” is a sentence anyone can weigh, and it is U divided by n₁n₂. It is sometimes called the common language effect size, for exactly that reason.
The rank-biserial correlation puts it on the familiar −1 to +1 scale. It is 2⋅P(X > Y) − 1, so 0 is no effect and ±1 is complete separation. Convenient for meta-analysis and for readers used to a correlation coefficient.
The Hodges-Lehmann estimator is the matching point estimate — the median of all pairwise differences between the two samples. It is the location shift the test is implicitly about, and unlike the difference in medians it comes with a confidence interval that inverts the test itself.
Report both medians regardless, and both means. When they disagree with the ranks, that disagreement is the finding: a few extreme values can carry a mean while contributing one rank each. The tool prints all four and says when they point different ways, because that is the case most likely to be written up wrongly.
Paired data needs a different test entirely
The most common misuse of this test is not misreading its result — it is applying it to data that is paired.
Mann-Whitney assumes the two samples are independent. Different people, different items, no correspondence between the first value in one list and the first in the other. Feed it before-and-after measurements on the same subjects and it throws away the pairing, which is the most informative structure the data has.
The cost is power, and it can be large. Paired data removes between-subject variation — the fact that some people simply score higher than others on everything. A treatment that reliably adds two points to every person is obvious in the paired differences and can be invisible in the pooled ranks, because the between-person spread swamps it.
The Wilcoxon signed-rank test is the paired counterpart. It ranks the absolute differences within each pair and attaches the sign, so it uses the pairing the way a paired t-test does while still making no normality assumption.
The names cause real confusion here. The Mann-Whitney U test is also called the Wilcoxon rank-sum test, and it is a completely different procedure from the Wilcoxon signed-rank test. Two tests, one surname, opposite designs — and software menus list them adjacently.
The check is structural, not statistical. Ask whether removing one observation forces you to remove another. If it does, the data is paired and this is the wrong tool, however the numbers look.
Method. Ranks use midranks, so tied values share their average rank rather than being broken arbitrarily, and the variance carries the standard tie correction — without it the test is conservative on exactly the discrete data it is most often chosen for. U is reported alongside P(X > Y), which it equals after dividing by n₁n₂, and the rank-biserial correlation, which is the same quantity rescaled to −1 to +1. Both medians and both means are always shown, and the tool states explicitly when the medians agree while the test rejects. The suite asserts that exact case — two nineteen-value samples with medians both 4, z = 2.5614 and P(X > Y) = 0.7368 — so the page cannot decay into calling this a median test. It also asserts that U₁ + U₂ = n₁n₂ identically, that the tie-corrected standard deviation never exceeds the uncorrected one, and that reversing the samples negates the rank-biserial correlation exactly. That engine is verified on every change against 115 assertions. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
t-testOne-sample, two-sample and paired t-tests defaulting to Welch, with Student's pooled version printed beside it — and a warning when the two disagree on the verdict.
One-Way ANOVAThe full F table with eta and omega squared, plus every pairwise gap — because a significant F says something differs and never says which, and ten groups tested pairwise carry a 90% false-positive rate.
Correlation CoefficientReports Pearson, Spearman and Kendall together with the scatter plot, and ships Anscombe's quartet built in — four datasets with an identical r of 0.816 that Spearman tells apart.
p-valueA p-value from a t or z statistic, one- or two-tailed — with a panel that holds an effect fixed and grows the sample, so you can watch significance appear from nothing but n.
Effect SizeCohen d, Hedges g and the overlap between groups, with a sample-size control that moves the p-value while leaving the effect size fixed — the same d gives t = 1.29 at n=30 and 23.57 at n=10,000.
Mean, Median and ModeAll three centres marked on your own data, every mode rather than just the first, and the mean-median gap read as a direct measure of skew.
An educational tool. The Mann-Whitney test compares stochastic ordering rather than medians — reading it as a median test requires the additional assumption that both distributions have the same shape, which is rarely stated and frequently false.
Published a Mann-Whitney calculator that contradicts the description almost every source gives it. This is not a test of medians: it tests whether the probability that one sample exceeds the other differs from a half, and the default dataset has medians both exactly 4 while the test rejects at p of about 0.010.
Shows both medians and both means alongside the result, and says explicitly when the medians agree while the test separates the samples.
Applies the tie correction to the variance, which many implementations skip. Ties shrink the spread of U, so the uncorrected formula makes the test conservative on exactly the discrete and rounded data a rank test is usually chosen for.
Reports the probability of superiority and the rank-biserial correlation as the effect size, since U itself scales with both sample sizes and is not comparable across studies.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.