Sample Size for a Proportion Calculator

This 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²

Try an example
Method

How to Calculate Sample Size for a Proportion

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

n = z*² · p(1 − p) / E²

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
Worked examples

Sample Size Examples

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.

Large population

A poll wants ±3 points at 95% confidence, no prior estimate.

z*
1.96
p
0.5 (conservative)
n
1.96² × 0.25 ÷ 0.03² = 1067.07

1,068 respondents

Small population

An employer with 2,000 staff wants ±5 points at 95%.

Uncorrected n₀
0.9604 ÷ 0.0025 = 384.15
Correction
384.15 ÷ (1 + 383.15/2000)
Corrected
322.39

323 completed responses (not 385)

Background

Does Population Size Affect Sample Size?

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.

Questions

Sample Size Calculator for a Proportion FAQ

What is the sample size formula for a proportion?
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.
What value of p should I use if I have no idea?
Use 0.5. The product p(1 − p) is largest at p = 0.5, so it gives the most conservative (largest) sample size — enough whatever the true proportion turns out to be. If a pilot study or past data suggest p is near 0.2, using 0.2 gives a smaller, still adequate n.
Why do so many polls use about 1,000 people?
Because at 95% confidence and p = 0.5, a sample of 1,068 gives a margin of error of ±3 percentage points, and the margin shrinks slowly after that — ±2 points needs 2,401 people and ±1 point needs 9,604. Around a thousand is where extra precision starts getting expensive.
What is the finite population correction?
When the sample is a sizeable fraction of a small population (say, surveying 300 of 2,000 employees), each response tells you more, so you need fewer. The corrected size is n = n₀ ÷ (1 + (n₀ − 1) ÷ N). For populations over about 20 times the sample, the correction barely matters.
Does this account for non-response?
No, the sample size calculator does not account for non-response: the result is the number of completed responses you need. If you expect a 40% response rate, invite n ÷ 0.4 people, so 1,068 completes needs 2,670 invitations. Non-response can also bias the results, which no sample size fixes, so follow up with non-responders where you can.