Sample Size Calculator
Estimate the sample required for a survey proportion, a population mean, two proportions, or two independent means. Results include rounding, finite-population correction, power, and expected completion.
Sample-size formulas
For a proportion, the large-population requirement is n₀=z²p(1−p)/e². For a mean, it is n₀=(zσ/e)². When population N is supplied, the calculator applies n=n₀/[1+(n₀−1)/N].
Two-group calculations use a two-sided normal approximation with equal group sizes. For two means, n per group=2(zα/2+zpower)²σ²/δ². The two-proportion formula uses the pooled planning proportion and the two group-specific binomial variances.
Checked examples
| Goal | Assumptions | Required analyzed sample |
|---|---|---|
| Survey proportion | 95% confidence, 5-point margin, p=50%, large population | 385 |
| Finite survey | Same assumptions, population 1,000 | 278 |
| Estimate a mean | 95% confidence, σ=15, margin=3 | 97 |
| Two proportions | 20% versus 30%, 95% confidence, 80% power | 294 per group |
| Two means | σ=10, difference=5, 95% confidence, 80% power | 63 per group |
| Completion adjustment | Survey example with 80% completion | 385 analyzed; invite 482 |
How to use the calculator
- Choose whether estimating one proportion, one mean, or comparing two groups.
- Enter the smallest margin or difference that matters.
- Select confidence and, for comparisons, statistical power.
- Add a finite population only when sampling without replacement from a defined population.
- Set expected completion or retention to estimate recruitment needs.
Choosing defensible assumptions
- Use 50% for an unknown survey proportion; it gives the largest conservative sample.
- Estimate standard deviation from prior data, a pilot study, or a defensible external source.
- The detectable difference should represent practical importance, not a difference selected after seeing results.
- Increasing confidence or power and decreasing the margin of error increases the required sample.
Limits and interpretation
- Results use normal approximations, independent observations, simple random sampling, and equal group allocation.
- Finite-population correction is available only for one-sample estimation, not two-group comparisons.
- Complex surveys may require design effects; paired, clustered, repeated-measure, survival, equivalence, and non-inferiority studies need specialized planning.
- Rounding is always upward. Completion inflation is applied after rounding the analyzed requirement.
- A sample-size calculation does not correct bias, poor measurement, nonrandom nonresponse, or invalid study design.
Frequently asked questions
Why does an unknown proportion use 50%?
The binomial variance p(1−p) is largest at 50%, so this assumption avoids understating the survey sample when prevalence is unknown.
Should I enter the entire population?
Only when sampling without replacement from a known, finite population. For very large populations the correction becomes negligible.
What is statistical power?
Power is the probability of detecting the planned difference when that difference truly exists under the model assumptions.
Is the recruitment target the final sample?
No. It is the larger number to invite or recruit so the desired analyzed sample remains after expected non-completion or dropout.
Related calculators
Use the T-Test Calculator to analyze means, the Chi-Square Calculator for categorical counts, the Normal Distribution Calculator for normal probabilities, or the Standard Deviation Calculator for spread. Use the Confidence Interval Calculator to turn collected summary statistics into uncertainty ranges.