Skip to content

Sample Size Calculator

Find the sample size needed for a survey or poll, with an optional finite population correction, or the margin of error of an existing sample.

MathUpdated Free · No sign-up

How to use the Sample Size Calculator

  1. Pick what you want to work out using the tabs: Find sample size or Find margin of error.
  2. Choose Confidence level.
  3. Enter Margin of error.
  4. Enter Population proportion (Use 50% if unsure: it gives the largest (safest) sample).
  5. Add any optional details you have; leave the rest blank.
  6. Read your answer in the results panel. It updates as you type, and the breakdown, step-by-step working and any charts or tables appear below it.
  7. Use Share link to save or send the exact calculation, or Copy to paste the results elsewhere.

How sample size is calculated

When you estimate a proportion, such as the share of customers who would recommend you, the required sample size depends on three things: how confident you want to be, how precise the estimate must be, and how varied you expect the answers to be.

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

  • z is the critical value for your confidence level: 1.645 for 90%, 1.960 for 95% and 2.576 for 99%.
  • p is the expected proportion. If you have no idea, use 50%, which gives the largest and therefore safest sample.
  • E is the margin of error, as a decimal (5% = 0.05).

Worked example

At 95% confidence, a ±5% margin and p = 50%: n₀ = 1.96² × 0.5 × 0.5 ÷ 0.05² ≈ 384.15. Always round up, so you need 385 responses. This is why so many polls survey about 400 people.

Small populations

If the whole population is small, for instance 1,000 employees, you can get the same precision with fewer responses. Apply the finite population correction:

n = n₀ ÷ (1 + (n₀ − 1) ÷ N)

With N = 1,000 the requirement falls from 385 to 278. Once the population is more than about 20 times the sample, the correction makes almost no difference, so leave the field blank for large or unknown populations.

Margin of error for an existing sample

Turn the formula around to judge results you already have: E = z × √(p(1 − p) ÷ n). A poll of 500 people with a 50/50 split has a margin of about ±4.4% at 95% confidence. Halving the margin of error needs four times the sample, because precision improves with the square root of n.

Practical caveats

  • These formulas assume a random sample. A large but biased sample, such as an opt-in web poll, can be far less accurate than the margin of error suggests.
  • Plan for non-response. If you expect 25% of invitations to be answered, invite four times the number you need.
  • If you will analyse subgroups, such as men and women separately, each subgroup needs to be large enough on its own.
  • For estimating a mean rather than a proportion, use n = (zσ ÷ E)², which needs an estimate of the standard deviation σ.

Frequently asked questions

Why is 385 the usual sample size?

It is what you need for a ±5% margin of error at 95% confidence when the expected proportion is 50% and the population is large.

Why use 50% for the population proportion?

p(1 − p) is largest at p = 0.5, so it gives the most conservative (largest) sample size. Use a different value only if you have good prior data.

Does population size matter?

Only when the population is small. For large populations the required sample is nearly the same whether there are 100,000 or 100 million people.

How do I halve my margin of error?

You need roughly four times as many responses, because the margin of error shrinks with the square root of the sample size.