01
How to use the calculator
- Paste the first measurement for every subject in the first box and the second measurement in the second box, in the same subject order.
- Read W and the p value. They update as you type.
- 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
- Subtract the second value from the first for each pair.
- Leave out pairs with a difference of zero.
- Rank the remaining differences by size, ignoring the sign; tied sizes share the average rank.
- 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 difference | 3 | 5 | 7 | 8 | 11 | 15 | 20 | 25 |
|---|---|---|---|---|---|---|---|---|
| Rank | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 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
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.