Confidence Intervals Binomial Proportions Statistical Tests 24 min read June 16, 2026
BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Wilson Score Interval: Formula, Calculator & Examples

A 95% confidence interval that occasionally claims a true proportion can be negative isn't useful to anyone. That's what the textbook Wald interval can do with a small sample, and it's the exact problem Edwin Wilson set out to fix in 1927. The interval he derived stays inside the 0–1 range automatically, holds its coverage closer to the stated confidence level, and is now the default choice behind product rating systems, clinical trial reporting, and most modern statistical software.

This guide walks through what the Wilson Score Interval is, derives the formula by hand, compares it against the Wald, Agresti-Coull, and Clopper-Pearson alternatives, and includes worked examples from polling, A/B testing, and rare-event medical data. Statistics fundamentals like sample proportions and the standard normal distribution are assumed; if those are new to you, the confidence intervals overview is a good place to start first.

What You'll Learn
  • ✓ The exact Wilson Score formula, broken into plain variables
  • ✓ Why the Wald interval breaks down on small or extreme samples
  • ✓ A step-by-step calculation you can follow by hand
  • ✓ Four worked examples: polling, A/B testing, rare medical events, product ratings
  • ✓ How Wilson compares to Wald, Agresti-Coull, and Clopper-Pearson
  • ✓ The Wilson lower bound ranking trick used by Reddit and Amazon-style sites
  • ✓ Ready-to-run code in Python, R, and Excel

What Is the Wilson Score Interval? (Definition)

Definition — Wilson Score Interval
The Wilson Score Interval is a confidence interval for a binomial proportion, constructed by inverting the score test rather than relying on a normal approximation centered at the raw sample proportion. It was introduced by Edwin B. Wilson in 1927 and stays within the valid [0, 1] range under every sample size and split.
p̃ = (p̂ + z²/2n ± z√[p̂(1−p̂)/n + z²/4n²]) / (1 + z²/n)

Most introductory statistics courses teach the Wald interval first: p̂ ± z√[p̂(1−p̂)/n]. It's easy to compute and easy to explain, which is exactly why it's still the default in many textbooks. The trouble shows up the moment p̂ is close to 0 or 1, or n is small. The Wald formula treats the standard error as if it were known precisely from p̂ alone, and when p̂ sits near an extreme, that estimate of variance collapses toward zero right when more uncertainty, not less, is warranted.

Wilson's fix was to stop estimating the standard error from p̂ and instead solve for the values of p that make the observed sample result land exactly on the edge of statistical significance under a z-test. That's the "score test inversion" referenced in the definition above. The output is an asymmetric interval that widens automatically near the boundaries, which is the opposite of what the Wald interval does.

The result has been independently re-derived and recommended many times since 1927, most notably in the widely cited review by Brown, Cai, and DasGupta (2001), which compared several proportion-interval methods and found Wald's coverage so unreliable for small samples that the authors recommended it be retired from introductory teaching altogether. Wilson, along with Agresti-Coull, came out as the practical favorites.

⚡ Quick Reference — Wilson Score Key Facts
  • p̂ (sample proportion): Successes divided by sample size, x/n
  • z (critical value): 1.96 for 95% confidence, 1.645 for 90%, 2.576 for 99%
  • n (sample size): Total number of independent trials
  • Bounds always valid: Wilson never produces a value below 0 or above 1
  • Asymmetric: Unlike the Wald interval, the lower and upper bounds aren't equally spaced from p̂
  • Origin: Edwin B. Wilson, "Probable Inference, the Law of Succession, and Statistical Inference," 1927

Foundations of Binomial Proportion Estimation

A binomial proportion shows up whenever you're counting successes out of a fixed number of independent trials with the same success probability: votes for a candidate, clicks on a button, patients who respond to a drug, five-star ratings on a product. The sample proportion p̂ is an unbiased point estimate of the true population proportion p, but a single number says nothing about how much that estimate could be off by chance.

That's the job of a confidence interval: a range of plausible values for p, built so that if you repeated the sampling process many times, the stated percentage of those intervals (95%, for instance) would contain the true p. The width of the interval depends on n and on how close p̂ is to 0.5, since proportions near the middle of the range have the highest variance under the binomial model.

Why Point Estimates (p̂) Fail to Capture True Variance

Reporting p̂ alone hides the fact that small samples are noisy. Five heads out of ten coin flips gives p̂ = 0.5, the same point estimate you'd get from five thousand heads out of ten thousand flips, but the second sample is far more trustworthy. A confidence interval makes that difference visible by being wide for the first case and narrow for the second.

Historical Context: Edwin B. Wilson's 1927 Paper

Wilson published the method in the journal Journal of the American Statistical Association under the title "Probable Inference, the Law of Succession, and Statistical Inference." The paper predates modern computing by decades, so the formula was designed to be solvable with a slide rule and a table of normal critical values, which is part of why it remains so simple to implement today. For a deeper review of how confidence intervals work in general, including the standard mean-based version, see the confidence interval for a mean guide.

The Wilson Score Interval Formula

The full formula looks intimidating at first glance, but it's built from four pieces you already know from basic statistics: the sample proportion, the sample size, the critical z-value, and a margin term that resembles the Wald formula's square root.

Wilson Score Interval
p̃ = [p̂ + z²/2n ± z√(p̂(1−p̂)/n + z²/4n²)] / (1 + z²/n)
= sample proportion (x/n) n = sample size z = critical value for confidence level = Wilson interval bound

Deconstructing the Parameters

The denominator, 1 + z²/n, shrinks toward 1 as n grows large, so for big samples the Wilson interval converges to something very close to the Wald interval, which is reassuring; the two methods agree where it matters least. The numerator's first term, p̂ + z²/2n, is the "adjusted center" of the interval: instead of centering on p̂ directly, Wilson nudges the center slightly toward 0.5, with the size of that nudge shrinking as n increases. That nudge is what keeps the interval from running off the edge of the 0–1 range.

The Continuity-Corrected Wilson Variant

A continuity-corrected version exists for cases where extra conservatism is wanted, most often in regulatory or clinical contexts. It adds a small correction term to account for the fact that a binomial distribution is discrete while the normal approximation underlying the score test is continuous. Most general-purpose statistical software defaults to the uncorrected version described above; R's prop.test() applies the correction unless you explicitly set correct = FALSE.

Step-by-Step Calculation Protocol

📋
Featured Snippet — 5-Step Process

Step 1: Count successes (x) and sample size (n). Step 2: Compute p̂ = x/n. Step 3: Choose a confidence level and find z. Step 4: Compute the adjusted center and margin term. Step 5: Solve for the lower and upper bounds.

1

Count Successes (x) and Sample Size (n)

Identify how many trials counted as a "success" and the total number of trials. In an A/B test this might be 2 conversions out of 15 visitors; in a survey it might be 480 "yes" responses out of 1,000.

2

Compute the Sample Proportion (p̂ = x/n)

Divide successes by total trials. This is the same p̂ you would use for a Wald interval, but in the Wilson formula it gets adjusted rather than used directly as the center.

3

Determine Confidence Level and Critical z-Score

Pick 90%, 95%, or 99% based on how conservative you need to be, then look up the matching z-value: 1.645, 1.96, or 2.576 respectively. See the full z-table for any other confidence level.

4

Compute the Adjusted Center and Margin Term

Calculate p̂ + z²/2n for the center, then √[p̂(1−p̂)/n + z²/4n²] for the margin. Both feed directly into the final bounds.

5

Solve for the Upper and Lower Boundaries

Add or subtract z times the margin term from the adjusted center, then divide the whole thing by 1 + z²/n. The minus sign gives the lower bound; the plus sign gives the upper bound.

Worked Examples — 4 Fully Solved

Each example below follows the same 5-step structure from the previous section. The arithmetic is shown in full so you can check it against the calculator further down the page.

Example 1 — Conversion Rate Optimization (A/B Testing)

Worked Example 1 — Small Sample, Extreme Split

Problem: An early-stage A/B test shows 2 conversions out of 15 visitors on a new landing page variant. What is the 95% Wilson confidence interval for the true conversion rate?

Inputs
x = 2, n = 15, z = 1.96
= 2/15 = 0.1333 = 3.8416
1

Counts: x = 2, n = 15

2

Sample proportion: p̂ = 2/15 = 0.1333

3

Confidence level: 95% → z = 1.96, so z² = 3.8416

4

Adjusted center and margin:
Denominator: 1 + 3.8416/15 = 1.2561
Center: 0.1333 + 3.8416/(2×15) = 0.1333 + 0.1281 = 0.2614
Margin radical: √[0.1333(0.8667)/15 + 3.8416/(4×225)] = √(0.0077 + 0.0043) = √0.0120 = 0.1095

5

Bounds:
Lower = (0.2614 − 1.96 × 0.1095) / 1.2561 = (0.2614 − 0.2146) / 1.2561 = 0.0373
Upper = (0.2614 + 0.2146) / 1.2561 = 0.3789

✅ Conclusion: The 95% Wilson interval for the true conversion rate is approximately 3.7% to 37.9%. A Wald interval on the same data would have produced a lower bound below 0%, which isn't a possible conversion rate.

Source: Method follows Wilson, E.B. (1927). "Probable Inference, the Law of Succession, and Statistical Inference." Journal of the American Statistical Association, 22(158), 209–212.

Example 2 — Public Opinion Polling (Large Sample)

Worked Example 2 — Large Sample, Near-Uniform Split

Problem: A national poll of 1,000 likely voters finds 480 supporting a candidate. Find the 95% Wilson confidence interval.

Inputs
x = 480, n = 1000, z = 1.96
= 0.48
1

Counts: x = 480, n = 1,000

2

Sample proportion: p̂ = 480/1,000 = 0.48

3

z = 1.96 for 95% confidence, z² = 3.8416

4

Adjusted center and margin:
Denominator: 1 + 3.8416/1000 = 1.00384
Center: 0.48 + 3.8416/2000 = 0.48 + 0.00192 = 0.48192
Margin radical: √[0.48(0.52)/1000 + 3.8416/4,000,000] = √(0.0002496 + 0.00000096) = 0.01580

5

Bounds:
Lower = (0.48192 − 1.96×0.01580) / 1.00384 = (0.48192 − 0.03097) / 1.00384 = 0.4491
Upper = (0.48192 + 0.03097) / 1.00384 = 0.5106

✅ Conclusion: The candidate's true support sits between roughly 44.9% and 51.1% at 95% confidence. Note how close this is to a simple ±3.1 percentage point margin of error — with n = 1,000 and p̂ near 0.5, Wilson and Wald nearly coincide. See the margin of error guide for more on this relationship.

Example 3 — Rare-Event Medical Trial (Zero Successes)

Worked Example 3 — Zero Success Bound

Problem: In a Phase I drug safety trial, 0 out of 25 patients experience a severe adverse reaction. What is the 95% Wilson interval for the true reaction rate?

Inputs
x = 0, n = 25, z = 1.96
= 0
1

Counts: x = 0, n = 25

2

Sample proportion: p̂ = 0/25 = 0

3

z = 1.96, z² = 3.8416

4

Adjusted center and margin:
Denominator: 1 + 3.8416/25 = 1.1537
Center: 0 + 3.8416/50 = 0.0768
Margin radical: √[0 + 3.8416/2500] = √0.001537 = 0.0392

5

Bounds:
Lower = (0.0768 − 1.96×0.0392) / 1.1537 = (0.0768 − 0.0768) / 1.1537 = 0.0000
Upper = (0.0768 + 0.0768) / 1.1537 = 0.1331

✅ Conclusion: Even with zero observed events, the true adverse reaction rate could plausibly be as high as 13.3%. This is exactly the scenario where the Wald interval fails outright — it would report a width of 0 and suggest perfect certainty that the rate is exactly zero, which is misleading with only 25 patients.

Example 4 — E-Commerce Product Rating (The 5-Star Problem)

Worked Example 4 — Ranking Application

Problem: Product A has 9 positive ratings out of 10 (90% positive). Product B has 450 positive ratings out of 500 (also 90% positive). Which product should rank higher in a "most trusted" list?

1

Product A: x = 9, n = 10, p̂ = 0.90

2

Product A Wilson 95% lower bound: 0.5969

3

Product B: x = 450, n = 500, p̂ = 0.90

4

Product B Wilson 95% lower bound: 0.8706

✅ Conclusion: Both products show the same 90% raw average, but Product B's lower bound (0.871) is far higher than Product A's (0.596). Ranking by the Wilson lower bound instead of the raw average correctly rewards Product B for having far more evidence behind its score. This exact logic is detailed in Section 8 below.

Wilson vs. Wald, Agresti-Coull, and Clopper-Pearson

Four methods dominate practical proportion-interval work, and each makes a different tradeoff between simplicity, conservatism, and accuracy.

Wilson Score vs. Wald: The Zero-Variance Failure

The Wald interval estimates standard error using p̂(1−p̂)/n, computed directly from the sample. When p̂ = 0 or p̂ = 1, that variance estimate becomes exactly zero, which collapses the entire interval to a single point even though a small sample obviously carries real uncertainty. Brown, Cai, and DasGupta documented that Wald's actual coverage probability oscillates wildly and can dip well under 90% even when the stated confidence is 95%, particularly for n below 30 or p near an extreme.

Wilson Score vs. Agresti-Coull: The "Add Pseudo-Counts" Shortcut

Agresti-Coull takes a different shortcut: instead of inverting the score test, it adds z²/2 pseudo-successes and z²/2 pseudo-failures to the data before applying a Wald-style formula on the adjusted counts. For 95% confidence that works out to roughly adding 2 successes and 2 failures, which is why it's sometimes nicknamed the "add 2 successes, add 2 failures" rule. It produces intervals close to Wilson's with far less arithmetic, which makes it popular for quick mental estimates, though Wilson edges it out on accuracy at very small n.

Wilson Score vs. Clopper-Pearson: Approximate vs. Exact

Clopper-Pearson inverts the exact binomial distribution rather than a normal approximation, guaranteeing the interval never undershoots its stated confidence level. The cost is width: Clopper-Pearson intervals are noticeably wider than Wilson's, especially for small n, because guaranteeing coverage in every case requires giving up some precision in the typical case. Regulatory and clinical-safety work often requires Clopper-Pearson specifically because of that guarantee; A/B testing and ranking systems generally prefer Wilson's tighter, still-reliable bounds.

MethodSmall-Sample BehaviorBest Use Case
Wilson ScoreStays within [0,1]; coverage close to nominalA/B testing, surveys, ranking systems
WaldCan fall below 0 or collapse to zero widthOnly safe for large n with p̂ near 0.5
Agresti-CoullGood, simpler to compute by handQuick estimates, teaching
Clopper-PearsonConservative; never undershoots coverageClinical trials, regulatory submissions

Wilson Score vs. Bayesian Credible Intervals

A Bayesian alternative uses a Beta distribution as a prior over p, then computes a credible interval from the resulting posterior. With a uniform (Beta(1,1)) prior, the Bayesian interval ends up close to Wilson's for moderate to large samples, but the two methods answer philosophically different questions: Wilson describes long-run frequentist coverage, while a credible interval describes the probability that p itself lies in a given range, given the prior. The credible intervals guide covers that distinction in more depth.

Interactive Wilson Score Interval Calculator

Enter the number of successes, the sample size, and a confidence level to get the Wilson Score Interval instantly. The calculator also shows the Wald interval for the same data so you can see the difference directly.

🔬 Wilson Score Interval Calculator

The Wilson Lower Bound Ranking System

Sorting items by raw average rating breaks down badly with small sample sizes, as Example 4 above showed. A product with 1 out of 1 five-star ratings has a perfect 100% average, but that single rating tells you almost nothing. The fix popularized by Evan Miller's widely referenced 2009 article is to rank by the lower bound of the Wilson interval instead of the average itself.

Why Raw Averages Destabilize Sorting

Ranking by average score rewards small samples that happened to get lucky. A comment with 2 upvotes and 0 downvotes outranks a comment with 999 upvotes and 50 downvotes under a pure-average system, despite the second comment having far more supporting evidence. This is the same statistical problem as the rating example above, just applied to comment threads and search rankings.

The Mechanics of the Lower-Bound Method

Treat each upvote as a success and each downvote as a failure, compute p̂ and n from those counts, then calculate the Wilson lower bound at a chosen confidence level (95% is typical). Sort items by that lower bound in descending order. Items with few votes get pulled down because their lower bound is far below their average; items with many votes keep a lower bound close to their true average, since more evidence narrows the interval.

Product Reviews

E-commerce platforms rank by Wilson lower bound so a product with thousands of 4.5-star reviews outranks one with five 5-star reviews.

💬

Comment Sorting

Forums and link aggregators use the same method to surface comments with broad, consistent support rather than a handful of early upvotes.

🧪

A/B Testing Dashboards

Experimentation platforms report Wilson bounds on conversion rates so small early samples don't get over-interpreted as a clear winner.

🏥

Clinical Trial Reporting

Adverse event rates from small trial cohorts are reported with Wilson or Clopper-Pearson bounds rather than a bare percentage.

Computational Implementations

The formula is simple enough to implement directly, but most statistical libraries already include it under the name "wilson" within their proportion-confidence-interval functions.

Python (statsmodels)

python
from statsmodels.stats.proportion import proportion_confint

lower, upper = proportion_confint(
    count=2, nobs=15, alpha=0.05, method='wilson'
)
print(lower, upper)

R

r
result <- prop.test(x = 2, n = 15, conf.level = 0.95, correct = FALSE)

result$conf.int

Excel / Google Sheets

With cell A2 holding successes, B2 holding total trials, and C2 holding the z-score (e.g. 1.96), the lower bound formula is:

excel
=((A2/B2)+(C2^2/(2*B2))-C2*SQRT(((A2/B2)*(1-(A2/B2))/B2)+(C2^2/(4*B2^2))))/(1+(C2^2/B2))

Common Misconceptions

MisconceptionCorrect Understanding
"The Wilson interval is just the Wald interval with rounding."They're derived from entirely different starting points: Wald approximates variance from p̂ directly; Wilson inverts the score test. They only converge for large n with p̂ near 0.5.
"A 95% interval means there's a 95% chance the true p is inside this specific interval."The 95% refers to the long-run procedure: if you repeated the sampling and interval construction many times, 95% of those intervals would contain the true p. Any single interval either does or doesn't contain it.
"Wilson is always the right choice over Clopper-Pearson."Clopper-Pearson is still preferred when a guaranteed minimum coverage level is a regulatory requirement, even though its intervals run wider than Wilson's.
"With n = 0 successes, the true proportion must be 0."As Example 3 showed, zero observed successes with a small n still leaves meaningful uncertainty — the Wilson upper bound can be well above 0.

Frequently Asked Questions

The Wilson Score Interval is a confidence interval for a binomial proportion, built by inverting the score test rather than relying on a normal approximation around the raw sample proportion. It was introduced by Edwin B. Wilson in 1927, stays within the 0 to 1 range under any sample size, and keeps its actual coverage closer to the stated confidence level than the simpler Wald interval.

Count successes (x) and sample size (n), compute p̂ = x/n, choose a confidence level and its z-value (1.96 for 95%), then apply the formula: (p̂ + z²/2n ± z√[p̂(1−p̂)/n + z²/4n²]) / (1 + z²/n). The calculator in Section 7 above does this automatically.

The Wald interval's standard error estimate is based directly on p̂, which collapses to near zero when p̂ is close to 0 or 1, sometimes producing impossible bounds below 0% or above 100%. Wilson avoids this because it solves for p directly from the score test rather than approximating variance from a single point estimate.

The lower bound of the Wilson interval is widely used to rank items with limited rating data, a method popularized by Evan Miller. Sorting by the lower bound rather than the raw average correctly penalizes items with very few votes, even when their average score looks high, as shown in Section 8.

Use Clopper-Pearson when a guaranteed minimum coverage level is required, such as regulatory clinical trial reporting. It never undershoots the stated confidence level, but its intervals are wider than Wilson's. For A/B testing, surveys, and ranking systems, Wilson's tighter bounds are usually the better tradeoff.

Yes. Unlike the Wald interval, which collapses to a single point when x = 0 or x = n, the Wilson interval still produces a meaningful, non-zero-width range, as shown in Example 3's rare-event medical trial above.

Experimentation platforms compute a Wilson interval around each variant's conversion rate so that early, small-sample results aren't mistaken for a confirmed winner. Because the interval widens appropriately for small n, two variants with overlapping Wilson intervals signal that more data is needed before declaring a result.

Sources and References

This guide draws on the following primary and secondary sources. All formulas have been independently verified against the original 1927 derivation and standard statistical software output.

  • Wilson, E.B. (1927) — "Probable Inference, the Law of Succession, and Statistical Inference." Journal of the American Statistical Association, 22(158), 209–212. tandfonline.com
  • Brown, L.D., Cai, T.T., & DasGupta, A. (2001) — "Interval Estimation for a Binomial Proportion." Statistical Science, 16(2), 101–133. doi.org/10.1214/ss/1009213286
  • NIST Engineering Statistics HandbookConfidence Limits for a Proportion. National Institute of Standards and Technology. itl.nist.gov
  • statsmodels documentationproportion_confint. statsmodels.org
  • Miller, E. (2009) — "How Not To Sort By Average Rating." Referenced as the standard description of the Wilson lower-bound ranking method used across rating and review platforms.