About the sample size and power calculator
For a survey proportion the sample size is n₀ = z²p(1 − p)/E², where z is the critical value for the confidence level and E the margin of error; for a mean it is (zσ/E)². A known population size N reduces this through the finite population correction, n = n₀/(1 + (n₀ − 1)/N). To compare two means, each group needs 2(z₁₋α/₂ + z₁₋β)²/d², where d is the difference to detect divided by σ.
Survey planners and researchers use it before collecting data. The default, 95% confidence and ±5 points with p = 50%, needs 384.1 respondents, rounded up to 385; for a population of 10,000 the correction lowers that to 370.
Results are always rounded up. The formulas assume simple random sampling; cluster samples, weighting and non-response all call for a larger sample.
Questions
Why is 385 the standard survey sample size?
It is what Cochran's formula gives for 95% confidence, a ±5-point margin and p = 50%: 1.96² × 0.25 / 0.05² = 384.1, rounded up to 385. Because p = 50% is the worst case, 385 is enough for any true proportion in a large population. A population of 1,000 needs only 278, because each respondent is a larger share of it.
Does population size matter for sample size?
Only when the sample is a noticeable fraction of the population. The finite population correction turns the 385 needed for ±5 points at 95% into 370 for a population of 10,000 and 80 for a population of 100, while any population above 100,000 needs 383 to 385. A sample of 1,000 gives about ±3.1 points whether the population is 100,000 or 300 million.
What expected proportion should I use?
Use 50% unless you have a reliable prior estimate. p(1 − p) is largest at p = 0.5, so that sample is big enough whatever the true value turns out to be. A prior estimate lowers the requirement: at 95% confidence and ±5 points, an expected 20% needs 246 respondents instead of 385. If the guess is wrong, the achieved margin will be wider than planned.
How does sample size change with the margin of error?
The margin shrinks with the square root of n, so halving it needs four times the sample. At 95% confidence and p = 50%, ±5 points needs 385 respondents, ±3 points 1,068, ±2 points 2,401 and ±1 point 9,604. Choosing 90% confidence instead of 95% lowers the ±5-point figure to 271.
What does statistical power mean?
Power is the probability that a test detects an effect of a stated size when that effect is real; 1 − power is the Type II error rate β. Cohen (1988) proposed 80% as a conventional minimum. Detecting a difference of 7.5 when σ = 15 (d = 0.5) with a two-sided test at α = 0.05 needs 63 per group for 80% power by the normal approximation; Cohen's t-based table gives 64.
How accurate is the sample size and power calculator?
Accuracy depends on your inputs and the method's assumptions. Decimal arithmetic uses 50 significant digits, but estimates, numerical methods and source data can be less precise; the displayed rounding does not remove those limits. It is checked against 6 worked examples whose answers come from independent sources; for example, “Survey at 95%, ±5%, p = 50% (defaults)” is checked against Cochran's formula 1.959964² × 0.25 / 0.05² = 384.146 (Python NormalDist); the widely published figure is 385.
Where does the method come from?
NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.2.2 Sample sizes required; Cochran, W. G. (1977). Sampling Techniques, 3rd ed., §4.4 (sample size for proportions and the finite population correction); Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences, 2nd ed., Table 2.4.1.