Wilcoxon signed-rank test calculator

This Wilcoxon signed-rank test calculator compares two related measurements, such as before and after in the same subjects, without assuming the differences are normal. Paste both columns and get W, the p value (exact for up to 30 pairs without ties), z, the median difference and an effect size.

Your numbers are calculated in your browser and are not sent or stored.

Wilcoxon signed-rank test calculatorOr describe it in Studio →

The first value in each box belongs to the same subject, and so on. The numbers stay in your browser.

No significant difference between the two conditions (p = .461).

W
12 (W⁺ = 24, W⁻ = 12)
p (two-tailed)
0.4609 exact
p (one-tailed)
0.2305 in the direction observed
z
0.77
Effect size (rank-biserial r)
0.333
Pairs used
8
Median difference
4

To report

W = 12, p = .461, r = .33

Check your result: W⁺ and W⁻ always add up to n(n + 1) ÷ 2. With 8 pairs that is 36, and the worked example has 24 + 12. Pairs with a difference of 0 are dropped before ranking, so n can be smaller than the number of pairs you entered.
exact two-sided p in the worked example
.461
exact two-sided p in the worked example
sign patterns counted for 8 pairs
256
sign patterns counted for 8 pairs
pairs or fewer, without ties, for an exact p
30
pairs or fewer, without ties, for an exact p
rank-biserial r
.33
rank-biserial r
  • Paired / before-and-after data
  • Exact p up to 30 pairs
  • W⁺, W⁻ and z
  • Rank-biserial effect size
  • Runs in your browser, free

01

How to use the calculator

  1. Paste the first measurement for every subject in the first box and the second measurement in the second box, in the same subject order.
  2. Read W and the p value. They update as you type.
  3. Report the median difference and the effect size with the p value.

02

When to use the Wilcoxon signed-rank test

  • Paired data: the same subjects measured twice, or matched pairs. For two independent groups use the Mann-Whitney U test (also called the Wilcoxon rank-sum test, a different test).
  • The differences are skewed, have outliers, or come from an ordinal scale, so the paired t-test is doubtful.
  • The test assumes the differences are roughly symmetric around their median. If they are close to normal, the paired option of the t-test calculator has more power.

03

How W is calculated

  1. Subtract the second value from the first for each pair.
  2. Leave out pairs with a difference of zero.
  3. Rank the remaining differences by size, ignoring the sign; tied sizes share the average rank.
  4. Add the ranks of the positive differences (W⁺) and of the negative differences (W⁻). W is the smaller of the two.

p value. With no tied sizes and at most 30 pairs, the calculator counts every possible assignment of signs and reports the exact p. Otherwise it uses the normal approximation with a tie correction and a continuity correction of 0.5:

z = (|W⁺ − n(n + 1)/4| − 0.5) ÷ √( n(n + 1)(2n + 1)/24 − Σ(t³ − t)/48 )

04

Worked example

The calculator opens with eight subjects. Their differences (before − after) are 15, −7, 5, 20, 3, −8, 25 and −11.

Size of difference357811152025
Rank12345678
Sign++−−−+++

W⁺ = 1 + 2 + 6 + 7 + 8 = 24, W⁻ = 3 + 4 + 5 = 12, W = 12

Of the 256 possible sign patterns, 118 give a rank sum of 12 or less on one side or the other, so the exact two-sided p is 118 ÷ 256 = 0.461. Reported as: W = 12, p = .461, r = .33. Eight pairs give no evidence of a change.

05

Effect size

r = (W⁺ − W⁻) ÷ (n(n + 1) ÷ 2)

The matched-pairs rank-biserial correlation runs from −1 to +1. At +1 every non-zero difference is positive; at 0 the positive and negative rank sums are equal.

06

Signed-rank test mistakes

  • Trusting the normal approximation for a few pairs. For the 8 pairs in the worked example it gives p = 0.441; the exact test gives 0.461.
  • Ranking pairs that did not change. Adding two pairs with a difference of 0 to the worked example leaves n at 8 and p at 0.461 here; ranking the zeros would change both.
  • Reporting W⁺ as W. W is the smaller of the two rank sums, 12 in the worked example; W⁺ is 24.

Trust

How this page is checked

  • The calculation runs on code with automated tests against worked reference values. Every number in the examples on this page was produced by that same code, not typed by hand.
  • The formulas and conventions used are stated on the page, so you can reproduce the result yourself or compare it with your own software.
  • Sources: Wilcoxon (1945), Individual comparisons by ranking methods.
  • Last reviewed by the Sciloom team, Zebra Nine Studio Inc. It is a tool for research and teaching, not a substitute for a statistician, a validated lab method or medical advice.

Cite this page

Sciloom. (2026). Wilcoxon signed-rank test calculator. Zebra Nine Studio Inc. https://sciloom.si/wilcoxon-signed-rank-test-calculator

Read the full methodology · Who makes Sciloom

Frequently asked questions

What is the Wilcoxon signed-rank test used for?

To compare two related measurements, such as before and after treatment in the same people, when the differences are not normally distributed.

What is the difference between the signed-rank and rank-sum tests?

The signed-rank test is for paired data. The rank-sum test, also called the Mann-Whitney U test, is for two independent groups.

What happens to pairs with no change?

Pairs whose two values are equal carry no information about direction and are left out. The calculator reports how many were dropped.

How many pairs do I need?

With five pairs the smallest possible two-sided p is .0625, so at least six pairs are needed to reach p < .05.

Differences roughly normal? The paired option of the t-test calculator gives a confidence interval too.
Free to start, no sign-up.
Back to the tool ↑

More research tools