Sample Size for a Target Margin of Error
The inverse of the proportion confidence interval: the sample size n needed so a Wald margin of error meets a target. n = z^2 * p(1-p) / E^2, rounded up. A survey wanting +/- 3 points at 95% with the worst-case p = 0.5 needs 1,068 responses. A planning figure; use Wilson / Clopper-Pearson for small p or n.
Formula and source
n = z^2 * p * (1 - p) / E^2, rounded up to the next integer. Inverse of the proportion Wald margin of error E = z * sqrt(p*(1-p)/n). z critical values (two-tailed) from the standard normal: 80% = 1.2816, 90% = 1.6449, 95% = 1.9600, 98% = 2.3263, 99% = 2.5758. p = 0.5 maximizes p(1-p) and gives the conservative (largest) n.
Standard survey-sampling / inferential statistics. Follows directly from inverting the Wald CI (Wald 1943); the p = 0.5 worst-case planning value is the textbook convention (Cochran, 'Sampling Techniques,' 3rd ed., 1977).
Audience
This tile is built for trades and the adjacent professions in the Educators and K-12 group. The interactive calculator runs entirely in your browser. No account, no fee, no advertising, no tracking.
Related tools
Posture
Rough Logic answers the math question the working professional asks on the job. The site is a calm, fast, ad-free, account-free, ever-free reference. It does not interpret code. It does not replace the licensed professional. It does not store your inputs. The Authority Having Jurisdiction governs all installations and inspections.