🔢

Sample Size Calculator

Verified

by Community

Calculates minimum sample sizes for studies using power analysis, accounting for effect size, significance level, power, and design factors like clustering and attrition.

sciencestatisticssample-sizepowerresearchplanning

Sample Size Calculator

Calculate required sample sizes for research studies using power analysis. Ensures your study has enough participants to detect meaningful effects while avoiding wasteful over-recruitment.

Usage

Describe your study design, expected effect size, and desired statistical power. The calculator provides minimum sample sizes with explanations of the tradeoffs between power, significance level, and effect size.

Parameters

  • Design: Two-group comparison, Correlation, Regression, ANOVA, or Survey
  • Effect size: Expected (small, medium, large) or specific numeric value
  • Power: Desired power level (standard: 0.80, recommended: 0.90)
  • Alpha: Significance level (standard: 0.05)

Examples

  1. Clinical Trial: Calculate sample size for a parallel-group RCT detecting a medium effect (d=0.5) on pain scores with 80% power, including 20% dropout adjustment.
  1. Survey Research: Determine sample size for a population proportion estimate with 3% margin of error and 95% confidence for a 10,000-person population.
  1. A/B Test: Calculate visitors needed to detect a 2 percentage point conversion rate lift from a 5% baseline with 80% power and 5% significance, accounting for multiple variants.
  1. Cluster RCT: Adjust sample size for a school-based intervention where students are clustered within classrooms — ICC estimation, design effect calculation, and cluster size optimization.

Guidelines

  • Effect size selection uses pilot data, literature benchmarks, or clinically meaningful differences
  • Minimum detectable effect size is reported alongside required sample size
  • Attrition and non-response rates inflate required samples by the expected loss percentage
  • Clustered designs use design effects to account for intraclass correlation
  • Unequal group sizes are accommodated with adjusted formulas when randomization is constrained
  • Multiple comparison adjustments increase required sample size for studies with many outcomes
  • Sequential analysis designs allow early stopping with maintained error rates
  • Software recommendations: G*Power (free), R pwr package, or Python statsmodels
  • Sensitivity analyses show how sample size changes with different effect size assumptions
  • Recruitment feasibility is balanced against statistical ideal — underpowered is worse than no study