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.
Example
You enter
- Planning proportion (0 to 1; use 0.5 for worst case) 0.5
- Target margin of error (0 to 1) 0.03
- Confidence level 95
You get
- Required sample size n 1068
- z critical (two-tailed) 1.96
- Unrounded n 1067.11
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
- Two-tailed z critical values are two-tailedconvention
- Planning proportion p = 0.5 is the conservative default; a smaller planning p reduces nCochran worst-case rule
- Infinite population no finite-population correction appliedthis tile is the simple-random-sample form