Sample Size Calculator

How many survey responses you need for the confidence level and margin of error you want.

You are estimating
Confidence level
±%
±
%
%
385
completed responses needed
Margin of error by number of responses
0%5%10%15%20%03006009001,200
The math

n0 = z2 × p(1 − p) / e2 = 1.962 × 0.50 × 0.50 / 0.0502 = 384.16
Round up: 385

How many survey responses do you need?

Four numbers decide it. The confidence level is how sure you want to be that the true answer falls inside your range; 95% is the usual choice. The margin of error is how wide that range is: ±5% means a result of 62% really means somewhere between 57% and 67%. The population size is how many people you could survey in total. The expected percentage is your best guess of the answer; if you have no idea, leave it at 50%, which gives the largest and safest sample.

With 95% confidence and a ±5% margin of error you need 385 completed responses from a large population. A tighter ±3% needs 1,068, and 99% confidence at ±5% needs 664.

Sample size formula

For a percentage (a proportion), the standard formula is Cochran's:

n0 = z2 × p(1 − p) / e2

where z is the z-score for the confidence level, p is the expected proportion and e is the margin of error as a decimal. At 95% confidence, z = 1.96, so with p = 0.5 and e = 0.05:

n0 = 1.962 × 0.5 × 0.5 / 0.052 = 384.16 → 385

Confidence levelz-score
80%1.282
90%1.645
95%1.960
99%2.576

Small populations: the finite population correction

When the group you are surveying is small, every response covers a bigger share of it, so you need fewer. The correction is:

n = n0 / (1 + (n0 − 1) / N)

For a company of 500 employees at 95% and ±5%, that turns 384.16 into 218. For 1,000 people it is 278. Past about 20,000 people the population hardly matters, which is why national polls use roughly the same sample sizes as city polls.

Sample size table

Responses needed at 95% confidence with an expected percentage of 50%. This matches the widely used Krejcie and Morgan table for the ±5% column.

Population±10%±5%±3%±1%
10050809299
25070152203244
50081218341476
1,00088278517906
2,500933347491,984
5,000953578803,289
10,000963709654,900
25,000963791,0246,939
100,000963831,0568,763
1,000,000973851,0669,513
Unlimited973851,0689,604

Margin of error for a sample you already have

Turn the formula around: e = z × √(p(1 − p) / n). At 95% confidence, 100 responses give about ±9.8%, 400 give ±4.9% and 1,000 give ±3.1%. Halving the margin of error takes four times as many responses, which the curve above the formula shows.

Sample size for an average (mean)

If you are estimating an average, such as minutes spent on a task or a satisfaction score, use n0 = (z × σ / E)2, where σ is the standard deviation and E is the margin of error in the same units. If the standard deviation is 15 and you want the average within ±2 at 95% confidence, you need (1.96 × 15 / 2)2 = 216.09, so 217. Take the standard deviation from a pilot study or past data. Choose An average above to calculate it.

How many people should you invite?

The sample size is the number of completed responses, not invitations. Divide by the response rate you expect: 385 completes at a 20% response rate means inviting 1,925 people. Online surveys to a cold list often get well under 20%, so use your own past rates when you have them. Low response also raises the risk that the people who answer differ from those who don't, which no sample size can fix.

Slovin's formula and Yamane's formula

Many textbooks use n = N / (1 + N × e2), called Slovin's or Taro Yamane's formula. For 1,000 people and ±5% it gives 286, close to Cochran's 278. It is a shortcut that bakes in about 95% confidence and a 50% proportion, so it cannot be adjusted for a different confidence level or expected percentage. Cochran's formula with the population correction is the more flexible choice.

When you need a power analysis instead

This calculator answers "how precisely can I estimate one number?" Comparing two groups, such as an A/B test, a before and after study or a clinical trial, asks a different question: "how many do I need to detect a difference of a given size?" That calls for a power analysis using the effect size, the significance level (often 0.05) and the power (often 80%).

Sources

Frequently asked questions

How many responses do I need for 95% confidence and a 5% margin of error?

385 completed responses for a large population. For a population of 1,000 people you need 278, and for 500 people 218.

Is a sample size of 100 enough?

100 responses give a margin of error of about plus or minus 9.8% at 95% confidence. That is fine for a rough read but too wide to compare close results.

What margin of error does 1,000 responses give?

About plus or minus 3.1% at 95% confidence, which is why many national polls interview around 1,000 people.

Why does the sample size barely change for bigger populations?

Precision depends mostly on how many people you ask, not on the share of the population you reach. Once the population is in the tens of thousands, adding more people to it changes the answer by only a handful.

Should I use 50% as the expected percentage?

Yes, unless you have good data. 50% gives the largest sample, so your margin of error will be no wider than you planned whatever the real answer turns out to be.

Can I use this for an A/B test?

No. Comparing two versions needs a power analysis based on the smallest difference you want to detect, the significance level and the power. This calculator estimates a single percentage or average.