You planned an independent-samples t-test, ran the normality check, and Shapiro-Wilk came back significant in one of your groups. With 25 participants per group, the Central Limit Theorem will not bail you out, so the comparison moves to the Mann-Whitney U test. The test itself takes about two minutes in SPSS once the data are set up correctly. Here is the full walkthrough: both dialog versions, the two output tables, the effect size SPSS refuses to calculate for you, and the exact sentence to paste into your results section.

When to Use Mann-Whitney U

Three conditions, all of which must hold. You have exactly two groups. The groups are independent, meaning no participant appears in both. And the dependent variable is either continuous but non-normal, or measured on an ordinal scale to begin with, such as a single 5-point satisfaction item or a symptom severity rating.

The most common trigger in student projects is a failed normality test. Shapiro-Wilk returns p < .05 in at least one group, the sample is under about 30 per group, and the t-test is off the table. The second trigger is data that were never interval-level in the first place, where computing a mean would be questionable anyway. If you want the reasoning behind the test, how ranking works and why it sidesteps the normality assumption, read our conceptual piece on the Mann-Whitney U test first. This tutorial sticks to the mechanics.

Two boundary cases worth flagging. If the same participants were measured twice, the design is paired, and you need the Wilcoxon signed-rank test instead; our guide on paired versus independent samples sorts that out. And if you have three or more groups, the two-group logic breaks down and you need Kruskal-Wallis.

Setting Up Your Data

The layout is identical to the independent t-test: one row per participant, one column for the dependent variable, one column for group membership. Do not put each group in its own column. SPSS will not accept that structure for this test.

The running example: 75 undergraduates completed a statistics exam, 38 under timed high-pressure conditions (experimental) and 37 with no time limit (control). Afterwards, each rated their anxiety on a 20-item scale with totals from 20 to 80. Shapiro-Wilk flagged the experimental group as non-normal (W = .91, p = .006), so Mann-Whitney it is.

Participant Group Anxiety
1142
2136
3151
39228
40231
41224

Code the groups numerically (1 = experimental, 2 = control) and add value labels in Variable View so the output prints group names instead of numbers. Set the Measure column to Nominal for Group and Scale (or Ordinal, if the DV is a single rating item) for Anxiety.

Running the Test (Legacy Dialog)

The menu path is Analyze > Nonparametric Tests > Legacy Dialogs > 2 Independent Samples.

  1. Move Anxiety into the Test Variable List.
  2. Move Group into the Grouping Variable box. As with the t-test dialog, SPSS shows Group(? ?) and greys out OK until you define the codes.
  3. Click Define Groups, enter 1 and 2, and click Continue.
  4. Under Test Type, make sure Mann-Whitney U is checked. It is the default, but confirm it, because the same dialog also offers Kolmogorov-Smirnov Z and two other tests you do not want.
  5. Click OK.

That is the whole procedure. If your sample is small, click Exact before OK and select the Exact option so SPSS computes exact significance rather than relying on the normal approximation.

Running the Test (New Dialog, SPSS 18+)

Versions 18 and later added a second route: Analyze > Nonparametric Tests > Independent Samples. On the Fields tab, drag Anxiety into Test Fields and Group into Groups. On the Settings tab, choose Customize tests and check Mann-Whitney U (2 samples). Click Run.

This version produces a hypothesis summary in plain language ("The distribution of Anxiety is the same across categories of Group — Reject the null hypothesis") plus a Model Viewer object you double-click to expand. It works, and some people like the automatic decision text. For a thesis, though, the legacy dialog is the better choice: it prints compact, conventional tables with U, W, and z clearly labeled, which is exactly what you need to copy numbers into an APA sentence. Every screenshot in the rest of this tutorial assumes the legacy output.

Reading the Output

The legacy dialog returns two tables. The first is Ranks:

Group N Mean Rank Sum of Ranks
Experimental3844.661697.00
Control3731.161153.00

SPSS pooled all 75 anxiety scores, sorted them, assigned ranks from 1 (lowest) to 75 (highest), and averaged the ranks within each group. The mean ranks tell you the direction of the effect: the experimental group's scores sit higher in the pooled ordering, so timed testing produced more anxiety. Check the N column while you are here. If either group's count is wrong, your Define Groups codes or missing-value settings need fixing before anything else.

The second table, Test Statistics, holds the numbers for your write-up. In our example: Mann-Whitney U = 245.00, Z = −2.68, Asymp. Sig. (2-tailed) = .007. The table also prints a Wilcoxon W, which is simply the smaller of the two rank sums; you can ignore it, since APA convention reports U. The Z statistic is the standardized version of U and feeds directly into the effect size calculation below. The p-value of .007 sits under .05, so the groups differ significantly.

One caveat on the p-value. Asymp. Sig. relies on a normal approximation that behaves well from roughly 20 participants per group upward. Below that, the legacy dialog adds an Exact Sig. row (or you request it through the Exact button), and that is the value to report. With 38 and 37 per group, the asymptotic value is fine here.

Effect Size: r = Z / √N

SPSS does not calculate an effect size for the Mann-Whitney. No option, no checkbox, nothing. You compute it by hand from two numbers you already have: the Z statistic and the total sample size N (both groups combined, not per group).

The formula is r = Z / √N, using the absolute value of Z. For our example: r = 2.68 / √75 = 2.68 / 8.66 = .31. The benchmarks are the same as for a correlation coefficient: .10 is small, .30 is medium, .50 is large. So .31 is a medium effect: time pressure raised anxiety by an amount worth discussing, which is a stronger claim than the p-value alone supports. Write the calculation down somewhere, because examiners increasingly ask for effect sizes and this one takes fifteen seconds with a phone calculator.

Reporting in APA Format

The template sentence:

A Mann-Whitney U test indicated that anxiety scores were significantly higher in the experimental group (Mdn = 34) than in the control group (Mdn = 27), U = 245, z = −2.68, p = .007, r = .31.

Every element earns its place. The medians describe the groups, U is the test statistic, z carries the sign and magnitude of the standardized difference, p gives significance, and r gives practical size. Keep the negative sign on z as SPSS printed it. Standard APA formatting rules apply: no leading zero on p-values or r (p = .007, not p = 0.007), and if SPSS shows ".000", write p < .001.

For a non-significant result, the structure stays the same: "A Mann-Whitney U test indicated no significant difference in anxiety scores between the experimental group (Mdn = 31) and the control group (Mdn = 29), U = 648, z = −0.74, p = .459, r = .09." Report the effect size either way.

Where Do the Medians Come From?

Notice that the sentence above contains two numbers that appear nowhere in the Mann-Whitney output: the medians. The test compares rank distributions, not means, so reporting group means alongside it would mismatch the statistic with the wrong descriptive. Medians are the convention.

To get them, go to Analyze > Descriptive Statistics > Explore, put Anxiety in the Dependent List and Group in the Factor List, and click OK. The Descriptives table reports the median for each group, along with the interquartile range if your supervisor wants a spread measure to match. Some supervisors also ask for the mean ranks from the Ranks table in addition to the medians; there is no harm in including both, and it takes one extra clause: "(mean ranks 44.66 vs. 31.16)."

If assembling all of this by hand feels error-prone, Academic Stats Agent runs the test, pulls the medians, computes r, and outputs the finished APA sentence in one pass.

Key takeaway: Run the Mann-Whitney through Analyze > Nonparametric Tests > Legacy Dialogs > 2 Independent Samples, define your group codes, and confirm Mann-Whitney U is checked. Read U, z, and Asymp. Sig. from the Test Statistics table (Exact Sig. for samples under ~20 per group). Compute r = z / √N yourself — SPSS will not — and report medians from Explore, not means: "U = 245, z = −2.68, p = .007, r = .31."

Frequently Asked Questions

Should I report the Asymp. Sig. or the Exact Sig. value?

For samples above roughly 20 participants per group, report Asymp. Sig. (2-tailed), which is based on the normal approximation. For smaller samples, report the Exact Sig. value if SPSS prints it, because the normal approximation becomes unreliable when n is small.

Can I run a Mann-Whitney U test with more than two groups?

No. The Mann-Whitney U test compares exactly two independent groups. With three or more groups, use the Kruskal-Wallis H test, which is the nonparametric equivalent of one-way ANOVA, and follow a significant result with pairwise comparisons.

Do I report means or medians with a Mann-Whitney U test?

Report medians. The Mann-Whitney works on ranks, not raw scores, so the mean is not the appropriate descriptive statistic. Get medians per group through Analyze > Descriptive Statistics > Explore with your grouping variable in the Factor List. Some supervisors also ask for the mean ranks from the output.

SS
StudentStats.net Team

We have completed over 300 statistical analysis projects for students and researchers across Europe. We built Academic Stats Agent to make the same statistical methods accessible to everyone.