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.

Run the calculator

Example

You enter

You get

Details, formula, and sources

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.

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

Universal reference; covered in any introductory statistics or survey-methods textbook (Moore, McCabe; Cochran; OpenIntro Statistics).

Estimate only. Readability formulas and similar metrics are derived from a representative population and have known edge-case noise. The classroom teacher governs final text selection, grade placement, and assessment decisions.

Field names used by the API: proportion, target_moe, confidence_pct, required_n, z_critical, exact_n

Related tools