Power & Sample Size Calculator
How many observations per group a two-sample means test needs, and the power at the answer.
What this page computes
Type the standardised effect size d, the two-sided significance level and the target power. The page computes n per group = 2((z₁α/₂ + z_power)/d)², rounds up, prints the exact figure it rounded, the total sample and the power actually achieved at that n, which is Phi(d√(n/2) − z₁α/₂). Every z comes from the inverse of the same normal CDF the other pages use. Figures print to six significant figures.
This is the normal approximation to the two-sample t test: it ignores the t correction, so for small samples the real power is a little lower and the page says so on its last line. A zero effect size, a level outside 0 to 1 and a power outside 0 to 1 are all refused.
The whole calculation is local, so the same four numbers always print the same sample size.
The page returns the sample size a two-sample comparison needs for a given effect size, significance level and target power: n per group = 2((z_{1−α/2} + z_{power})/d)², rounded up. An effect size of 0.5 at a two-sided α of 0.05 and power 0.8 gives 63 per group, 126 in total, with the power actually achieved at that n printed beside it. It is the normal approximation to the two-sample t test, not an exact t calculation, and the page says so.
Find the per-group sample size for a target power, with the power achieved at that rounded n printed.
How to use it
Type the standardised effect size d, the two-sided significance level and the target power. d must be above zero, and both α and power must be strictly between 0 and 1. The result line gives the per-group n and the total; the line under it gives the power actually achieved at the rounded-up n, which is never below the target.
Why the answer is rounded up, and what is approximated
The formula uses the normal approximation to the two-sample t test, so it ignores the extra uncertainty a small sample brings; the page recommends adding a few per group when the answer is small, in words rather than by padding the number silently. Rounding is always up, because a study with 62.79 participants per group can only run 63, and the achieved power at 63 is printed so the overshoot is visible rather than assumed away. Nothing is adjusted for dropout.
What to Expect
Best for
- Sizing a two-group comparison before collecting data
What this tool keeps
- Nothing leaves this tab: the arithmetic runs in the page you are reading, and a reload discards both the input and the result.
Sample output
n per group = 63 (rounded up from 62.791), total = 126 power at n = 63 per group = 0.801301 α = 0.05 two-sided: z(1 − α/2) = 1.95996, z(power) = 0.841621 normal approximation to the two-sample t test: add a few per group for small samples
Frequently asked questions
Is this an exact t calculation?
No. It uses the normal approximation to the two-sample t test, and the page says so and warns that small answers need a few extra per group. The power achieved at the rounded n is printed so the approximation is visible.
Why is the sample size rounded up?
Because a fractional participant cannot be collected. The exact value of 62.791 becomes 63 per group, and the achieved power at 63 is printed beside it.
Is anything uploaded?
No. The normal quantiles and the sample size are computed in this page, and nothing is posted to a server or stored.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.