Two-Sample T-Test Sample Size Calculator

Free

Calculate the sample size needed to detect a difference in means between two independent groups.

Study Parameters
Results

Required Sample Size

126

Group 1: 63 | Group 2: 63

Achieved Power

80.1%

Effect Size

0.500

Method: Two-sided two-sample t-test
Allocation ratio1:1
Cohen's d0.500
  • Independent samples from two populations
  • Normally distributed outcome (or large sample via CLT)
  • Equal variances in both groups (pooled SD)
  • Two-sided hypothesis test
  • Equal allocation (1:1 randomization)
Formula
n₁ = (z_{α/2} + z_β)² × σ²(1 + 1/k) / δ², n₂ = k × n₁
References
  1. Lachin JM. Introduction to sample size determination and power analysis for clinical trials. Controlled Clinical Trials. 1981;2(2):93-113.
  2. Chow SC, Shao J, Wang H, Lokhnygina Y. Sample Size Calculations in Clinical Research. 3rd ed. Chapman & Hall/CRC; 2017.
Power Curve
Sensitivity Analysis

Sample size (N) varying Effect multiplier and Power

Effect multiplier \ Power70%80%85%90%95%
0.5× (δ=2.5)396504576674834
0.75× (δ=3.8)176224256300370
1× (δ=5.0)100126144170210
1.25× (δ=6.3)648292108134
1.5× (δ=7.5)4456647694
2× (δ=10.0)2632364454