Skip to content
DailyCalc

Sample Size Calculator

How many responses a survey needs for a given margin of error and confidence level.

Last updated

Your details

%
%

Use 50% if unknown — it needs the largest sample.

Optional — leave blank for a very large population.

Result

Sample size needed
385

For a large or unknown population

Before the population correction
385
Critical z
1.95996
For half the margin
1,537

Halving the error costs four times the sample

± 5% at 95% confidence…

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

z² = 1.96² = 3.841459

p(1−p) = 0.25, e² = 0.0025

3.8415 × 0.25 ÷ 0.0025

n = 385

Formula — written step by step

For ± 5% at 95% confidence…

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

z = 1.95996, z² = 3.841459

p(1−p) = 0.25

e² = 0.05² = 0.0025

3.841459 × 0.25 ÷ 0.0025

n = 385

e is the margin of error you will accept and p the proportion you expect. With p unknown, 50% is used, which needs the largest sample and so is the safe assumption.

A worked example

Surveying a small organisation

Population
500 employees
Target margin
± 5%
Confidence
95%
  1. Uncorrected: n₀ = 384.15
  2. Correction: n = n₀ ÷ (1 + (n₀ − 1) ÷ N)
  3. n = 384.15 ÷ (1 + 383.15 ÷ 500)
  4. n = 384.15 ÷ 1.7663

218 responses needed, not 385

The finite-population correction matters here because the sample is a large share of the whole. For a population of 500,000 the same target would still need 384 — the correction only bites when you are sampling a meaningful fraction of everyone.

How to use this calculator

  1. Set the margin of error you are willing to live with. This drives the answer more than anything else.
  2. Pick a confidence level — 95% is the near-universal convention.
  3. Leave the expected proportion at 50% unless you have a prior estimate; 50% requires the largest sample and so is the safe choice.
  4. Enter the population size only if it is small. Above roughly twenty times your sample it makes no practical difference.

Working backwards from precision

Sample size calculation inverts the margin-of-error formula. Instead of asking how precise a given sample will be, it asks how large a sample a given precision requires. The inputs are the margin you will accept, your confidence level, and any prior estimate of the proportion.

The answer is dominated by the margin of error, which enters squared. Halving the margin quadruples the sample; cutting it to a fifth multiplies the requirement by twenty-five. Almost every practical constraint in survey design follows from that one relationship.

Why 50% when you do not know

The term p(1−p) reaches its maximum at p = 0.5, where it equals 0.25. Any other proportion needs a smaller sample for the same precision, so assuming 50% guarantees you will not undershoot.

If you have a genuine prior estimate — a previous wave of the same survey, say — using it can cut the requirement substantially. Expecting 10% rather than 50% reduces p(1−p) from 0.25 to 0.09, and the required sample by nearly two thirds. Use a real estimate, not a hopeful one; if the true proportion turns out nearer 50%, the achieved margin will be wider than planned.

The number that responds, not the number invited

This calculation gives the number of completed responses required. Response rates for unsolicited surveys are often in the single digits, so the number of invitations may need to be ten or twenty times larger.

Non-response is also more than an arithmetic problem. If those who reply differ systematically from those who do not, the sample is biased no matter how large it is — and a bigger biased sample is not better, only more confidently wrong. The 1936 Literary Digest poll surveyed over two million people and still called the election wrongly, for exactly this reason.

Formula & methodology

n = z² p(1−p) ÷ e², corrected for a finite population with n = n₀ ÷ (1 + (n₀ − 1) ÷ N).

What this calculator assumes

  • Gives the number of completed responses required, not the number of people to approach. Response rates for unsolicited surveys are often in single digits.
  • A larger sample does not fix a biased one. The 1936 Literary Digest poll surveyed over two million people and still called the election wrongly.
  • The margin enters squared, so halving it costs four times the sample.

Sources

  1. Cochran, Sampling Techniques, 3rd edition, Wiley, 1977 — sample size determination.

Sample needed at 95% confidence, p = 50%

Margin of errorLarge populationPopulation 1,000Population 10,000
± 10%978896
± 5%385278370
± 3%1,068517965
± 2%2,4017071,937
± 1%9,6049064,900

Read across to see the finite-population correction at work, and down to see the square-law cost of precision: going from ± 5% to ± 1% multiplies the requirement by twenty-five.

Frequently asked questions

Do I need a bigger sample for a bigger population?

Almost never. Beyond about twenty times your sample size, the population makes no practical difference — 385 responses gives ± 5% whether the population is ten thousand or ten million.

What confidence level should I use?

95% is the convention in almost every field. Higher levels need larger samples for the same margin; 99% costs roughly 73% more respondents.

Is this the number of people to invite?

No — it is the number who must complete. Divide by your expected response rate to get the number to approach.

What if I am measuring a mean rather than a proportion?

Use n = (z × σ ÷ e)², which needs an estimate of the population standard deviation rather than a proportion. The square-law relationship between precision and sample size is identical.