Wilcoxon Signed-Rank Test Calculator
Compare two paired or repeated-measures conditions without assuming normal differences. Paste before/after values to compute W, W+, W−, tie-corrected z, exact p-values for small untied samples, matched-pairs rank-biserial r, and a ready-to-use APA 7th reporting sentence.
| Statistic | Value |
|---|---|
| W | 1.00 |
| W+ | 54.00 |
| W− | 1.00 |
| z | 2.65 |
| p-value | 0.004 |
| r (rank-biserial) | .96 |
| r (z / √N) | .84 |
| Median (1 / 2 / Δ) | 30.00 / 23.00 / 7.50 |
| n (non-zero / total) | 10 / 10 |
| Exact p | Yes |
APA report
Mdn1 = 30.00, Mdn2 = 23.00, W = 1.00, z = 2.65, p = .004 (exact), r = .96
Running one test at a time? Upload your .csv or .xlsx file (up to 10 MB) to Data2Paper Generate Paper to compute all variables in Python and export a complete structured research manuscript—preview the first half free before the $19.90 one-time unlock.
- Baseline Table 1 & multi-variable APA 7th statistical tables
- Publication-ready charts & figures generated from your uploaded rows
- Complete Methods, Results & Discussion with OpenAlex/Crossref DOIs
- Editable Word (.docx), LaTeX (.tex), PDF & source ZIP ($19.90 one-time)
How to use this calculator
1. Paste **Measurement 1** (e.g., Pre-test or Condition A) in the first input and **Measurement 2** (e.g., Post-test or Condition B) in the second input in matching participant order. 2. Values may be separated by commas, spaces, tabs, or line breaks—copy two columns directly from Excel, SPSS, or CSV. 3. Choose a **Two-tailed** test (standard default) or a directional one-tailed test if pre-registered. 4. Review **W**, **W+**, **W−**, **z**, **p-value** (exact when *n* ≤ 25 with no zero or tied differences; tie-corrected normal approximation otherwise), **matched-pairs rank-biserial r**, and **r = z / √N**, then copy the APA 7 sentence.
When to use the Wilcoxon signed-rank test
The Wilcoxon signed-rank test is the non-parametric counterpart of the paired-samples *t* test. Use it when:
- The **same participants** are measured twice (pre-intervention vs. post-intervention, Condition A vs. Condition B) or participants are matched in pairs.
- Paired difference scores are **skewed, heavy-tailed, or contain outliers**, or the outcome is measured on an **ordinal scale** (such as Likert ratings or clinical symptom severity grades).
If you are comparing **two independent groups**, use the [Mann–Whitney U test calculator](/tools/mann-whitney-u-test-calculator). If your paired differences are approximately normal on a continuous scale, see the [t-test calculator](/tools/t-test-calculator). For **three or more independent groups**, use the [Kruskal–Wallis H test calculator](/tools/kruskal-wallis-calculator).
Assumptions
- **Paired observations:** each pair `(x_i, y_i)` comes from the same participant or matched unit, and pairs are independent of one another.
- **Ordinal or continuous differences:** absolute differences `|x_i − y_i|` can be meaningfully ranked.
- **Symmetric distribution of differences** around the median under the null hypothesis.
- **Zero differences and ties:** pairs with `x_i − y_i = 0` are excluded under Wilcoxon's standard convention (`n_effective`), and tied non-zero `|d_i|` values receive average ranks with tie-adjusted variance in `z`.
Formulas
For each pair `i = 1, …, N`, compute `d_i = x_i − y_i`, drop zeros to leave `n` non-zero differences, and rank `|d_i|` from `1` to `n` (average ranks for ties):
- `W+ = Σ rank(|d_i|)` for `d_i > 0`, and `W− = Σ rank(|d_i|)` for `d_i < 0`, where `W+ + W− = n(n + 1) / 2`.
- Two-sided test statistic: `W = min(W+, W−)`.
- Mean under H0: `μ_W = n(n + 1) / 4`.
- Tie-adjusted SD: `σ_W = √[ (n(n + 1)(2n + 1) − 0.5 Σ(t³ − t)) / 24 ]`.
- Continuity-corrected normal approximation: `z = (W+ − μ_W ± 0.5) / σ_W`.
- **Matched-pairs rank-biserial correlation:** `r_rb = (W+ − W−) / [n(n + 1) / 2]`, and standardized `r = z / √N`.
Worked example
Ten participants completed an anxiety checklist before and after a 4-week mindfulness module:
| Participant | Pre | Post | Difference (d) | |d| | Signed Rank | |---|---|---|---|---|---| | 1 | 29 | 21 | +8 | 8 | +6 | | 2 | 32 | 25 | +7 | 7 | +5 | | 3 | 24 | 26 | −2 | 2 | −1 | | 4 | 36 | 24 | +12 | 12 | +9 | | 5 | 28 | 22 | +6 | 6 | +4 | | 6 | 34 | 25 | +9 | 9 | +7 | | 7 | 25 | 20 | +5 | 5 | +3 | | 8 | 31 | 20 | +11 | 11 | +8 | | 9 | 35 | 21 | +14 | 14 | +10 | | 10 | 27 | 24 | +3 | 3 | +2 |
- Pre median = **30.00**, Post median = **23.00**, Median difference = **7.50**
- `W+ = 54.00`, `W− = 1.00`, **W = 1.00**
- `z = 2.65` (with continuity correction), **exact two-tailed p = .004** (`p = 0.0039`, verified with `scipy.stats.wilcoxon`)
- **Matched-pairs rank-biserial r = .96** (`53 / 55`), `r = z / √10 = .84`
Reporting in APA 7th style
Report condition medians (and IQRs where helpful), the Wilcoxon statistic `W` (or `T`), `z`, the exact or asymptotic `p`-value, and a named effect size:
> A Wilcoxon signed-rank test indicated that post-intervention anxiety scores (*Mdn* = 23.00) were significantly lower than pre-intervention scores (*Mdn* = 30.00), *W* = 1.00, *z* = 2.65, *p* = .004 (exact), *r* = .96.
If you have a multi-variable CSV or Excel spreadsheet, Data2Paper's [Generate Paper](/generate-paper) and [SPSS/CSV to APA Results workflow](/spss-to-apa-results-generator) compute all paired and group tests in Python and assemble a complete structured research manuscript with APA tables, figures, and verified DOIs (free first-half preview before the $19.90 one-time unlock; verify statistical assumptions and citations before submission).