power and sample size calculator

Interactive Power & Sample Size Calculator

Plan a two-group study (independent samples) using a normal approximation to the t-test. Choose what you want to calculate below.

Example: ratio = 1 means equal groups; ratio = 2 means group 2 is twice group 1.

Why power and sample size matter

Power analysis helps you design studies that are big enough to detect meaningful effects without wasting participants, time, or budget. If sample size is too small, your study may miss a real difference (Type II error). If it is too large, you may spend more resources than needed.

This calculator gives fast planning estimates for common two-group comparisons, using effect size (Cohen’s d), significance level (alpha), and desired power. It is useful for early design decisions, grant planning, and protocol drafts.

What this calculator does

  • Required sample size: Estimates n for each group based on expected effect size and target power.
  • Achieved power: Estimates statistical power for a planned or existing sample size.
  • Minimum detectable effect (MDE): Finds the smallest standardized effect likely to be detected with your sample.

Input guide

Effect size (Cohen’s d)

Cohen’s d is the difference in means divided by pooled standard deviation. Rules of thumb are often:

  • 0.2 = small effect
  • 0.5 = medium effect
  • 0.8 = large effect

Use pilot data or prior literature when possible; generic rules are only a starting point.

Alpha (α)

Alpha is your Type I error threshold (false positive rate). Common choices are 0.05 or 0.01. Two-sided tests split alpha across both tails; one-sided tests use one tail and need fewer participants for the same power.

Power (1 − β)

Power is the chance of detecting an effect if it truly exists. Common targets are 0.80 or 0.90. Higher power generally requires larger samples.

Formulas used

For two independent groups with standardized effect size d, this page uses a normal approximation:

  • Required n for group 1: n1 = ((zα + zpower)² × (1 + 1/k)) / d², where k = n2/n1
  • Power: Φ(λ − zα), where λ = d / √(1/n1 + 1/n2)
  • MDE: (zα + zpower) × √(1/n1 + 1/n2)

These formulas are great for quick planning. For final protocols, use specialized software when assumptions are complex (non-normal outcomes, repeated measures, clustering, unequal variances, etc.).

Practical planning tips

  • Inflate sample size for expected attrition/nonresponse.
  • Use conservative (smaller) effect sizes when uncertain.
  • Pre-register your alpha, primary outcome, and analysis plan.
  • If multiple primary tests are planned, account for multiplicity.

Example

Suppose you expect d = 0.5, want 80% power, and plan a two-sided α = 0.05 test with equal groups. The calculator will return approximately 64 per group (about 128 total), which matches common power table results for a medium effect.

Limitations

This tool assumes a two-group independent-samples framework and normal approximation. It does not replace full design-specific power analysis for mixed models, survival analysis, logistic regression, non-inferiority designs, or Bayesian decision frameworks.

🔗 Related Calculators