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

Checked against published worked examples from: Cochran (1977), standard survey sampling.

Details, formula, and sources

Scopen = 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 or tablen = 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.

Source and editionStandard 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).

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

What governsEstimate 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.

API field namesproportion, target_moe, confidence_pct, required_n, z_critical, exact_n

Related tools