Skip to content

Sample Size Calculator

Type the margin of error you can accept and your confidence level to get how many…

Type the margin of error you can accept and your confidence level to get how many people to survey, adjusted for a small population if you have one.

For a
%
%
Confidence
More optionsLarge population

ExampleSample size needed

1,068

1,068 responses give a margin of error of ±3% at 95% confidence. Halving the margin takes about four times as many.

Type your own numbers, or drag the chart.

Drag along the curve: bigger samples, smaller margins, with fast-falling returns.

Before rounding up
1,067.07
z for the confidence level
1.96
For half the margin
4,269
How this works: 8 sources,

How this works

Method

Start from the margin of error you can accept and solve its formula for n. For a percentage, E = z√(p(1 − p)/n), so n = z²·p(1 − p)/E². For ±3 points at 95% confidence (z = 1.96) and an expected result of 50%: n = 1.96² × 0.25 ÷ 0.03² ≈ 1,067.1, rounded up to 1,068. Full method

How it’s tested

2 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.

Privacy

On your device. Nothing you enter or open leaves this browser. About privacy labels

Changes

  • First published: live curves with draggable cut-offs, and tests on pasted data (t-tests, ANOVA, chi-square, Fisher’s exact, correlation, regression, A/B), checked against SciPy.

Every change on What’s new

How we make toolsReport a mistake

How to work out a sample size

Start from the margin of error you can accept and solve its formula for n. For a percentage, E = z√(p(1 − p)/n), so n = z²·p(1 − p)/E². For ±3 points at 95% confidence (z = 1.96) and an expected result of 50%: n = 1.96² × 0.25 ÷ 0.03² ≈ 1,067.1, rounded up to 1,068.

Use 50% when you don’t know what to expect: p(1 − p) is largest there, so the answer is safe for any result. If you expect around 10% or 90%, fewer are needed. For a small population, Cochran’s correction n = n₀ ÷ (1 + (n₀ − 1)/N) brings it down: ±5 points at 95% needs 385 from a large population but 323 from a population of 2,000.

The margin falls only with the square root of n, so halving it takes four times the responses: ±1.5 points needs about 4,269. This counts completed responses; if only one in five people answers, invite five times as many. And no sample size fixes a biased sample.

n = z² · p(1 − p) ÷ E² · finite N: n = n₀ ÷ (1 + (n₀ − 1)/N)

  • For estimating a proportion, the sample size n = z²p(1 − p)/E² is largest at p = 0.5, which gives a conservative size when the proportion is unknown. Source: Wikipedia, Sample size determination.
  • Cochran’s finite population correction reduces the required sample when it is a sizeable share of the whole population. Source: Wikipedia, Sample size determination.

Responses needed for a margin of error

Sample sizes for a percentage at 50%, by margin of error and confidence level, for a large population.

Sample sizes for a percentage at 50%, by margin of error and confidence level, for a large population.
Margin of error90%95%99%
±1%6,7649,60416,588
±2%1,6912,4014,147
±2.5%1,0831,5372,654
±3%7521,0681,844
±4%4236011,037
±5%271385664
±6%188267461
±7%139196339
±8%106151260
±10%6897166
Show all 11 rows
±15%314374

Common questions

Why do national polls use about 1,000 people?

Because 1,000 gives a margin of about ±3 points at 95% confidence whatever the country’s size, and going to ±2 would cost more than twice as many interviews. The population size barely matters once it is large.

What if my population is small?

Type it under More options. The correction lowers the number when the sample would be a big share of the population; surveying 385 of 400 employees is nearly a census.

How do I find the sample size for a mean?

Switch to Mean and type a guess of the standard deviation and the margin you want: n = (zσ/E)². To know an average within ±2 when σ is about 10, at 95% you need (1.96 × 10/2)² = 96.04, so 97 after rounding up.