Confidence Interval for a Proportion Calculator
Estimate a population proportion, or the difference between two proportions, from sample counts. Enter the number of successes x and the sample size n; the default Wald method matches the TI-84 1-PropZInt and 2-PropZInt screens, and the Wilson, Agresti–Coull, Clopper–Pearson, Jeffreys and Newcombe methods are one click away.
Planning a survey instead? The sample size calculator finds the n needed for a target margin of error. Part of the TI-84 statistics functions guide.
A decimal such as 0.95
A whole count, not a percentage
Related Calculators
One Proportion Z-Test Calculator
Test a sample proportion against a hypothesized value: z statistic, one- or two-tailed p-value, the exact binomial p-value and a Wilson confidence interval.
Two Proportion Z-Test Calculator
Compare two proportions with the pooled z-test: z statistic, p-value and a confidence interval for the difference (Wald, Newcombe or Agresti–Caffo).
Margin of Error Calculator
Measure sampling error for proportions and means at common confidence levels.
Learn More
Confidence Interval in Excel: CONFIDENCE.T and CONFIDENCE.NORM
Build a confidence interval for a mean or a proportion in Excel with CONFIDENCE.T, CONFIDENCE.NORM and the Descriptive Statistics ToolPak, and compare Wald with Wilson intervals.
Sensitivity, Specificity, PPV and NPV Explained
What sensitivity, specificity, PPV and NPV mean, how to calculate them from a 2×2 table, and why the predictive values fall when a condition is rare.
What a confidence interval for a proportion tells you
A sample proportion p̂ = x / n is only an estimate of the population proportion p. A confidence interval turns it into a range: if you repeated the survey many times and built an interval each time, about 95% of the 95% intervals would contain the true p. The width shrinks with the square root of the sample size, so halving the interval takes about four times as many observations.
Enter counts, not percentages: a poll that reports 41.2% of 1,000 people means x = 412. The margin of error quoted in news reports is half the width of the interval; the margin of error calculator shows how it depends on n, and the margin of error vs confidence interval guide explains the two terms. To test a claim about the proportion instead of estimating it, use the one proportion z-test.
Formulas
Wald (1-PropZInt): p̂ ± z* · √( p̂(1 − p̂) / n )
Wilson score: ( p̂ + z*²/2n ± z*·√( p̂(1 − p̂)/n + z*²/4n² ) ) / ( 1 + z*²/n )
Agresti–Coull: p̃ ± z*·√( p̃(1 − p̃) / ñ ), ñ = n + z*², p̃ = (x + z*²/2) / ñ
Clopper–Pearson: lower = Beta⁻¹(α/2; x, n − x + 1), upper = Beta⁻¹(1 − α/2; x + 1, n − x)
Jeffreys: Beta⁻¹(α/2; x + ½, n − x + ½) to Beta⁻¹(1 − α/2; x + ½, n − x + ½)
Difference, Wald: (p̂₁ − p̂₂) ± z* · √( p̂₁(1 − p̂₁)/n₁ + p̂₂(1 − p̂₂)/n₂ )
z* = invNorm(1 − α/2): 90% → 1.6449, 95% → 1.96, 99% → 2.5758
Every quantile and tail comes from a direct evaluation of the normal and beta distributions, so the limits stay accurate for samples of any size up to millions. Limits outside the possible range are cut at 0 and 1 (−1 and 1 for a difference).
Which method should I use?
| Method | Idea | Best for |
|---|---|---|
| Wald | Estimate ± z* standard errors: what introductory courses and the TI-84 use | Large n with at least 10 successes and 10 failures |
| Wilson score | Inverts the score test for p and never leaves 0 to 1 | The best all-round choice for one proportion |
| Agresti–Coull | Wald after adding about 2 successes and 2 failures | Hand calculation that beats Wald |
| Clopper–Pearson | Exact, from the binomial tails | When coverage must never fall below the stated level |
| Jeffreys | Equal-tailed Bayesian interval with a Beta(½, ½) prior | Small samples, coverage close to nominal |
Brown, Cai and DasGupta (2001) showed that the Wald interval can cover the true proportion far less often than its stated level, even for fairly large samples, and recommended Wilson or Jeffreys for small n and Agresti–Coull for larger n. The Wald interval is still what many courses and the TI-84 ask for, which is why it is the default here. For the difference of two proportions the Newcombe hybrid score and Agresti–Caffo intervals play the same role.
How to use 1-PropZInt on a TI-84
- Press STAT → TESTS.
- Choose A:1-PropZInt (or B:2-PropZInt for two proportions).
- Enter x (a whole-number count, not a percentage), n and C-Level.
- Highlight Calculate and press ENTER. The screen shows the interval, p̂ and n.
The TI-84 always returns the Wald interval, so leave the method on Wald to match it. More calculator functions are collected in the TI-84 statistics guide.
Worked example: a poll
In a poll of 1,000 voters, 412 support a proposal. Find a 95% interval.
- p̂ = 412 / 1000 = 0.412.
- SE = √(0.412 × 0.588 / 1000) = 0.015565; margin of error = 1.96 × 0.015565 = 0.0305.
- Wald interval: (0.3815, 0.4425), between about 38% and 44% support.
With a sample this large the methods agree to the third decimal:
| Method | 95% interval | Width |
|---|---|---|
| Wald | (0.3815, 0.4425) | 0.061 |
| Wilson score | (0.3819, 0.4428) | 0.0609 |
| Agresti–Coull | (0.3819, 0.4428) | 0.0609 |
| Clopper–Pearson (exact) | (0.3813, 0.4432) | 0.0619 |
| Jeffreys | (0.3818, 0.4427) | 0.0609 |
That ±3 percentage points is the "margin of error" quoted in news reports. Load example fills in these numbers.
Worked example: a small sample
In a pilot run of 20 units, 2 were defective (p̂ = 0.1). The Wald limit 0.1 − 1.96 × 0.067082 = −0.0315 is below zero, so it is cut at 0; the other methods disagree noticeably:
| Method | 95% interval | Width |
|---|---|---|
| Wald | (0, 0.2315) | 0.2315 |
| Wilson score | (0.0279, 0.301) | 0.2732 |
| Agresti–Coull | (0.0157, 0.3132) | 0.2976 |
| Clopper–Pearson (exact) | (0.0123, 0.317) | 0.3046 |
| Jeffreys | (0.0214, 0.2839) | 0.2625 |
The Wald interval is too optimistic here: it starts at 0 even though two defects were observed. With no successes at all (x = 0) the Wald interval collapses to the single point 0, while Wilson, Clopper–Pearson and Jeffreys still give an upper limit (for example 0.1332, 0.1372 and 0.0947 for 0 of 25).
Worked example: two proportions
120 of 400 customers who saw design A clicked, versus 90 of 380 who saw design B. Find a 95% interval for p₁ − p₂.
- p̂₁ = 0.3, p̂₂ = 0.2368, difference = 0.0632.
- SE = √(0.3 × 0.7/400 + 0.2368 × 0.7632/380) = 0.031633; margin of error = 1.96 × 0.031633 = 0.062.
- Wald interval: (0.0012, 0.1252).
| Method | 95% interval for p₁ − p₂ |
|---|---|
| Wald | (0.0012, 0.1252) |
| Newcombe hybrid score | (0.0009, 0.1246) |
| Agresti–Caffo | (0.0008, 0.1247) |
The whole interval is above 0, so design A's click rate is significantly higher at the 5% level, though the difference could be as small as 0.1 percentage points. The two proportion z-test reports the matching p-value, and the A/B test calculator adds relative uplift and a check of the traffic split.
Software equivalents
| Software | One proportion | Difference of two proportions |
|---|---|---|
| Excel / Sheets | Wald: =p-NORM.S.INV(1-alpha/2)*SQRT(p*(1-p)/n) and the same with + | Wald: =(p1-p2)±NORM.S.INV(1-alpha/2)*SQRT(p1*(1-p1)/n1+p2*(1-p2)/n2) |
| R | binom.test(x, n)$conf.int (Clopper–Pearson); prop.test(x, n, correct = FALSE)$conf.int (Wilson score) | prop.test(c(x1, x2), c(n1, n2), correct = FALSE)$conf.int (Wald) |
| Python | statsmodels: proportion_confint(x, n, alpha=0.05, method="wilson") | statsmodels: confint_proportions_2indep(x1, n1, x2, n2, method="newcomb") |
| TI-84 | STAT → TESTS → A:1-PropZInt | STAT → TESTS → B:2-PropZInt |
For a continuous measurement instead of a yes/no outcome, use the confidence interval calculator or the z-test. Background reading: confidence intervals explained.
Frequently Asked Questions
What conditions are needed for a proportion confidence interval?
A random sample, independent observations (the sample is less than 10% of the population when sampling without replacement), and, for the Wald interval, at least 10 successes and 10 failures in each sample so the normal approximation holds. The Wilson, Clopper–Pearson and Jeffreys intervals stay usable when those counts are smaller.
Which confidence interval for a proportion should I use?
Use the Wilson score interval as an all-round default for one proportion; it is reliable for small samples and never leaves 0 to 1. Use Clopper–Pearson when the coverage must never fall below the stated level. Use Wald only for large samples or when a course or the TI-84 requires it. For a difference of two proportions, Newcombe or Agresti–Caffo are safer than Wald.
Why does the TI-84 give an error when I enter a percentage?
1-PropZInt needs x as a whole-number count. If a report says 41.2% of 1,000 people, enter x = 412, not 0.412 or 41.2. This calculator enforces the same rule and tells you which field to correct.
Why is my Wald interval (0, 0), or does it go outside 0 to 1?
The Wald standard error is √(p̂(1 − p̂)/n), which is zero when x = 0 or x = n, so the interval collapses to a single point, and with few successes the lower limit can fall below 0. This is a known weakness of the Wald method. Choose Wilson, Clopper–Pearson or Jeffreys to get a sensible interval, for example an upper limit of about 0.1332 for 0 successes in 25.
How do I make the interval narrower?
Increase the sample size or lower the confidence level. The margin of error shrinks with 1/√n, so halving it requires about four times as many observations.
How do I calculate the margin of error for a proportion?
For the Wald interval the margin of error is z* × √(p̂(1 − p̂)/n), for example 1.96 × √(0.412 × 0.588 / 1000) = 0.0305 for 412 of 1000 at 95% confidence. The margin of error calculator shows how it changes with the sample size and the confidence level. Intervals such as Wilson are not symmetric, so half the width is only an approximate margin.
What is the difference between the Wilson and Clopper–Pearson intervals?
Clopper–Pearson is the exact interval from the binomial distribution and guarantees at least the stated coverage, which makes it conservative and a little wider. Wilson uses a normal approximation to the score test, is narrower, and its actual coverage stays close to the stated level on average. Both are far more reliable than Wald for small samples.
Is this the same as the Wald interval?
With the default method, yes. 1-PropZInt uses the standard Wald interval p̂ ± z*·√(p̂(1 − p̂)/n), which is what introductory courses and the TI-84 use. Switch the interval method to Wilson, Agresti–Coull, Clopper–Pearson or Jeffreys for more accurate limits, or compare them all in the table under the result.
How do I find a confidence interval for a proportion in Excel?
Excel has no built-in function for it, so type the Wald formula: =p-NORM.S.INV(1-alpha/2)*SQRT(p*(1-p)/n) for the lower limit and the same with + for the upper limit, where p is x/n. For a Wilson or exact interval, use this calculator or R's binom.test and prop.test.
Embed This Calculator
Add this free calculator to your course page or LMS.
Adjust the height value to fit your page.