Power Analysis Calculator (Sample Size for t-Tests)
Sample size per group for a target power, or the power of a planned study, from effect size and alpha.
For two groups, n per group ≈ 2(z₁₋α/₂ + z₁₋β)² ÷ d² + z²₁₋α/₂ ÷ 4. Detecting a medium effect (d = 0.5) at α = 0.05 with 80% power needs 2 × (1.96 + 0.84)² ÷ 0.25 + 0.96 ≈ 64 per group, 128 in total.
Free, runs in your browser. Nothing you enter is uploaded.
How to use it
- Pick two independent groups or a paired/one-sample design.
- Enter the expected effect size d, alpha and target power (or your sample size).
- Read the sample size per group and in total, or the achieved power.
What you enter
- Design
- Effect size d
- Alpha
- Power or sample size
- Tails
What you get
- Sample size per group
- Total sample size
- Achieved power
Formula
Two groups: n = 2(z₁₋α/₂ + z₁₋β)²/d² + z²₁₋α/₂/4 | Paired: n = (z₁₋α/₂ + z₁₋β)²/d² + z²₁₋α/₂/2
Normal approximation with Guenther's (1981) small-sample correction, which reproduces exact noncentral-t sample sizes closely.
Worked example: animal study
Input: Two groups, d = 0.8, α = 0.05, power 80%
Result: 26 per group
A large expected effect keeps the study small; add a margin for losses.
Questions
What is power analysis?
Working out how many subjects you need to have a good chance (usually 80%) of detecting an effect of a given size if it really exists.
What effect size should I use?
Use the smallest effect that would matter, or estimates from pilot data or earlier studies. Without either, Cohen's benchmarks are 0.2 small, 0.5 medium and 0.8 large.
Why is 80% power the standard?
It balances a 20% risk of missing a real effect against cost. Clinical trials often use 90%.
Does a paired design need fewer subjects?
Usually, because each subject is their own control. With d defined on the paired differences, a medium effect needs about 34 pairs rather than 64 per group.
References
- Cohen J (1988) Statistical Power Analysis for the Behavioral Sciences, 2nd ed. Lawrence Erlbaum.
Related reading
- Statistical Power and Sample Size
- Statistical Power: What It Is and Why It Matters in Research
- How to Determine the Minimum Number of Animals for Statistical Power
- Statistical power analysis sample size
- Common Mistakes in Power Analysis and How to Avoid Them in Biological Research
- Statistical Power Analysis for Animal Studies
More Statistics
- Standard Deviation Calculator
- Mean, Median & Mode Calculator
- Variance Calculator
- Z-Score Calculator
- P-Value Calculator
- Confidence Interval Calculator
- T-Test Calculator
- Chi-Square Test Calculator
- Correlation Coefficient Calculator
- Linear Regression Calculator
- Normal Distribution Calculator
- Probability Calculator
All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.