The Wilcoxon signed-rank test compares two related measurements, such as scores before and after an intervention, when the differences are not normally distributed or the data are ordinal. It is the non-parametric alternative to the paired samples t test. Paste the two columns to get the ranks table, T, z, p, effect size r and an APA 7 sentence.
How to use this calculator
- Put the first measurement (e.g. Before) in one column and the second (After) in the next; each row is one participant.
- Paste both columns, with or without a header row.
- Click Calculate. Pairs with zero difference are excluded, as in SPSS.
- Report the medians of both measurements, T, z, p and r.
Formula
dᵢ = After − Before; drop dᵢ = 0; n = number of non-zero differences Rank |dᵢ| (average ranks for ties); W⁺ = sum of positive ranks, W⁻ = sum of negative ranks T = min(W⁺, W⁻) z = (T − n(n + 1)/4) / √[n(n + 1)(2n + 1)/24 − Σ(t³ − t)/48] r = |z| / √n
Step-by-step example
- Ten participants measured before and after a programme (click Load example).
- One pair has zero difference and is dropped, so n = 9.
- T = smaller sum of ranks = 1.5.
- z = −2.51, p = .012.
How to interpret the results
A p-value below .05 means the measurements changed significantly. Compare the number of positive and negative ranks to see the direction of change. Report the medians of both measurements and the effect size r (about .10 small, .30 medium, .50 large).
How to report it in APA 7 style
A Wilcoxon signed-rank test indicated that scores were significantly higher after the programme (Mdn = 14.50) than before it (Mdn = 12.50), T = 1.5, z = −2.51, p = .012.
Statistical symbols (t, F, p, r, M, SD, N, d) should be italicised in your thesis.
Assumptions
- Two related measurements from the same participants (or matched pairs).
- The outcome is ordinal or continuous.
- The distribution of differences is roughly symmetric around the median.
- Pairs are independent of each other.
How to do it in SPSS, R or Excel
SPSS: Analyze → Nonparametric Tests → Legacy Dialogs → 2 Related Samples → Wilcoxon. R: wilcox.test(after, before, paired = TRUE, correct = FALSE, exact = FALSE). Python: scipy.stats.wilcoxon(..., zero_method='wilcox', correction=False).
Roman Urdu mein khulasa
Wilcoxon signed-rank test aik hi logon ke do measurements (pehle aur baad) compare karta hai jab farq normal na ho ya data ordinal ho. Ye paired t test ka non-parametric mutabadil hai. Jin logon ka farq zero ho woh hata diye jate hain. p 0.05 se kam ho to tabdeeli significant hai; thesis mein medians aur effect size r likhein.
Frequently asked questions
When should I use the Wilcoxon signed-rank test?
Use it for pre-post or matched-pair data when the differences are clearly non-normal, the sample is small, or the outcome is ordinal.
What happens to pairs with no change?
Pairs with a zero difference are excluded before ranking (the Wilcoxon method SPSS uses). The calculator reports how many were dropped.
What is T?
T is the smaller of the sum of positive ranks and the sum of negative ranks. Smaller T values mean a more consistent change in one direction.
Is this the same as the Wilcoxon rank-sum test?
No. The rank-sum test (Mann-Whitney U) compares two independent groups; the signed-rank test compares two related measurements.
What effect size should I report?
Report r = |z| / √n, where n is the number of non-zero differences.
How do I report the Wilcoxon signed-rank test in APA?
Give both medians, then T, z and p (and r), for example: T = 1.5, z = −2.51, p = .012.
Related calculators
- Paired Samples t Test Calculator
- Mann-Whitney U Test Calculator
- Descriptive Statistics Calculator
- Not sure which test to use? Try the test chooser
Cite this calculator
If ScholarCalc helped your analysis, you can cite it in APA 7 format:
ScholarCalc. (2026). Wilcoxon Signed-Rank Test Calculator [Web application]. https://scholarcalc.com/wilcoxon-signed-rank-test-calculator/
Written and maintained by the ScholarCalc team. Last reviewed: November 2026.
Accuracy: results are computed in your browser and were validated against Python scipy, statsmodels and pingouin on test datasets. See Methodology and accuracy.