Sample Size for a Proportion

n=z2p(1p)E2n = \frac{z^{2} \, p (1 - p)}{E^{2}}

Enter your known values, leave one input blank, and solves for the missing one. Try different units for next level excitement!

Learning zone

Polls quote a margin of error, and this formula is what sets it. Because the variance of a proportion is p(1 − p), which peaks at p = 0.5, using 0.5 gives the largest — safest — sample size when you have no prior idea of the answer. That is where the industry-standard "about 1,000 respondents for ±3 points" comes from: n = 1.96² × 0.25/0.03² ≈ 1,067. Notice how little the answer depends on p near the middle: at p = 0.4 the requirement drops only to about 1,025, so pollsters simply use 0.5 and stop worrying.

The trap is the "margin of error" quoted on a subgroup. A national poll of 1,067 has ±3 points overall, but the 150 respondents under 30 inside it carry ±8 points — and news coverage almost always reports the headline figure while discussing the subgroup. As with means, this covers sampling error only; nothing here protects you against a bad sampling frame. Reversed, the formula grades a poll you have been handed: 400 respondents at 95% confidence with p near 0.5 gives E = 1.96 × √(0.25/400) = 0.049, so ±4.9 points, not the ±3 the headline implied.

Sample Size for a Proportion
n=z2p(1p)E2n = \frac{z^{2} \, p (1 - p)}{E^{2}}
Where
  • nn= Required sample size
  • zz= Critical z-value
  • pp= Expected proportion
  • EE= Target margin of error
Missing one of these? Work it out first, then come back