Sample size for a margin of error
The sample size for a target margin of error is the squared ratio of the critical value to that margin, times p-star times one minus p-star, rounded up.
Set the margin of error formula equal to your target and solve for n, which gives , where (p-star) is a planning value for the proportion. With no prior estimate, use , because is largest there and so gives the safe upper bound on the sample size. For example, for a margin of error of 0.03 at 95% confidence, , so you survey 1068 people. Always round up, never to the nearest whole number, since rounding down would leave the margin of error above your target.
More confidence intervals terms, or browse the full statistics glossary.