📊 Sample Size Calculator

Find the sample size you need for a survey from confidence level, margin of error and population, or the margin of error for a sample you already have.

✓ Free✓ No Signup Required✓ Browser-Based

Leave the expected proportion at 50% if you do not know it — that gives the largest, safest sample size.

Responses needed
385
for ±5% at 95% confidence
z-score for 95%1.9600
n₀ = z² × p(1 − p) ÷ e²1.960² × 0.50 × 0.50 ÷ 0.050² = 384.1

Sample sizes at 95% confidence (large population, p = 50%)

Margin of errorResponses needed
±10%97
±7%196
±5%385
±4%601
±3%1,068
±2%2,401
±1%9,604

What Sample Size Calculator Does

This sample size calculator tells you how many survey responses you need to estimate a percentage within a chosen margin of error at a chosen confidence level. Enter the population size if it is small and known — a company’s employees, a school’s parents — and the finite population correction lowers the requirement accordingly. The formula is shown with your numbers, so you can cite it in a report.

Switch to the reverse mode if you already have responses: it gives the margin of error for that sample size. Add an expected response rate to see how many people you need to invite, and use the reference table to see how the required sample grows as the margin of error shrinks.

How to Use Sample Size Calculator

  1. Choose a confidence level and margin of error
  2. Enter the population size if it is small and known
  3. Keep the expected proportion at 50% unless you know better
  4. Read the responses needed, with the formula shown
  5. Add a response rate to see how many people to invite, or switch to margin of error

Formula Used by Sample Size Calculator

Cochran’s formula

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

z
z-score for the confidence level (1.96 for 95%)
p
Expected proportion (0.5 when unknown)
e
Margin of error as a decimal (0.05 for ±5%)

Worked example

95% confidence, ±5%, p = 0.5.

  1. 1.96² × 0.5 × 0.5 = 0.9604
  2. 0.9604 ÷ 0.05² = 384.2
  3. Round up

Result: 385 responses.

Finite population correction

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

Worked example

The same survey of a population of 1,000.

  1. 384.2 ÷ (1 + 383.2 ÷ 1,000)
  2. = 384.2 ÷ 1.383

Result: 278 responses.

Responses Needed (Large Population, p = 50%)

Margin of error90% confidence95% confidence99% confidence
±10%6897166
±5%271385664
±3%7521,0681,844
±2%1,6912,4014,147
±1%6,7649,60416,588

How to Read Your Result

Who you ask matters more than how many

The formula assumes a random sample. A thousand responses from a self-selected or convenience sample can be far less accurate than three hundred from a properly random one. Non-response also matters: if the people who reply differ from those who do not, a large sample does not remove that bias.

Subgroups need their own sample

If you plan to compare groups — regions, age bands, customers vs non-customers — each group needs enough responses on its own. The margin of error for a subgroup of 100 is about ±10% at 95% confidence, whatever the total sample.

Limitations & Accuracy Notes

  • For estimating a proportion (a percentage); comparing two groups or estimating a mean needs different formulas, such as those in the A/B test calculator.
  • Assumes simple random sampling; stratified or cluster designs need a design effect adjustment.

Frequently Asked Questions

How do I calculate sample size for a survey?
Use n₀ = z² × p(1 − p) ÷ e², where z comes from the confidence level (1.96 for 95%), p is the expected proportion (use 0.5 if unsure) and e is the margin of error. For ±5% at 95% confidence that is 385 responses for a large population.
Does population size matter?
Only when the sample is a large share of the population. The finite population correction, n = n₀ ÷ (1 + (n₀ − 1) ÷ N), shrinks the requirement: for a population of 1,000, ±5% at 95% needs 278 responses instead of 385. For large populations it makes almost no difference.
What confidence level should I use?
95% is the most common choice. 90% needs fewer responses but is less certain; 99% gives more certainty but needs about 70% more responses than 95% for the same margin of error.
What margin of error is acceptable?
±5% is typical for general surveys and ±3% for polls that need finer detail. Halving the margin of error roughly quadruples the sample size, so ±2.5% needs about 1,537 responses.
Why use 50% as the expected proportion?
p(1 − p) is largest at 50%, so it gives the most conservative (largest) sample size. If you know from past data that about 10% will answer yes, entering 10% lowers the requirement.
How many people should I invite?
Divide the sample size by your expected response rate. If you need 385 responses and expect 20% to reply, invite about 1,925 people. A random, representative sample matters more than a large biased one.

References & Further Reading

By OnlineToolHubs Team • September 2026