How to use this calculator
- Enter or choose successes (x).
- Enter or choose trials (n).
- Enter or choose confidence level.
- Enter or choose method.
- The lower limit updates as you type. Use Copy result or Share to keep it.
Method
Wald: p̂ ± z√(p̂(1 − p̂)/n); Wilson: (p̂ + z²/2n ± z√(p̂(1 − p̂)/n + z²/4n²)) ÷ (1 + z²/n); Agresti–Coull: Wald on p̃ = (x + z²/2) ÷ (n + z²); Clopper–Pearson: Beta(α/2; x, n − x + 1) to Beta(1 − α/2; x + 1, n − x)
- x
- successes
- n
- trials
- p̂
- x ÷ n
- z
- two-sided normal critical value
- Beta(q; a, b)
- quantile of the beta distribution
Worked example
- p̂ = 7 ÷ 20 = 0.35; z = 1.96, z² = 3.8415.
- Centre = (0.35 + 0.09604) ÷ 1.19207 = 0.37417; half-width = 1.6442 × √(0.011375 + 0.002401) = 0.19296.
- Interval: 0.1812 to 0.5671. The exact method gives 0.1539 to 0.5922.
With 7 successes in 20 trials, the 95% Wilson interval for the true proportion is about 18.1% to 56.7%.
What the result means
A wide interval means the data say little; collect more trials to narrow it. Wilson is a good default; Clopper–Pearson is conservative (wider) but guarantees at least the stated coverage.
Assumptions and limits
- Independent trials with a constant probability of success (a binomial model).
- Two-sided intervals; limits are clipped to 0–100%.
- The Wald interval performs poorly for small n or proportions near 0 or 1, and is shown mainly for comparison.
Questions
What if I observed 0 successes?
Wald gives a useless 0 to 0. Wilson and Clopper–Pearson still give a sensible upper limit; for 0 of n the exact 95% upper limit is 1 − 0.025^(1/n), close to the “rule of three” 3 ÷ n.
Which method do software packages use?
R’s binom.test uses Clopper–Pearson; prop.test uses Wilson with a continuity correction; many survey tools use Wald.