What it is and when to use it
This calculator works the standard sample-size formula backwards: instead of computing a confidence interval from a sample you already collected, it tells you how large a sample you need to collect so that the resulting confidence interval comes out no wider than a target you choose. That makes it a planning tool for the design stage of a study, survey, or A/B test, before any data collection starts.
Use it whenever precision is the deciding factor in your study design — for example, "we need the estimate accurate to within 2 units" rather than "we need to detect a specific effect size." It assumes you have a reasonable estimate of the population standard deviation (sigma) from prior data, a pilot study, or published research, and that the sampling distribution of the mean is approximately normal, which is a standard assumption for large-sample confidence intervals.
n = (z × σ / ME)², where ME = width / 2
Worked example
You want a 95% confidence interval no wider than 4 units, and prior data suggests a standard deviation of 12. Margin of error = 4 / 2 = 2. n = (1.96 × 12 / 2)² = (23.52 / 2)² = 11.76² = 138.30, rounded up to 139 — matching the calculator's default output of "Moderate survey scale." If you relaxed the target width to 8, the margin of error doubles to 4 and the required sample size drops to (1.96 × 12 / 4)² = 5.88² ≈ 34.57, rounded up to 35, showing how sharply sample size requirements grow as your precision target tightens.
Common mistakes and how to interpret the result
- Guessing sigma instead of estimating it from real data. The required sample size is proportional to sigma squared, so an inaccurate standard deviation estimate can make your planned sample size far too small or unnecessarily large.
- Confusing interval width with margin of error. The calculator asks for the full target width, then internally halves it to get the margin of error used in the formula — entering the margin of error into the width field will double the effective precision target.
- Not accounting for non-response or dropout. This n is the number of completed, usable observations required; if you expect a response rate below 100%, oversample accordingly.
- Treating the confidence level as a probability about a single interval. A 95% confidence level means that if you repeated the sampling process many times, about 95% of the resulting intervals would contain the true population value — it does not mean there is a 95% chance the true value falls in this specific interval.