Sample Size, Margin of Error and Power Calculator
Work out how many responses a survey needs, how precise your sample is, or how many users an experiment needs to detect a real difference.
Работает в вашем браузере. Файлы никогда не покидают устройство. Как это проверить
…
Как пользоваться
- 1Choose the calculation
Survey, margin, mean or power.
- 2Set confidence
95% is standard.
- 3Enter the inputs
Margin, proportion, effect or rates.
- 4Adjust for design
Population, design effect, response.
- 5Read the sample size
Per group for experiments.
- 6Check the power curve
See how power grows.
Об этом инструменте
How many people do you need to ask? Too few and the results are noise; too many and you waste money and people's time. The answer depends on what you are measuring and how precise you need to be. This calculator covers the five common cases. For surveys measuring a proportion, such as the share of customers who would recommend you, it gives the number of completed responses for any margin of error and confidence level, with a finite population correction for small populations, a design effect for cluster samples and the number of people to invite given an expected response rate. It works backwards too, giving the margin of error for a sample you already have. For averages it gives the sample size from a standard deviation and margin. For experiments comparing two groups, it gives the size per group needed to detect a difference in means (as a Cohen's d effect size) or in conversion rates, as in website A/B tests, at the power you choose, with a power curve showing how power grows with sample size.
Survey samples
The classic formula is n = z² × p(1 − p) ÷ e², where z is 1.96 for 95% confidence, p the expected proportion and e the margin of error. Using p = 50% gives the largest, safest sample: 385 responses for ±5% at 95% confidence. For a population of 1,000 the finite population correction reduces this to 278. The margin applies to the whole sample; results for subgroups are less precise.
Design effect and response rate
Samples drawn in clusters, such as schools or streets, are less informative than simple random samples; multiply by a design effect of 1.5 to 2 to compensate. Divide by the expected response rate to know how many people to invite.
Power for experiments
Power is the chance of detecting an effect if it is really there. 80% is the common minimum and 90% is safer. Smaller effects need far larger samples: halving the effect size quadruples the sample. For A/B tests, a lift from a 10% to a 12% conversion rate needs about 3,800 visitors per group at 95% confidence and 80% power.
Avoiding common mistakes
- Fix the sample size before starting, and do not stop early when a result looks significant. - Bigger samples do not fix biased samples, such as self-selected online polls. - Add people for expected drop-outs in studies that follow participants over time.
Limits
The calculations use the normal approximation, which is accurate for moderate and large samples; for very small samples or rare events use exact methods or specialist software. This is a planning aid, not statistical advice for regulated studies such as clinical trials.
Пример с решением
A survey of a large population with ±5% margin at 95% confidence needs 385 completed responses, or 278 if the population is 1,000; an experiment detecting a medium effect (d = 0.5) with 80% power needs 63 people per group.
Коротко
- Категория: Математика и наука
- Работает в браузере, без регистрации и загрузки.
- Введённые данные остаются на вашем устройстве.
- Доступно на английском.
- Содержание проверено:
- Официальный источник: NIST/SEMATECH e-Handbook: sample sizes required
Часто задаваемые вопросы
How many survey responses do I need?
About 385 for ±5% at 95% confidence in a large population.
Why use 50% as the expected proportion?
It gives the largest sample, so the margin is guaranteed whatever the true value.
Does population size matter?
Only when the sample is a sizeable share of it, more than about 5%.
What power should I use?
80% is the usual minimum; 90% when missing an effect is costly.
How many visitors for an A/B test?
It depends on the base rate and lift; small lifts need thousands per group.
Is anything uploaded?
No. Calculations run in your browser.
