Sign Test Calculator

Sign Test Calculator

Count the plus and minus signs in paired data — or above and below a hypothesised median — and get the exact binomial p-value, the median and a distribution-free interval for the median.

One value per pair, separated by commas, spaces or line breaks.
Same number of values as the before scores, in the same order.
TWO-SIDED P-VALUE · N = 12
0.0063

Reject H₀ at α = 0.05 — with 11 plus signs and 1 minus sign (n = 12, no ties), the median difference of 2.0 is significantly different from 0.

Plus signs
11
Minus signs
1
Ties
0
n (ties excluded)
12
One-sided p (more +)
0.0032
Median difference
2.0

Calculation

    Binomial distribution — where your result sits

    Under H₀ the number of plus signs follows Bin(12, 0.5). The shaded bars are the two-sided tail: 1 or fewer, or 11 or more, plus signs — probability 0.0063.

    95% confidence interval for the median difference: [2, 3] — the 3rd and 10th order statistics of the 12 differences. The interval covers the true median difference with probability 96.1% (the closest attainable coverage at or above 95%).

    A sign test calculator counts the plus and minus signs in paired data — or above and below a hypothesised median — and returns the exact binomial p-value, the sign counts, the median and a distribution-free interval for the median. It is the simplest non-parametric test there is: no assumption of normality, no assumption about the shape of the distribution, just the direction of each difference.

    How to use the sign test calculator

    Use Paired data when the same subjects were measured twice — before and after, left and right, treatment and control. Use One-sample median when you have one sample and want to test its median against a claimed value.

    1. Choose a mode: Paired data or One-sample median.
    2. In Paired data mode, paste the before scores and the after scores — one value per pair, in the same order. In One-sample median mode, paste the sample values and enter the hypothesised median.
    3. Choose the significance level (α) and the level for the median interval (90%, 95% or 99%).
    4. Read the headline two-sided p-value, then check the results grid for the plus, minus and tie counts, n (ties excluded), the one-sided p-value and the median. The calculation ledger shows every step, the chart shows where your result sits on the binomial distribution, and the critical-values table gives the cut-off for the smaller count.

    Try it now: with the before scores 72, 68, 75, 80, 65, 70, 78, 82, 69, 74, 77, 71 and the after scores 75, 70, 74, 82, 68, 73, 80, 83, 72, 76, 79, 73, the calculator gives 11 plus signs, 1 minus sign, n = 12 and a two-sided p-value of 0.0063 — significant at the 5% level. The median difference is 2.0 and the 95% interval for the median difference is [2, 3].

    What is a sign test?

    The sign test asks one question: is the median difference zero? It looks at each pair, records only whether the after score is higher (+), lower (−) or the same (a tie), and counts. Under the null hypothesis the median difference is zero, so a plus is as likely as a minus — the number of plus signs follows a binomial distribution with n equal to the number of non-tied pairs and p = 0.5. The p-value is the exact binomial tail probability, not an approximation, so it is valid for any sample size — even a handful of pairs.

    Because it uses direction only, the sign test makes almost no assumptions: the data do not need to be normal, the differences do not need a symmetric distribution, and the measurement scale only needs an order. That is also its weakness — see the next section.

    For n non-tied pairs with B plus signs, the two-sided p-value is 2 × P(X ≤ min(B, n − B)) where X follows Bin(n, 0.5). The one-sided p-value in the direction of the majority is P(X ≥ B) when B is the larger count.

    The sign test uses direction only. A difference of +1 and a difference of +30 both count as one plus sign. That is why the Wilcoxon signed-rank test is more powerful when the sizes of the differences matter.

    Sign test vs Wilcoxon — which one?

    The sign test uses direction only; the Wilcoxon signed-rank test uses direction and magnitude. A difference of +1 and a difference of +30 both count as one plus sign for the sign test, but Wilcoxon ranks them and gives the +30 far more weight. When the magnitudes carry real information — and the differences are roughly symmetric — Wilcoxon is more powerful: it is more likely to detect a real effect. The sign test is the safer choice when the differences are clearly not symmetric, when the data are ordinal, or when you want the simplest possible test with the fewest assumptions.

    TestUsesAssumesUse when
    Sign testDirection onlyAlmost nothingOrdinal data, skewed differences, fewest assumptions
    Wilcoxon signed-rankDirection + magnitude (ranks)Symmetric differencesDifferences roughly symmetric, more power wanted
    Paired t-testMean of the differencesNormal differencesDifferences normal, maximum power

    The three tests sit on a ladder: sign test, Wilcoxon, paired t-test — each step up buys power and costs assumptions. If your data are two independent samples rather than pairs, the equivalent ladder is the sign test’s cousin, the Mann-Whitney U test. If you are not sure which test fits your data, work through which statistical test should I use?.

    The median interval — order statistics

    The calculator also gives a distribution-free interval for the median — one that needs no normality assumption at all. It is built from the order statistics: sort the differences, then take the k-th smallest and the k-th largest. For 12 differences at the 95% level, k = 3, so the interval is the 3rd and 10th values in the sorted list, [2, 3]. The coverage is not exactly 95% — it is 96.1%, the closest attainable coverage at or above 95% — because the binomial distribution is discrete and the coverage can only take certain values. The calculator reports the actual coverage, and when even the widest interval cannot reach the requested level (very small n), it says so.

    Worked examples

    Example 1 — paired before and after scores

    Twelve students take a test before and after a revision course. Before: 72, 68, 75, 80, 65, 70, 78, 82, 69, 74, 77, 71. After: 75, 70, 74, 82, 68, 73, 80, 83, 72, 76, 79, 73. The differences are +3, +2, −1, +2, +3, +3, +2, +1, +3, +2, +2, +2 — 11 plus signs, 1 minus sign and no ties, so n = 12. Under H₀ the number of plus signs follows Bin(12, 0.5). The two-sided p-value is 2 × P(X ≤ 1) = 2 × 0.0032 = 0.0063, and the one-sided p-value (more +) is P(X ≥ 11) = 0.0032. Both are below 0.05, so we reject H₀: the median difference is significantly different from zero. The median difference is 2.0, and the 95% interval for the median difference is [2, 3] — the 3rd and 10th order statistics, with coverage 96.1%.

    Example 2 — testing a median

    A sample of 12 measurements — 72, 68, 75, 80, 65, 70, 78, 82, 69, 74, 77, 71 — is tested against a hypothesised median of 70. Eight values are above 70, three are below and one (70 itself) is a tie, so n = 11. The two-sided p-value is 2 × P(X ≤ 3) = 2 × 0.1133 = 0.2266, which is above 0.05, so we fail to reject H₀: there is no evidence the population median differs from 70. The sample median is 73.0, and the 95% interval for the median is [69, 78] — the 3rd and 10th order statistics, with coverage 96.1%.

    Edge cases

    • 9 plus, 2 minus, 1 tie: n = 11 (the tie is dropped) and the two-sided p-value is 0.0654 — not significant at 5%, though it is close. The tie costs a pair: had it been a plus, n would be 12 and the p-value 0.0386.
    • All positive, 5 out of 5: n = 5 and the two-sided p-value is 0.0625 — not significant at 5%, even though every sign agrees. Five pairs are simply not enough evidence at the 5% level; the smallest n that can reach significance with all signs agreeing is 6 (p = 0.0313).
    • All ties: if every difference is zero — or every value equals the hypothesised median — there are no signs to test and the calculator shows an error, not a p-value. A test with no data in it cannot give an answer.
    • Small samples: the sign test is exact, so it works with as few as 2 pairs — but with so little data it can only detect very large effects, and the median interval may be wide or unable to reach the requested coverage.

    Frequently asked questions

    What happens to ties?

    Ties are dropped before the test is run, and n falls by the number of ties. A pair with no change — or a value exactly equal to the hypothesised median — carries no information about the direction of the effect, so it cannot count as a plus or a minus. The calculator shows the tie count and the reduced n, so you can see exactly how many pairs were lost. If every pair is a tie, there is nothing to test and the calculator says so instead of giving a p-value.

    Sign test vs Wilcoxon — which one?

    Use the sign test when you want the fewest assumptions: it needs only the direction of each difference, so it works for ordinal data and badly skewed differences. Use the Wilcoxon signed-rank test when the differences are roughly symmetric and you want more power — it also uses the size of each difference, through its rank, so it detects real effects the sign test misses. If the differences are normal, a paired t-test is more powerful still. The three tests sit on a ladder: sign test, Wilcoxon, paired t-test — each step up buys power and costs assumptions.

    Source: the sign test on this page is the standard exact binomial sign test. All worked examples on this page were recomputed with Python (scipy.stats). Last updated 19 November 2026.

    See all 91 free statistics tools on Empirical Rule Calculators.