BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Wilson Score Interval Visualizer: Interactive Calculator & Confidence Interval Comparison

The Wilson score interval is a confidence interval for a binomial proportion that tends to behave better than the simple Wald interval, particularly for small samples and proportions near 0 or 1. Enter your successes and trials below, pick a confidence level, and see the Wilson, Wald, and Clopper-Pearson intervals side by side.

Wilson Score Interval Visualizer

Wilson Score Interval [p̂ + z²/(2n) ± z√(p̂(1−p̂)/n + z²/(4n²))] / [1 + z²/n]
Integer ≥ 1
Integer between 0 and n
Sample proportion p̂0.000
z critical value1.960
Failures (n − x)20
Confidence95%
Probability scale [0, 1]

Wilson

Lower bound
Upper bound
Width
Center

Wald

Lower bound
Upper bound
Width
Center (p̂)

Clopper-Pearson

Lower bound
Upper bound
Width
TypeExact
Results will appear as you type.

Keeping the observed proportion fixed at the value you set in the Calculator tab, this shows how the Wilson interval narrows as sample size grows.

Wilson interval width at different sample sizes (fixed p̂)

With n fixed, this plots the Wilson interval bounds for every integer value of x from 0 to n. Notice how the interval is wider near x = n/2 and narrower (but never zero-width) at the boundaries.

Wilson lower and upper bounds for all x/n (shaded region = interval)

With x and n fixed (from the Calculator tab), compare the Wilson interval at four confidence levels simultaneously. Higher confidence levels produce wider intervals.

Wilson intervals at 80%, 90%, 95%, and 99% confidence

Where the Wald Interval Fails

The following four cases show boundary conditions where the Wald interval produces either a zero-width interval or bounds outside [0, 1]. The Wilson interval handles all of them sensibly. Values below use 95% confidence (z ≈ 1.96).

The Wilson Center-Pull Toward 0.5

The Wilson interval is not centered exactly on p̂ = x/n. Its adjusted center is (p̂ + z²/2n) / (1 + z²/n), which is pulled slightly toward 0.5 — most noticeably for small n and extreme proportions. Click any row to see the pull visualized.

n = 20, 95% confidence

What Is the Wilson Score Interval?

The Wilson score interval is a method for constructing a confidence interval around a binomial proportion. Edwin Bidwell Wilson introduced it in 1927 as an alternative to the simpler Wald interval, which is just p̂ ± z√(p̂(1−p̂)/n). While the Wald interval is easy to remember, it can produce zero-width results when all trials succeed or all fail, and it can technically yield bounds below 0 or above 1 — neither of which makes sense for a probability.

The Wilson interval avoids these issues because it is derived differently: by inverting the score test for a binomial proportion rather than by centering on p̂ and adding a symmetric margin. The result is an interval that always stays within [0, 1] and generally has better coverage properties than the Wald interval, particularly when the sample is small or the true proportion is close to 0 or 1.

Wilson Score Interval Formula

Given x successes out of n trials at confidence level 1 − α, let p̂ = x/n and let z be the standard normal critical value for that confidence level. The Wilson interval is:

Wilson Score Interval — Lower Bound L = [p̂ + z²/(2n) − z√(p̂(1−p̂)/n + z²/(4n²))] / [1 + z²/n]
Wilson Score Interval — Upper Bound U = [p̂ + z²/(2n) + z√(p̂(1−p̂)/n + z²/(4n²))] / [1 + z²/n]

Formula Breakdown

Adjusted center: (p̂ + z²/2n) / (1 + z²/n)
This is the midpoint of the Wilson interval. It is not p̂. Adding z²/2n in the numerator and z²/n in the denominator shifts the center slightly toward 0.5. For a large sample the adjustment is negligible; for a small sample with an extreme p̂ it can be substantial.
Uncertainty term: z√(p̂(1−p̂)/n + z²/(4n²))
This term drives the half-width of the interval. It combines the usual binomial variance p̂(1−p̂)/n with an extra z²/(4n²) term that comes from the score-test derivation. The extra term is small for moderate n but prevents the width from collapsing to zero at the boundaries.
Denominator: 1 + z²/n
Dividing by this quantity scales both the center and the half-width. It is what ensures the final bounds stay within [0, 1].

Wilson vs Wald: A Detailed Comparison

The Wald interval, p̂ ± z√(p̂(1−p̂)/n), is the first confidence interval for a proportion most students encounter. It is straightforward and easy to compute by hand. The Wilson interval requires more arithmetic but offers meaningfully better behavior in many practical situations.

PropertyWilsonWaldClopper-Pearson
Derivation Score test inversion Normal approximation to p̂ Exact binomial (Beta distribution)
Center Adjusted toward 0.5 Exactly p̂ Not symmetric — varies
Guaranteed within [0, 1] Yes No Yes
Boundary behavior (x=0 or x=n) Sensible Zero-width Sensible
Small-sample behavior Generally better Often unreliable Conservative
Formula complexity Moderate Simple Requires Beta CDF
Coverage probability Close to nominal Can be below nominal At or above nominal (conservative)

Wilson vs Clopper-Pearson

The Clopper-Pearson interval, sometimes called the exact binomial interval, is constructed from the Beta distribution rather than any normal approximation. Because it uses the exact binomial distribution, its actual coverage never falls below the nominal level — but it is described as conservative because actual coverage can substantially exceed the nominal level, producing intervals that are wider than necessary. The Wilson interval is typically narrower than Clopper-Pearson and still has good coverage properties, which is why it is often recommended for practical use. Neither is universally correct; the choice depends on the consequences of undercoverage versus overcoverage in the specific application.

Worked Examples

Example 1: x = 8, n = 20, 95% confidence

Given: x = 8, n = 20, confidence = 95%, so z = 1.960, α = 0.05.
Step 1 — Sample proportion: p̂ = 8/20 = 0.400
Step 2 — Key terms: z² = 3.8416  |  z²/2n = 3.8416/40 = 0.09604  |  z²/n = 3.8416/20 = 0.19208
Step 3 — Numerator center: p̂ + z²/2n = 0.400 + 0.09604 = 0.49604
Step 4 — Variance term: p̂(1−p̂)/n = 0.4 × 0.6 / 20 = 0.012  |  z²/(4n²) = 3.8416/1600 = 0.0024010  |  Sum = 0.014401  |  √0.014401 ≈ 0.12000
Step 5 — Half-width: z × 0.12000 = 1.960 × 0.12000 = 0.23520
Step 6 — Denominator: 1 + z²/n = 1.19208
Step 7 — Bounds:
Wilson lower = (0.49604 − 0.23520) / 1.19208 = 0.26084 / 1.19208 ≈ 0.2188
Wilson upper = (0.49604 + 0.23520) / 1.19208 = 0.73124 / 1.19208 ≈ 0.6136
Wald: 0.400 ± 1.960 × 0.1095 → [0.1853, 0.6147]

Example 2: x = 1, n = 20, 95% confidence (near zero)

Given: x = 1, n = 20, z = 1.960. p̂ = 0.05.
Key terms: z²/2n = 0.09604  |  numerator center = 0.14604  |  p̂(1−p̂)/n = 0.05×0.95/20 = 0.002375  |  z²/4n² = 0.0024010  |  √(sum) ≈ 0.06828
Bounds:
Wilson lower = (0.14604 − 0.13383) / 1.19208 ≈ 0.0102
Wilson upper = (0.14604 + 0.13383) / 1.19208 ≈ 0.2349
Wald: 0.05 ± 1.960 × 0.04873 → [−0.0455, 0.1455] — note the negative lower bound, which is impossible for a proportion.

Example 3: x = 19, n = 20, 95% confidence (near one)

Given: x = 19, n = 20, z = 1.960. p̂ = 0.95.
Bounds:
Wilson lower ≈ 0.7651  |  Wilson upper ≈ 0.9898
Wald: 0.95 ± 0.0955 → [0.8545, 1.0455] — the upper bound exceeds 1, which is invalid.
Note the symmetry: the Wilson interval for x = 19, n = 20 mirrors the interval for x = 1, n = 20 reflected around 0.5, i.e. lower(19/20) = 1 − upper(1/20) ≈ 1 − 0.2349 = 0.7651. This is an exact property of the Wilson formula.

Example 4: x = 500, n = 1000, 95% confidence (large sample)

Given: x = 500, n = 1000, z = 1.960. p̂ = 0.500.
Bounds:
Wilson lower ≈ 0.4690  |  Wilson upper ≈ 0.5310  |  Width ≈ 0.0620
Wald lower ≈ 0.4690  |  Wald upper ≈ 0.5310  |  Width ≈ 0.0620
With a large sample far from the boundaries, Wilson and Wald produce nearly identical results. The practical difference between methods is most apparent in small samples and at extreme proportions.

Statistical Properties of the Wilson Score Interval

A confidence interval's performance is measured primarily by its coverage probability — the frequency with which the interval actually contains the true parameter value across hypothetical repeated samples. An interval is said to have good coverage if this frequency is close to the stated confidence level (e.g., 95%).

PropertyWilsonWaldClopper-Pearson
Coverage probabilityClose to nominal for most n, pCan fall well below nominal for small n or extreme pAlways at or above nominal
WidthModerate; asymmetric near boundariesNarrow but unreliable at boundariesWidest of the three (conservative)
Symmetry about p̂Not generally symmetricAlways symmetricNot symmetric
Boundary x = 0Sensible upper bound; lower = 0[0, 0] — no uncertainty expressedSensible upper bound; lower = 0
Boundary x = nSensible lower bound; upper = 1[1, 1] — no uncertainty expressedSensible lower bound; upper = 1
DerivationScore test inversionNormal approximationExact Beta-distribution inversion

Wilson Score Interval Applications

Because the Wilson interval reliably estimates a binomial proportion even with small samples, it appears across many fields where proportions and rates matter.

  • A/B testing and conversion rates. Click-through rates and conversion rates are binomial proportions. When a variant has few observations, the Wilson interval gives a more realistic uncertainty range than the Wald interval, preventing over-confidence in early results.
  • Survey proportions. Estimating the proportion of respondents who agree with a statement. Wilson intervals perform well even for small subgroup analyses where cell counts can be single digits.
  • Classification accuracy. A classifier's accuracy on a held-out test set is a binomial proportion. The Wilson interval quantifies uncertainty around that accuracy estimate.
  • Reliability engineering. Estimating the proportion of items that pass a quality test, especially when test batches are small.
  • Medical proportions. Estimating response rates in pilot clinical studies where patient numbers are limited.

Wilson Lower Bound for Ranking

One practical application of the Wilson interval is using the lower confidence bound as a conservative ranking score. The idea is that an item with a high observed rate but very few observations may be ranked lower than an item with a slightly lower rate and many observations, because the latter provides stronger evidence.

ItemObserved rateObservationsWilson lower bound (95%)Rank by lower bound
Item A95.0% (19/20)20≈ 0.7652nd
Item B90.0% (900/1000)1000≈ 0.8781st

Item A has the higher observed rate (95% vs 90%), but Item B's much larger sample produces a higher Wilson lower bound. Ranking by the lower bound rewards evidence: an item that consistently performs at 90% across 1,000 trials is more reliably ranked above an item that happened to score 95% in 20 trials. Whether this approach is appropriate depends on the specific ranking context and whether a conservative lower bound matches the decision-maker's intent.

Common Mistakes

  • Treating [0, 0] as a valid interval. A zero-width Wald interval when x = 0 does not mean the true proportion is certainly zero — it means the Wald method has failed at the boundary. The Wilson interval correctly produces a non-zero upper bound.
  • Assuming Wilson is always narrower than Wald. Near x/n = 0.5 and for moderate n, the Wilson and Wald intervals are very similar in width. Wilson is not always more conservative or more liberal than Wald — it simply handles boundary cases correctly.
  • Interpreting the interval as a probability statement about the parameter. A 95% confidence interval does not mean "there is a 95% probability the true proportion lies in this interval." The frequentist interpretation is that 95% of intervals constructed this way over repeated sampling would contain the true parameter.
  • Rounding intermediate calculations. The formula involves several multiplications and a square root. Rounding p̂ or z before computing the full expression introduces errors. Keep full precision until the final result.
  • Confusing the Wilson adjusted center with p̂. The center of the Wilson interval is not x/n. It is pulled toward 0.5 by an amount that depends on z and n.
  • Assuming Wilson is always more accurate than Wald or Clopper-Pearson. All three methods have different properties. The right choice depends on the sample size, the true proportion, and the consequences of undercoverage versus overcoverage.

How to Report a Wilson Score Interval

A complete report of a Wilson interval includes the number of successes, the number of trials, the confidence level, and the computed bounds. Avoid reporting only the interval without specifying which method produced it, since Wilson, Wald, and Clopper-Pearson can differ substantially for small samples.

Example reporting format 8 out of 20 trials resulted in success (p̂ = 0.40). The 95% Wilson score interval extends from 0.219 to 0.614.

A frequentist interpretation: intervals constructed by this method would contain the true proportion in 95% of repeated experiments. This specific interval is one realization of that procedure. It should not be stated that there is a 95% probability the true proportion is between 0.219 and 0.614.

Sources and further reading:

  • Wilson, E.B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22(158), 209–212. doi:10.2307/2276774
  • Brown, L.D., Cai, T.T., & DasGupta, A. (2001). Interval estimation for a binomial proportion. Statistical Science, 16(2), 101–133. doi:10.1214/ss/1009213286
  • NIST/SEMATECH e-Handbook of Statistical Methods — Confidence Intervals for a Proportion
  • Agresti, A., & Coull, B.A. (1998). Approximate is better than "exact" for interval estimation of binomial proportions. The American Statistician, 52(2), 119–126.

Frequently Asked Questions

The Wilson score interval is a confidence interval for a binomial proportion. Unlike the Wald interval (p̂ ± z√(p̂(1−p̂)/n)), it is derived by inverting the score test rather than centering a normal approximation on p̂. This gives it better behavior near the boundaries p̂ = 0 and p̂ = 1, and it always produces bounds within [0, 1]. It was introduced by Edwin Bidwell Wilson in 1927.

Compute p̂ = x/n and look up the z critical value for your confidence level (z ≈ 1.96 for 95%). Then: lower = [p̂ + z²/(2n) − z√(p̂(1−p̂)/n + z²/(4n²))] / [1 + z²/n] and upper = [p̂ + z²/(2n) + z√(p̂(1−p̂)/n + z²/(4n²))] / [1 + z²/n]. The visualizer on this page does all of this automatically.

With x = 0, n = 20, and 95% confidence: p̂ = 0, z = 1.96. The Wilson upper bound is approximately 0.161 and the lower bound is 0. The Wald interval gives [0, 0], which is a zero-width interval — it conveys no uncertainty at all. The Wilson interval correctly shows that the true proportion could be as large as about 0.161, given that we observed zero successes in only 20 trials.

The Wald interval is symmetric around p̂ by construction. The Wilson interval's adjusted center is (p̂ + z²/2n) / (1 + z²/n), which is pulled toward 0.5 relative to p̂. This pull comes directly from the score-test derivation and is what allows the interval to stay within [0, 1] even at the boundaries. For large n the adjustment is tiny; for small n with extreme p̂ it can be noticeable.

No. The mathematical structure of the Wilson formula guarantees that both bounds lie within [0, 1]. This is one of its key advantages over the Wald interval, which can produce a negative lower bound or an upper bound greater than 1 when p̂ is close to 0 or 1 respectively.

The Wald interval is simply p̂ ± z√(p̂(1−p̂)/n) — a symmetric normal approximation centered on the observed proportion. The Wilson interval is derived from the score test and has an adjusted center and a different half-width formula. The practical differences: Wald can produce zero-width intervals at x = 0 or x = n, and can exceed [0, 1]; Wilson avoids both problems and generally has better coverage for small samples.

For large samples with proportions away from the boundaries, the two methods give nearly identical results. The Wilson interval has a genuine practical advantage when n is small or when x is near 0 or n. It does not "always" produce better results in a universal mathematical sense — both are approximations and neither achieves exact coverage for all n and p simultaneously.

The Clopper-Pearson interval uses the exact binomial distribution (via the Beta distribution) rather than any normal approximation. Its actual coverage probability never falls below the nominal level, but this conservative property comes at a cost: the interval is typically wider than necessary. The Wilson interval is a score-based approximation that has good but not guaranteed coverage, and it tends to be narrower than Clopper-Pearson while still being substantially better than Wald near the boundaries.

Larger samples produce narrower Wilson intervals, all else equal. For a fixed p̂ = 0.5 at 95% confidence: n = 10 gives a width of about 0.574, n = 50 gives about 0.268, n = 100 gives about 0.192, and n = 1000 gives about 0.062. Use the Sample Size tab in the visualizer above to see this progression interactively.

Higher confidence levels require a larger z critical value, which increases the half-width term z√(...). A 99% Wilson interval is wider than a 95% interval for the same x and n, reflecting the tradeoff between confidence and precision. The Confidence Levels tab in the visualizer shows all four common levels simultaneously.

The Wilson interval estimates uncertainty around a single proportion. In A/B testing you typically compare two proportions (conversion rates for variant A and variant B). You can compute Wilson intervals for each variant separately to visualize their individual uncertainty, but a formal test of whether the two proportions differ requires a two-proportion hypothesis test or a specific A/B testing methodology. Our A/B Test Calculator handles this comparison directly.

Wilson lower bound ranking uses the lower confidence bound as a ranking score instead of the raw observed proportion. An item with 90% success in 1,000 trials ranks above one with 95% success in 10 trials because the lower Wilson bound for the 1,000-trial item (≈ 0.878) exceeds the lower bound for the 10-trial item (≈ 0.720). This rewards volume of evidence, not just the observed rate. Whether this is appropriate depends on the specific application.

The Wilson interval has an exact symmetry: the lower bound for x successes in n trials equals 1 minus the upper bound for (n − x) successes in n trials. So the interval for x = 19 is the mirror image of the interval for x = 1, reflected around 0.5. This means lower(19/20) = 1 − upper(1/20) ≈ 0.765, and upper(19/20) = 1 − lower(1/20) ≈ 0.990.

x is the number of successes (or events of interest) in n independent Bernoulli trials. Each trial results in either a success (1) or a failure (0). The Wilson interval estimates the unknown true probability of success in any single trial. x must be an integer with 0 ≤ x ≤ n.

If you were to repeat the experiment many times and compute a 95% Wilson interval each time, approximately 95% of those intervals would contain the true population proportion. It is not correct to say "there is a 95% probability that the true proportion lies in this specific interval," because in the frequentist framework the true proportion is a fixed (unknown) value, not a random variable. For a probabilistic statement about the parameter, a Bayesian credible interval is more appropriate.

Key Takeaways

The Wilson interval is a confidence interval for a binomial proportion derived by inverting the score test.
Wilson intervals always remain within [0, 1], unlike the Wald interval.
At boundary cases (x = 0 or x = n), the Wald interval collapses to zero width; the Wilson interval does not.
The Wilson interval is not centered on p̂ — its center is pulled toward 0.5, especially for small n.
Higher confidence levels produce wider intervals; larger samples produce narrower ones.
For large samples away from boundaries, Wilson and Wald give nearly identical results.
Clopper-Pearson is exact and conservative; Wilson is approximate but often better calibrated.
Choose a confidence interval method based on the sample size, expected proportion, and application context.