Sample size calculator

Choose whether you estimate a proportion or a mean, then enter the confidence level and the margin of error you can accept. Add the population size to correct for a small population.

From 50 to under 100, usually 90, 95 or 99.
For a proportion, in percentage points (5 means ±5%). For a mean, in the units of the data.
Used for a proportion. Use 50 if unknown: it gives the largest sample.
Used for a mean: an estimate of the population standard deviation.
Leave empty for a very large or unknown population.
Required sample size385
z for this confidence level
1.959964
Before population correction
384.14588

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Pick proportion or mean.
  2. Enter the confidence level and the margin of error.
  3. For a proportion give the expected percentage (50 if unknown); for a mean give the standard deviation.
  4. Optionally enter the population size.

How it works

For a proportion n₀ = z² · p(1 − p) / e². For a mean n₀ = (z · σ / e)². With a population N the size is reduced to n = n₀ / (1 + (n₀ − 1) / N). The result is always rounded up to a whole number.

Worked example

95% confidence, margin ±5%, p = 50%: z = 1.959964, n₀ = 3.841459 × 0.25 / 0.0025 = 384.15, so 385 people. In a population of 1000 the correction gives 384.15 / 1.383 = 277.7, so 278. For a mean with σ = 15 and e = 2: (1.959964 × 15 / 2)² = 216.08, so 217.

Tips

  • Halving the margin of error needs about four times the sample.
  • Sample size does not repair a biased sampling method.

Frequently asked questions

Why use 50% when I do not know the proportion?

The product p(1 − p) is largest at p = 0.5, so 50% gives the biggest, safest sample size.

When does the population size matter?

When the sample would be a noticeable share of the population. The correction n = n₀ / (1 + (n₀ − 1) / N) shrinks the sample; for a very large population it makes almost no difference.

Where does z come from?

From the normal distribution: it is the value with the central area equal to your confidence level, 1.959964 for 95%.

Does this cover non-response?

No. The result is the number of completed responses you need. If you expect a share of people not to respond, invite proportionally more.

More in Math

All tools in this category: Math ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.