Statistics / Study design
Statistical Power Calculator (Sample Size for a T-Test)
Plan a two-group comparison: find the sample size per group needed to detect an effect of a given size with the power you want, or the power of a design with a given group size, for a two-sided or one-sided test.
Statistical Power Calculator (Sample Size for a T-Test): Power is the probability that a t-test comparing two equal groups gives p < α when the true difference is d standard deviations. The tool steps the group size up until the power reaches the target, using the noncentral t distribution's shape; the answers match statsmodels: d = 0.5 at 80% power and α = 0.05 needs 64 per group, d = 0.3 needs 176, and d = 0.2 needs 394. Runs 100% locally in your browser with zero server file uploads.
- Category
- School & study tools
- Runs
- In your browser
- Cost
- Free · no sign-up
- Availability
- Ready to use
Runs entirely in your browser
For comparing two group means with an independent t-test. Power is the chance of finding a significant result when the true effect is the size you entered; 80% is the usual target. Smaller effects need far more people: d = 0.5 needs 64 per group for 80% power at α = 0.05, d = 0.2 needs 394. The calculation follows the noncentral t distribution closely and matches dedicated power software to the nearest person in typical cases.
Underpowered studies
With 30 per group, a medium effect of d = 0.5 is detected only about 48% of the time at α = 0.05: a real effect is missed more often than not.
To estimate d from a pilot study's means and SDs, use the effect size calculator.
Surveys instead of experiments
When the aim is to estimate a proportion within a margin of error rather than compare groups, use the sample size calculator instead.
Remember to allow for dropouts: if you expect 10% to drop out, divide the size by 0.9.
How to use it
- Enter the effect size you want to detect, as Cohen's d, and the significance level.
- Choose sample size needed and enter the power, or power of a design and enter the group size.
- Read the size per group and in total, or the power and the chance of missing the effect.
Privacy & limitations
Everything is calculated in your browser.
Related tools
Frequently asked questions
What effect size should I plan for?
The smallest difference that would matter in practice, or an estimate from earlier studies; planning for a large effect and finding a small one leaves the study underpowered.
Why 80% power?
It is a common convention: a one-in-five chance of missing a real effect of the planned size. Many fields now use 90%.
Does this cover other tests?
It is for comparing two independent means; paired designs, proportions, and ANOVA need their own formulas.
Free tool · runs in your browser · no account required