CalculateItNow home

Sample Size Calculator

How many people to survey for a given margin of error and confidence level, using Cochran's formula with the finite population correction.

Sample Size Calculator: with the default inputs, required sample size is 385.

%
%
Try an example
Required sample size
385

Completed responses needed — always rounded up.

Before the population correction
385
Critical z value
1.959964
Share of the population needed
Population correction
No correction — the population is treated as effectively infinite
Assumptions
  • Simple random sampling with no design effect and no non-response bias.
  • The sample size is for estimating one proportion; means and subgroup analyses need larger samples.
  • The normal approximation to the binomial holds (roughly n·p and n·(1−p) both above 10).
  • Results are always rounded up to a whole person and clamped at zero.
What each margin of error costs in interviews
05,0001357910Margin of error (± percentage points)
Sample at 95% confidence
What each margin of error costs
Margin of errorInfinite populationSame (no population given)
1%9,6049,604
2%2,4012,401
2.5%1,5371,537
3%1,0681,068
4%601601
5%385385
10%9797

Halving the margin of error quadruples the sample. That square-law is the single most useful fact in survey planning.

Math verified by automated testsUpdated 2026-09-092 sources cited

How this is worked out

The formula

Cochran's formula (infinite population):
  n₀ = z² × p × (1 − p) ÷ e²

Finite population correction:
  n = n₀ ÷ (1 + (n₀ − 1) ÷ N)

z = critical value for the confidence level (1.959964 at 95%)
p = expected proportion   e = margin of error (as a decimal)   N = population size
Always round n up.

Open How it’s calculated above to see this worked through with your own numbers.

What you enter

Confidence level
Choose one of 4 options.90% · 95% (standard) · 99% · Custom…
Margin of error
The ± you are willing to live with. ±5 points is the usual survey default.a percentage · from 0.01 to 50 · defaults to 5
Expected proportion
Your best guess at the answer. 50% is the safe choice — it needs the largest sample.a percentage · from 0 to 100 · defaults to 50
Population size
How many people exist in the group. Leave at 0 if it is very large or unknown.from 0 to 1000000000000 · whole numbers only · defaults to 0
Custom confidence level(under More options)
Only used when Confidence level is set to Custom.a percentage · from 50 to 99.99 · defaults to 95

What you get back

Required sample sizemain answer
Completed responses needed — always rounded up.
Before the population correction
Critical z value
Share of the population needed
Only meaningful when a population size is given.
Population correction

What this assumes

  • Simple random sampling with no design effect and no non-response bias.
  • The sample size is for estimating one proportion; means and subgroup analyses need larger samples.
  • The normal approximation to the binomial holds (roughly n·p and n·(1−p) both above 10).
  • Results are always rounded up to a whole person and clamped at zero.

About this calculator

Before you run a survey, this tells you how many completed responses you need. It answers the question people usually ask backwards — "is 400 responses enough?" — by starting from the precision you want and working out the sample that delivers it.

The three dials

  • Confidence level — how often the method should capture the truth. 95% is the near-universal default; 99% buys more certainty at the cost of a bigger sample.
  • Margin of error — the ± you are willing to publish. ±5 points is standard for opinion polling, ±3 for anything used to make a decision.
  • Expected proportion — your prior guess at the answer. If you genuinely don't know, leave it at 50%: that is where p(1 − p) is largest, so it gives the most conservative (largest) sample. If you already know the answer is near 10% or 90%, saying so can cut the sample by nearly two-thirds.

The population size surprise

Almost everyone expects that a bigger population needs a bigger sample. It doesn't. Once the population is more than about twenty times your sample, the correction is negligible: a ±5% / 95% survey needs 385 responses whether your population is 50,000 or 50 million. That is why national polls of 1,000 people work.

The finite population correction only bites when your sample would be a big fraction of the whole group — surveying 200 members of a 400-person company, say. Leave the population at 0 for the standard, slightly conservative answer.

How to read the result

The number is completed responses, not invitations sent. If you expect a 20% response rate, you need to contact five times as many people. Plan for that separately, and remember that non-response is rarely random — the people who ignore surveys often differ systematically from those who answer, and no sample-size formula corrects for that.

Where it misleads

  • The formula assumes simple random sampling. Convenience samples, panel samples and quota samples all have larger effective margins than this arithmetic suggests; survey firms apply a "design effect" multiplier, often 1.5 to 2.0, to compensate.
  • It is a formula for one overall proportion. If you want ±5% within each of six subgroups, you need this sample size for each subgroup.
  • The margin applies to percentages. Margins for means need the standard deviation instead — use the confidence interval calculator.
  • Statistical precision is not the same as being right. A perfectly sized sample from a bad frame gives you a confident wrong answer.

Frequently asked questions

How many people do I need for a statistically valid survey?

For ±5% at 95% confidence, 385 completed responses — regardless of how big the population is, as long as it is more than a few thousand. For ±3% you need 1,068.

Why does 50% give the biggest sample size?

The formula depends on p(1 − p), which peaks at p = 0.5. Using 50% when you don't know the answer guarantees your sample is large enough whatever the true value turns out to be.

Does a bigger population need a bigger sample?

Barely. Above roughly 20,000 people the required sample stops growing. Precision depends on the absolute number of responses, not on the share of the population they represent.

What is the finite population correction?

A shrink factor, n₀ ÷ (1 + (n₀ − 1)/N), that reduces the required sample when it would otherwise be a large fraction of the whole population. Sampling 200 of 400 people already tells you a lot about those 400.

Is this the sample size for an A/B test?

No. A/B tests size for detecting a difference between two groups at a given statistical power, which needs a different formula. This one sizes for estimating a single proportion.

Put this calculator on your own site

A working sample size, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.

Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.

Sample Size Calculator by CalculateItNow

The page's own title. The clearest description of what the link leads to.

The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.

Browse every calculator widget·How to add it to WordPress, Squarespace or Wix

The questions people ask next to a sample size.

All math calculators·Browse everything