Sample Size Calculator for Comparing Means

Enter your significance level, power, standard deviation, and mean difference to calculate the required sample size per group.

Study Parameters

Expected SD in each group. Use pilot data or literature estimates.

The smallest mean difference worth detecting. Must use same units as SD.

Formula: n = 2 × ((Zα + Zβ) / (Δ / σ))²
where Zα is the critical value for alpha (two-tailed: α/2), Zβ is the critical value for power, Δ is the mean difference, and σ is the pooled SD. Result is always rounded up.

Summary

Enter your significance level, power, standard deviation, and mean difference to calculate the required sample size per group.

How it works

  1. Enter the significance level (alpha), commonly 0.05 for a 5% false-positive rate.
  2. Set statistical power (1 - beta), commonly 0.80 or 0.90.
  3. Enter the pooled standard deviation expected in both groups.
  4. Enter the minimum meaningful difference between the two group means.
  5. The calculator applies the two-sample t-test formula to output required n per group.
  6. Total sample size is n per group multiplied by 2.

Use cases

  • Design a clinical trial comparing treatment vs. control group outcomes.
  • Plan an A/B test where the primary metric is a continuous value (e.g. revenue).
  • Determine how many participants are needed for a psychology experiment.
  • Validate manufacturing process differences using quality control measurements.
  • Size a survey study comparing scores across two demographic groups.

Frequently Asked Questions

Last updated: 2026-06-11 · Reviewed by Nham Vu