Sample Size for Proportion

How many people do you need to survey? The sample size for a proportion depends on how precise you want to be, how confident you want to be, and what proportion you expect. Enter an estimated proportion (use 0.5 if you have no idea — it gives the largest, safest sample size), your margin of error and your confidence level, and the calculator gives the sample size you need.

Sample Size for Proportion Calculator

n = z*² × p(1 − p) ÷ E² — how large must your sample be?

Example: for a 95% interval with a ±5% margin of error and no prior estimate, you need 385 people.

How to Calculate Sample Size for a Proportion

The sample size formula is 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 you will accept. Work out the number, then always round up — rounding down would make your margin of error slightly larger than you asked for.

Why Use p = 0.5 When You Have No Estimate?

The product p(1 − p) is largest when p = 0.5, so using 0.5 gives the largest sample size — the safe, conservative choice. If you have a good prior estimate, such as p = 0.2 from a pilot study, you can use it and get a smaller required sample. But if your guess is wrong, your interval may end up wider than planned, so only use a prior estimate you trust.

How Margin of Error and Confidence Affect Sample Size

Halving the margin of error quadruples the sample size, because E is squared in the denominator. Raising the confidence level from 95% to 99% increases z* from 1.96 to 2.576, which multiplies the sample size by about 1.73. That is why most surveys use 95% confidence and a ±3% to ±5% margin of error: tighter precision gets expensive fast.

Worked Examples

Example 1: 95% confidence, ±5% margin, no prior estimate: n = 1.96² × 0.5 × 0.5 ÷ 0.05² = 384.16, so 385 people. Example 2: Same, but ±3% margin: n = 1.96² × 0.25 ÷ 0.03² = 1,067.1, so 1,068 people. Example 3: 90% confidence, ±5% margin, prior estimate p = 0.3: n = 1.645² × 0.3 × 0.7 ÷ 0.05² = 227.3, so 228 people.

Sample Size for Proportion FAQs

What is the sample size formula for a proportion?

n = z*² × p(1 − p) ÷ E². Use z* = 1.645 for 90%, 1.96 for 95% and 2.576 for 99% confidence, and always round the answer up.

Why do you round the sample size up?

Rounding down would give a margin of error slightly larger than the one you asked for. Rounding up guarantees the interval is at least as precise as planned.

What if my population is small?

For a small population, apply the finite population correction: n_adj = (n × N) ÷ (n + N − 1), where N is the population size. For large populations it makes almost no difference.

Related tools: Proportion Confidence Interval · Sample Proportion · One-Proportion Z-Test · Statistics