Confidence interval for a proportion (Wilson)
Get the Wilson score interval, and for comparison the exact Clopper–Pearson interval, for a percentage such as a complication rate.
Your data does not go to our server. This tool runs in your browser; what you type or open never leaves your device.
This calculator needs JavaScript, because it calculates in your browser and sends nothing. Turn JavaScript on to use it. How it is calculated is explained below.
- Proportion
- Wilson score interval
- Exact (Clopper–Pearson) interval
How it is calculated
The Wilson interval is recommended for most uses; the exact interval is a little wider and never too narrow.
With 0 events out of 20 the Wilson upper limit is 16.1 %, so zero events do not mean zero risk.
Wilson: [p + z²/(2n) ± z × √(p(1 − p)/n + z²/(4n²))] / (1 + z²/n)
Worked example: 81 of 263: 30.80 %, Wilson interval 25.53 % to 36.62 %.
Sources
- Newcombe RG. Two-sided confidence intervals for the single proportion: comparison of seven methods. Stat Med. 1998.
- Wilson EB. Probable inference, the law of succession, and statistical inference. J Am Stat Assoc. 1927.
These calculators support research; they do not replace the advice of a statistician or a clinician.
Questions
Why not the simple formula with the standard error?
The simple (Wald) interval can fall below 0 % or above 100 % and is too narrow for small samples or rare events. The Wilson interval does not have these faults.