Power Sample Size Calculator
Our biostatistics calculator computes power sample size accurately. Enter measurements for results with formulas and error analysis.
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer
Power Sample Size Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: n = ((z_alpha + z_beta)^2 * 2) / d^2
Worked example โ 63 patients per group (126 total) needed for 80% power to detect a medium effect
Formula
n = ((z_alpha + z_beta)^2 * 2) / d^2
Where n is the sample size per group, z_alpha is the critical z-value for the chosen significance level, z_beta is the z-value corresponding to the desired power (1 - beta), and d is Cohen's d effect size (mean difference divided by pooled standard deviation). For a one-sample test, remove the factor of 2. The formula assumes equal group sizes for two-sample tests.
Worked Examples
Example 1: Clinical Drug Trial Sample Size
Problem:A researcher plans a two-group clinical trial expecting a medium effect size (d=0.5) and wants 80% power at alpha=0.05 (two-tailed). How many patients per group?
Solution:z_alpha/2 = z(0.025) = 1.96 z_beta = z(0.20) = 0.842 n per group = ((1.96 + 0.842)^2 * 2) / 0.5^2 = (2.802^2 * 2) / 0.25 = (7.851 * 2) / 0.25 = 15.702 / 0.25 = 62.8 Round up: n = 63 per group
Result:63 patients per group (126 total) needed for 80% power to detect a medium effect
Example 2: Gene Expression Study with Small Effect
Problem:A genomics study expects a small effect (d=0.3) and needs 90% power at alpha=0.01 (two-tailed). Calculate required sample size.
Solution:z_alpha/2 = z(0.005) = 2.576 z_beta = z(0.10) = 1.282 n per group = ((2.576 + 1.282)^2 * 2) / 0.3^2 = (3.858^2 * 2) / 0.09 = (14.884 * 2) / 0.09 = 29.768 / 0.09 = 330.8 Round up: n = 331 per group
Result:331 samples per group (662 total) needed for 90% power at alpha=0.01 with small effect
Frequently Asked Questions
What is statistical power and why does it matter?
Statistical power is the probability that a test will correctly reject a false null hypothesis (i.e., detect a real effect when one exists). A power of 0.80 means there is an 80% chance of detecting the effect if it truly exists, and a 20% chance of a Type II error (missing the effect). In biological research, underpowered studies waste resources and may fail to detect important effects like drug efficacy or genetic associations. Most journals and regulatory agencies require a minimum power of 0.80, though 0.90 is recommended for critical studies.
How do I choose an appropriate effect size?
Effect size (Cohen's d) quantifies the magnitude of the difference between groups relative to variability. Cohen suggested benchmarks: small (d=0.2), medium (d=0.5), and large (d=0.8). However, it is better to base your effect size on prior research, pilot studies, or the minimum clinically meaningful difference. For example, if a drug must reduce blood pressure by at least 5 mmHg (SD=10) to be clinically relevant, d = 5/10 = 0.5. Using standardized benchmarks without domain knowledge can lead to misleadingly sized studies.
What is the relationship between sample size, power, and effect size?
These three quantities are mathematically linked: increasing any one allows you to decrease another. Larger sample sizes increase power for a given effect size. Larger effect sizes require smaller samples for the same power. Common trade-offs include: to detect a small effect (d=0.2) at 80% power requires about 394 per group; a medium effect (d=0.5) requires about 64 per group; a large effect (d=0.8) requires only about 26 per group. Doubling sample size does not double power; the relationship follows a curve that flattens as power approaches 1.0.
When should I use a one-tailed vs two-tailed test?
Use a two-tailed test (default) when the effect could go in either direction, which is most common in exploratory research. Use a one-tailed test only when you have strong prior evidence that the effect can only go in one direction AND it would be meaningless or impossible to go the other way. For example, testing if a new drug is better (not just different) than placebo. One-tailed tests require smaller sample sizes but are controversial in peer review. Most biostatisticians recommend two-tailed tests unless there is a compelling scientific rationale for directionality.
How does the significance level (alpha) affect sample size?
A smaller alpha (e.g., 0.01 vs 0.05) means stricter criteria for significance, requiring a larger sample to achieve the same power. At alpha = 0.05 and power 0.80 for medium effect, you need about 64 per group. At alpha = 0.01, this increases to about 95 per group. In genomics and multiple-testing scenarios, researchers often use Bonferroni-corrected alpha values (e.g., 0.05/1000 = 0.00005), which dramatically increases required sample sizes and is why genome-wide association studies need thousands of participants.
References
Background & Theory
History
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer ยท Editorial policy
Related Calculators
๐งฎSample Size Calculator
Calculate sample size with inputs, formulas, and instant results.
๐งฎDog Crate Size Calculator
Calculate dog crate size with inputs, formulas, and instant results.
๐งฎDog Harness Size Calculator
Calculate dog harness size with inputs, formulas, and instant results.
๐งฎDog Size Calculator
Calculate dog size with inputs, formulas, and instant results.
๐งฎRabbit CAGE Size Calculator
Calculate rabbit cage size with inputs, formulas, and instant results.
๐งฎTurtle Tank Size Calculator
Calculate turtle tank size with inputs, formulas, and instant results.
๐งฎRat Cage Size Calculator (Space per Rat)
Calculate rat cage with inputs, formulas, and instant results.
๐งฎAlpaca Gestation Calculator
Calculate alpaca gestation with inputs, formulas, and instant results.