# Confidence Interval for a Proportion Calculator

> Get a confidence interval for a proportion from successes and trials by the Wilson, Clopper–Pearson exact, Agresti–Coull or Wald method, compared in a table.

Category: Statistics & probability · Applies to: Worldwide · Last updated: 2026-10-29
Interactive calculator: https://calculators.geekmidst.com/calculators/confidence-interval-proportion-calculator

From x successes in n trials, find the plausible range for the true proportion. Four standard methods are computed so you can see how much the choice matters.

Also called: Binomial confidence interval calculator.

## Inputs
- Successes (x) (default 7)
- Trials (n) (default 20)
- Confidence level (unit %; default 95)
- Method (options: Wilson score (recommended), Clopper–Pearson exact, Agresti–Coull, Wald (normal approximation); default wilson)

## Results
- Lower limit
- Upper limit
- Sample proportion
- Half-width (points)
- Method

## Formula

```
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)
```

Where:
- x: successes
- n: trials
- p̂: x ÷ n
- z: two-sided normal critical value
- Beta(q; a, b): quantile of the beta distribution

## Worked example
1. p̂ = 7 ÷ 20 = 0.35; z = 1.96, z² = 3.8415.
2. Centre = (0.35 + 0.09604) ÷ 1.19207 = 0.37417; half-width = 1.6442 × √(0.011375 + 0.002401) = 0.19296.
3. Interval: 0.1812 to 0.5671. The exact method gives 0.1539 to 0.5922.

**Result:** 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.

## Related calculators
- [Wilson Score Interval Calculator](https://calculators.geekmidst.com/calculators/wilson-score-interval-calculator)
- [Confidence Interval Calculator](https://calculators.geekmidst.com/calculators/confidence-interval-calculator)
- [Sample Size Calculator](https://calculators.geekmidst.com/calculators/sample-size-calculator)
- [A/B Test Significance Calculator](https://calculators.geekmidst.com/calculators/ab-test-conversion-significance-calculator)

Source: GM¹X CalcVerse — https://calculators.geekmidst.com/calculators/confidence-interval-proportion-calculator
