Sample size calculator
Work out how many participants your study needs for a survey, a two-group comparison or a correlation. Free, no sign-up, with a sentence you can adapt for your methods section.
How to use this sample size calculator
- Choose your study design. Pick the tab that matches your main analysis: a survey estimating a percentage, a comparison of two group means, a comparison of two proportions, or a correlation.
- Enter what you expect to find. For a comparison this is the effect size, the smallest difference that would matter. Take it from earlier studies on the same outcome or a pilot study, not from a guess.
- Keep the usual settings unless you have a reason. Most studies use a two-sided significance level of 0.05 and 80% or 90% power.
- Add expected dropout or non-response. If you expect 20% of participants not to complete, the calculator raises the target so that you still end with enough.
- Copy the methods sentence and adapt it to your study. Name the source of your effect size in the same paragraph.
Which tab should I use?
| Your question | Typical test | Tab |
|---|---|---|
| What percentage of nurses report burnout? | Descriptive estimate | Survey or prevalence |
| Does a training programme raise test scores compared with no training? | Independent t-test | Compare two group means |
| Is the infection rate lower with the new protocol? | Chi-square test | Compare two proportions |
| Is screen time related to sleep duration? | Pearson correlation | Correlation |
For regression with several predictors, ANOVA with more than two groups, repeated measures, survival outcomes or cluster designs, the calculation needs more inputs than this page takes. Use G*Power or ask a statistician.
The formulas behind the calculator
Survey or prevalence (Cochran, 1977): n = z² × p(1 − p) / e², where z is the value for your confidence level (1.96 for 95%), p the expected proportion and e the margin of error. With a known population size N, the finite population correction is n / (1 + (n − 1) / N).
Two means: n per group = 2(zα + zβ)² / d² + zα² / 4, where d is Cohen's d. The last term is a small-sample correction (Guenther, 1981) that brings the result in line with exact t-test calculations.
Two proportions (Fleiss et al., 2003): n per group = [zα√(2p̄(1 − p̄)) + zβ√(p₁(1 − p₁) + p₂(1 − p₂))]² / (p₁ − p₂)², where p̄ is the average of the two proportions. No continuity correction is applied.
Correlation: n = [(zα + zβ) / C]² + 3, where C = ½ ln[(1 + r) / (1 − r)] is Fisher's z transformation of r. Exact methods can give one or two fewer participants.
All results are rounded up to the next whole participant. The dropout adjustment divides by (1 − dropout rate).
Frequently asked questions
Why does a 50% expected proportion give the largest sample?
The term p(1 − p) is largest when p is 0.5, so using 50% gives a sample that is large enough whatever the true proportion turns out to be. If earlier studies give a better estimate, use it.
What is power, and why 80%?
Power is the chance that your study detects an effect of the size you entered, if that effect is real. At 80% power there is a 20% chance of missing it. Many funders and ethics committees accept 80%; 90% is common in clinical trials.
Where do I get the effect size?
From published studies on the same outcome and population, a meta-analysis, or your own pilot data. Cohen's small, medium and large values are a fallback when nothing better exists, and reviewers may ask you to justify them.
My population is small. Do I need fewer participants?
For surveys, yes. Enter the population size and the finite population correction reduces the sample. For example, 385 becomes 278 for a population of 1,000.
References
- Cochran, W. G. (1977). Sampling techniques (3rd ed.). Wiley.
- Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum.
- Fleiss, J. L., Levin, B., & Paik, M. C. (2003). Statistical methods for rates and proportions (3rd ed.). Wiley.
- Guenther, W. C. (1981). Sample size formulas for normal theory t tests. The American Statistician, 35(4), 243–244.
Need a sample size justification for your proposal or paper?
Our statisticians write the power analysis for your design, including regression, ANOVA and multilevel models, with a paragraph ready for your methods section.
See our statistical analysis serviceSend us your draft. We'll tell you honestly what it needs.
Free evaluation and a fixed quote. No obligation.