How Many People Do I Need? Sample Size, Margin of Error and Power
Why 385 responses gives ±5%, when population size matters, how design effect and response rate change your target, and how to size an A/B test properly.

How Many People Do I Need? Sample Size, Margin of Error and Power
Too small a sample and your results are noise; too large and you waste budget and people's time. The right size depends on what you are measuring and how precise you need to be, and it can be worked out before you start. The free Sample Size, Margin of Error and Power Calculator covers surveys, averages and experiments.
Surveys: the famous 385
When a survey measures a proportion, such as the share of customers who would recommend you, the sample size for a given margin of error is:
n = z² × p(1 − p) ÷ e²
where z is 1.96 for 95% confidence, p is the expected proportion and e is the margin of error. With p = 50% and e = 5%, n = 1.96² × 0.25 ÷ 0.0025 ≈ 385. That is why so many surveys aim for about 400 responses. Using 50% for p is the safe choice, because it gives the largest sample; if you are confident the true value is near 10% or 90%, fewer responses are needed.
Precision is expensive: halving the margin to ±2.5% quadruples the sample to about 1,540.
Does population size matter?
Surprisingly little, unless the sample is a large share of the population. A well-drawn sample of 385 gives ±5% whether the population is 100,000 or 100 million. For small populations, the finite population correction reduces the sample: for a population of 1,000, you need 278 responses.
Design effect and response rate
The formula assumes a simple random sample. When you sample in clusters, such as whole classes or streets, people within a cluster tend to be similar, so each response tells you less. Multiply by a design effect, often 1.5 to 2, to compensate. Then divide by the expected response rate: if only 20% reply, you need to invite five times as many people as the responses you need.
A larger sample does not fix a biased one. A self-selected online poll with thousands of responses can be less accurate than a careful random sample of a few hundred.
Experiments and A/B tests: power
When comparing two groups, the question changes from "how precise?" to "can we detect a real difference?". Power is the probability of detecting an effect that really exists. The convention is at least 80%.
For differences in averages, effect size is often expressed as Cohen's d, the difference divided by the standard deviation: 0.2 is small, 0.5 medium and 0.8 large. Detecting a medium effect with 80% power at the 5% significance level needs about 63 or 64 people per group; a small effect needs around 400.
For conversion rates, the base rate and the lift matter. Detecting an increase from 10% to 12% needs roughly 3,800 visitors per group. Small improvements on small base rates need very large samples, which is why many website A/B tests are underpowered.
Rules for honest experiments
- Fix the sample size before you start.
- Do not stop the test early when results look good; repeated peeking inflates false positives.
- Plan for drop-outs in studies that follow people over time.
Report the margin
Always report the margin of error and confidence level with survey results.
Step by step
- Choose the calculation: survey, margin of error, mean or power.
- Set the confidence level.
- Enter the margin, expected proportion, effect size or rates.
- Adjust for population size, design effect and response rate.
- Read the sample size and check the power curve.
Privacy
All calculations run in your browser.


