Skip to content

Sample Size Calculator

How many responses you need for a given margin of error and confidence.

Estimating a

Half the width of the interval you want.

Use 50 if you have no idea; it gives the largest sample.

Calculated on your device. Nothing you enter is sent anywhere.

Sample size needed

Sample size needed: 1,068

A sample of 1,068 gives a margin of ±3 percentage points at 95% confidence.

Before rounding up
1,067.0719
Critical value z
1.959964

In short

The sample size needed depends on how precise you want to be and how confident. For a percentage, n = z² × p(1 − p) ÷ E², using p = 50% when you have no estimate, which gives the safest, largest answer. For a mean, n = (zσ ÷ E)². Always round up: a 95% survey with a ±5% margin needs 385 responses.

How it works

Percentage

n = z² × p(1 − p) ÷ E²

Mean

n = (z × σ ÷ E)²

E is the margin of error and z the critical value: 1.645 for 90%, 1.960 for 95% and 2.576 for 99%. Halving the margin quadruples the sample. These formulas assume a random sample from a population much larger than the sample; they are the ones in OpenStax Introductory Statistics and the NIST/SEMATECH handbook.

Worked examples

A poll within ±3 points at 90% confidence

1.645² × 0.25 ÷ 0.03² = 751.54, so survey 752 people, as in OpenStax Example 8.14.

Open this example in the calculator

A mean within ±2 when σ = 15, at 95%

(1.96 × 15 ÷ 2)² = 216.082, so 217 observations (Example 8.7).

Open this example in the calculator

A survey within ±5 points at 95%

1.96² × 0.25 ÷ 0.05² = 384.146, so 385 responses.

Open this example in the calculator

Using this calculator well

  • Plan for non-response. If you expect 1 in 4 people to reply, invite four times the sample size.
  • Subgroups need their own samples. A ±5 point margin overall becomes much wider for a subgroup that is only a fifth of the sample.
  • Bias isn’t fixed by size. A large self-selected sample can be further off than a small random one.

Frequently asked questions

How many people do I need to survey?

For a ±5 point margin at 95% confidence, about 385; for ±3 points, about 1,068; for ±1 point, about 9,604. These assume a random sample and p = 50%. Smaller margins cost much more because the sample grows with the square of 1 ÷ margin.

Why use 50% when I don’t know the proportion?

p(1 − p) is largest at p = 0.5, so 50% gives the biggest, safest sample. If earlier data suggest 10% or 90%, p(1 − p) is 0.09 instead of 0.25 and you need only about a third as many responses.

Does population size matter?

Hardly, as long as the sample is a small part of the population. The same 385 responses give ±5 points whether you survey a city or a country. When the sample is a large fraction of a small population, a finite population correction lowers the number needed.

What if I don’t know the standard deviation?

Use an estimate from a small pilot study or from earlier research on a similar group. After collecting the data, use the sample standard deviation and a t interval to report the actual margin.

Sources and methodology

  1. Introductory Statistics 2e, 8.1 A Single Population Mean Using the Normal Distribution and 8.3 A Population Proportion, OpenStax, Rice University, n = z²σ² ÷ EBM² (§8.1, Example 8.7: σ = 15, EBM = 2, 95% → 216.09, round up to 217); n = z²p′q′ ÷ EBP² (§8.3, Example 8.14: EBP = 0.03, 90%, p′q′ = 0.25 → 751.7, round up to 752) (accessed November 24, 2026)
  2. NIST/SEMATECH e-Handbook of Statistical Methods, 7.2.2.2 Sample sizes required, National Institute of Standards and Technology, to estimate a mean within δ at 95% with σ known: N ≥ (1.96 ÷ δ)²σ² (accessed November 24, 2026)

Rounding: The critical value is computed to about 15 digits (1.959964 for 95%, not 1.96), and the sample size is always rounded up.

Review status: formulas verified against the cited sources by automated tests; editorial review pending. Version 1.0.0, content updated November 24, 2026.

Changelog
  • 1.0.0 · November 24, 2026: First published.

How we build and test calculators

Embed this calculator on your site

Paste this code into your page. The calculator runs in a frame, with no tracking and no cookies, and links back here for the formula and sources.

<iframe src="https://northcalculator.com/embed/en/sample-size" title="Sample Size Calculator" width="100%" height="760" style="border:0" loading="lazy"></iframe>