Proportion Confidence Interval Calculator
Build a confidence interval for one population proportion with the Wald, Wilson and Agresti–Coull methods side by side.
Open → Proportion Confidence Interval CalculatorThis sample size calculator for a proportion finds how many responses you need to estimate a proportion to within a chosen margin of error. Pick the confidence level, enter the margin and your best guess at the proportion (0.5 if unknown), and optionally the population size for the finite population correction.
Formula n = z²·p(1 − p) ⁄ E²
| Margin of error | 90% | 95% | 99% |
|---|
Sample sizes at your chosen p and population size.
Sample size for a proportion is n = z*² · p(1 − p) ÷ E², the margin of error formula solved for n and always rounded up. At 95% confidence with p = 0.5, a ±3-point margin needs 1,068 responses and a ±5-point margin needs 385, because halving the margin quadruples the sample.
Start from the margin of error
E = z*·√(p(1 − p)/n) — the same quantity a confidence interval adds and subtracts.
Square and rearrange
n = z*²·p(1 − p) ÷ E². Note the E² — halving the margin quadruples the sample.
Round up
1,067.07 becomes 1,068. You cannot survey a fraction of a person, and rounding down misses the target.
Correct for a small population
If N is known and not much larger than n, use n₀ ÷ (1 + (n₀ − 1)/N).
Sample size for a proportion. With p = 0.5 and 95% confidence this is 0.9604 ÷ E².
| Margin (95%, p = 0.5) | Sample size |
|---|---|
| ±10% | 97 |
| ±5% | 385 |
| ±4% | 601 |
| ±3% | 1,068 |
| ±2% | 2,401 |
| ±1% | 9,604 |
These sample size examples compare a large and a small population. A poll wanting ±3 points at 95% confidence with no prior estimate needs 1,068 respondents, while an employer with 2,000 staff wanting ±5 points needs 323 completed responses rather than 385 once the finite population correction is applied.
A poll wants ±3 points at 95% confidence, no prior estimate.
1,068 respondents
An employer with 2,000 staff wants ±5 points at 95%.
323 completed responses (not 385)
A counter-intuitive fact: a survey of 1,068 people has the same ±3 point margin whether the population is a city of 500,000 or a country of 300 million. The margin of error depends on n, not on N, as long as the population is much larger than the sample. Only when you sample a large share of a small population does N enter, through the finite population correction.
Sample size also only controls random error. A biased sample — only people who answer the phone, only customers who complain — stays biased no matter how big it is.
Once the data are in, compute the sample proportion and its confidence interval, or test a claim with the one proportion z-test. Comparing two groups needs each group to be large enough; the two proportion z-test page explains why. Background: proportions in statistics.
n = z*² × p(1 − p) ÷ E², where z* is the critical value for your confidence level, p is your best guess at the proportion, and E is the margin of error as a decimal (±3 points = 0.03). Always round up to the next whole number, because rounding down would give a margin slightly larger than you asked for.n = n₀ ÷ (1 + (n₀ − 1) ÷ N). For populations over about 20 times the sample, the correction barely matters.