Written by Dackohn; last reviewed November 2026.
The textbook formula is p̂ ± z × √(p̂(1 − p̂) / n), but the Wilson interval is more reliable. For 52 successes out of 80, the 95% Wald interval is 54.5% to 75.5% and Wilson gives 54.1% to 74.5%. With few successes, such as 0 of 20, the Wald method fails completely.
The Wald interval (textbook)
52 of 80 people say yes, so p̂ = 0.65.
- Standard error: √(0.65 × 0.35 / 80) = 0.0533.
- Margin of error at 95%: 1.96 × 0.0533 = 0.1045.
- Interval: 0.65 ± 0.1045 = 54.5% to 75.5%.
The Wilson interval (recommended)
Wilson pulls the centre slightly towards 50% and accounts for the uncertainty properly. With z = 1.96, so z² = 3.84:
- Denominator: 1 + z² / n = 1 + 3.84 / 80 = 1.048.
- Centre: (0.65 + 3.84 / 160) / 1.048 = 0.6431.
- Half-width: 1.96 × √(0.65 × 0.35 / 80 + 3.84 / 25600) / 1.048 = 0.1023.
- Interval: 0.6431 ± 0.1023 = 54.1% to 74.5%.
Why the textbook formula fails
| Data | Wald | Wilson | Exact |
|---|---|---|---|
| 52 of 80 | 54.5% to 75.5% | 54.1% to 74.5% | 53.5% to 75.3% |
| 3 of 50 | below 0% to 12.6% | 2.1% to 16.2% | 1.3% to 16.5% |
| 0 of 20 | 0% to 0% | 0% to 16.1% | 0% to 16.8% |
With 3 of 50, the Wald interval runs below 0%, which is impossible. With 0 of 20, it has zero width, as though no uncertainty existed. Its real coverage can also fall well below the stated 95%.
Which method should I use?
- Wilson: the best default at any sample size.
- Clopper–Pearson (exact): if you must guarantee at least 95% coverage, as in some regulatory work. It tends to be wide.
- Wald: only if your course requires it, with at least about 10 successes and 10 failures.
The rule of three
With zero events in n trials, a quick one-sided 95% upper limit is about 3 / n. For 0 of 20, that is 15%. So “no side effects in 20 patients” still allows a true rate of up to about 15%.
Common mistakes
- Using a percentage as if it were a proportion. Use 0.65 in the formula, not 65.
- Reporting a limit below 0% or above 100%. That is a sign you need Wilson.
- Ignoring small counts behind large percentages. “75%” from 3 of 4 means little on its own.
Try it yourself
Proportion CI Calculator →All four methods side by side. Margin of Error Calculator →The survey version of the same idea.Frequently asked questions
What is the formula for a confidence interval for a proportion?
The simple Wald formula is p plus or minus z times the square root of p(1-p)/n. The Wilson formula is more accurate and is recommended.
Why is the Wilson interval better?
Its actual coverage stays close to the stated level for small samples and extreme proportions, where the Wald interval often falls short.
How large should my sample be?
For the Wald formula, aim for at least about 10 successes and 10 failures. Wilson and exact intervals work at any size.
Related reading: Margin of error explained · Confidence interval for a mean · Confidence intervals explained
Sources & further reading: NIST/SEMATECH e-Handbook of Statistical Methods · OpenStax Introductory Statistics. How we compute & validate: methodology. Written & reviewed by Dackohn; last reviewed August 2026.