This sample size calculator determines the required number of participants for statistical studies based on desired power (typically 80% or 90%), significance level (α, typically 0.05), and expected effect size. Use for designing experiments, clinical trials, surveys, and observational studies. Follows standard power analysis methodology for hypothesis testing.
Probability of detecting true effect
Type I error rate
1 = equal groups, 2 = Group 2 twice as large
Expected proportion in control/baseline group
Expected proportion in treatment/test group
Embed This Calculator on Your Website
Add this free calculator to your blog, website, or CMS with a simple copy-paste embed code.
Introduction
Underpowered studies are one of the most expensive and preventable failures in research. A clinical trial that enrolls 80 participants when 120 are required to detect a clinically meaningful effect will produce a non-significant result even if the treatment works — and the funding, time, and participant burden are lost. According to a landmark analysis published in PLOS Biology, the median statistical power of neuroscience studies was just 21%, meaning most published results had less than a 1-in-5 chance of detecting the effect they were designed to find. Underpowering is not just a statistical inconvenience — it leads to false negatives, non-reproducible results, and wasted resources. Conversely, overpowered studies enroll more participants than necessary, increasing cost and ethical exposure. The sample size calculation exists precisely to find the minimum adequate N before data collection begins, not after. This calculator computes required sample sizes for proportions, means, and event rates using the most common study designs encountered in clinical, behavioral, and experimental research.
What This Calculator Does
This calculator determines the minimum required sample size for three common study designs: comparison of two proportions (e.g., response rates), comparison of two means (e.g., treatment vs. control group outcomes), and one-sample tests. Inputs include desired statistical power (1-beta), significance level (alpha), expected effect size or difference, and estimated variability (standard deviation for means tests). The tool outputs required N per group, total N for two-group studies, and shows how the required sample size changes with different power and significance level combinations. It also flags studies with effect sizes below 0.2 (small) as requiring large samples.
The Formula
For two-proportion tests, the formula uses the expected proportions in each group (p1, p2) and finds the sample size per group needed to detect the difference (p1-p2) at the specified alpha and power. Z_α/2 is the critical Z value for the significance level (1.96 for alpha=0.05 two-tailed), and Z_β is the power Z value (0.842 for 80% power, 1.282 for 90% power). For means tests, sigma is the population standard deviation, and the difference is the minimum clinically meaningful difference to detect. Both formulas assume equal group sizes; unequal allocation requires adjustment.
Step-by-Step Example
Define the hypothesis and primary outcome
Example: RCT comparing treatment response rates. Control group response: 30% (p1=0.30). Treatment response (expected): 45% (p2=0.45). Minimum detectable difference: 15 percentage points. Two-tailed test.
Set alpha and power
Significance level (alpha): 0.05 (two-tailed). Z_α/2 = 1.960. Statistical power: 80%. Z_β = 0.842. These are standard settings for most clinical research. Power of 90% would require Z_β = 1.282 and substantially more participants.
Apply the sample size formula
n = (1.960 + 0.842)² × [0.30(0.70) + 0.45(0.55)] / (0.45-0.30)². Numerator: (2.802)² × [0.21 + 0.2475] = 7.851 × 0.4575 = 3.592. Denominator: (0.15)² = 0.0225. n = 3.592 / 0.0225 = 159.7. Round up: 160 per group, 320 total.
Adjust for attrition
Expected dropout rate: 15%. Enrolled N = 320 / (1 - 0.15) = 376 participants total, 188 per group. This is the enrollment target before randomization to ensure 160 evaluable participants per group at analysis.
Real-World Use Cases
Clinical Trial Protocol Development
A principal investigator designing a Phase II oncology trial needs to justify the sample size in the protocol and IRB application. Using the calculator with expected response rates of 35% vs. 55%, alpha 0.05, and 80% power, she determines 87 per arm (174 total) is required. With 20% attrition, she targets 218 enrolled. This figure is documented in the Statistical Analysis Plan as the primary justification for the study's feasibility and cost.
Survey Research Planning
A public health researcher is designing a statewide survey to estimate the proportion of adults with undiagnosed hypertension. Using the one-sample proportion formula with an expected proportion of 20%, desired precision of ±3%, and 95% confidence, the calculator returns a required N of 683 respondents. Adding 25% for non-response adjustment, the target mailing is 854 households.
Psychology Experiment Power Planning
A cognitive psychology team is planning an experiment with an expected effect size of Cohen's d = 0.40 (medium effect) between two experimental conditions. Using the two-means formula with standard deviation estimated at 12 points on a cognitive scale, a 4-point difference to detect, alpha 0.05, and 80% power, the calculator returns 71 participants per group (142 total). The lab can recruit 20 participants per month, setting the experiment duration at approximately 8 months.
Comparison
| Power Level | Two Proportions (25% vs 35%) | Two Means (d=0.5) | Significance Level Used |
|---|---|---|---|
| 70% power | 271/group (542 total) | 52/group (104 total) | alpha=0.05, two-tailed |
| 80% power | 352/group (704 total) | 64/group (128 total) | alpha=0.05, two-tailed |
| 90% power | 471/group (942 total) | 85/group (170 total) | alpha=0.05, two-tailed |
| 80% power | 271/group (542 total) | 50/group (100 total) | alpha=0.10, two-tailed |
| 80% power | 405/group (810 total) | 74/group (148 total) | alpha=0.025, two-tailed (Bonferroni) |
Common Mistakes to Avoid
Using the expected effect size as if it were a confirmed value. The effect size input is an estimate, typically based on pilot data or literature. Studies that use an optimistically large effect size produce an underpowered study when the true effect is smaller. A conservative approach uses a smaller expected effect or a sensitivity analysis across a range of plausible effects.
Ignoring the distinction between statistical and clinical significance. A study powered to detect a 2-point reduction in blood pressure with N=1,000 will almost certainly find a statistically significant result if any effect exists, but a 2-point BP reduction is clinically meaningless. Sample size calculations must be anchored to the minimum clinically meaningful difference, not the smallest detectable statistical difference.
Forgetting to adjust for multiple primary endpoints. When a study has two or more co-primary outcomes, the alpha must be adjusted (Bonferroni correction divides alpha by the number of tests), which increases the required sample size. A study with two primary endpoints tested at alpha=0.05 each needs a Bonferroni-corrected alpha of 0.025, raising required N by approximately 20%.
Not accounting for dropout in the enrollment target. The required N from the sample size formula is the number of evaluable participants needed at analysis. If 20% of enrolled participants are expected to drop out or be excluded, the enrollment target must inflate by 1/(1-dropout rate). Enrolling exactly the required N without attrition adjustment almost always results in an underpowered final analysis.
Frequently Asked Questions
Accuracy and Disclaimer
Sample size calculations in this tool are based on standard statistical formulas for two-proportion and two-means comparisons. Actual sample size requirements depend on the specific study design, planned analysis method, dropout assumptions, and regulatory requirements (for clinical trials). For studies requiring FDA submission or IRB protocols, sample size justifications should be reviewed by a qualified biostatistician. These results are for planning and educational purposes only.
Conclusion
Sample size calculation is not a bureaucratic step before data collection — it is the foundation of a credible study. Getting the N right means results can be interpreted with confidence in either direction. After determining your sample size, use the Statistical Power Calculator to retroactively assess the power of published studies you are comparing against, and the Confidence Interval Calculator to understand how your expected N translates to the width of confidence intervals in your final results.
Related Science & Research Calculators
Statistical Power Calculator
Determine the statistical power of your study or calculate required sample size to achieve desired power. Supports Z-tests, T-tests, and Chi-square tests for post-hoc and a priori power analysis.
Use CalculatorScience & ResearchConfidence Interval Calculator
Compute confidence intervals for proportions and means with your specified confidence level. Uses Z-distribution for large samples and t-distribution for small samples (n < 30) with accurate interval bounds.
Use CalculatorScience & ResearchMolarity Calculator
Calculate solution concentration in molarity (M), convert mass to molarity, and perform dilution calculations (C1V1 = C2V2). Essential for chemistry labs, biochemistry, and molecular biology workflows.
Use CalculatorScience & ResearchRadioactive Decay Calculator
Model radioactive decay over time using half-life calculations. Calculate remaining activity, decay constant, mean lifetime, and time to reach specific activity levels for physics, medicine, and environmental science applications.
Use CalculatorScience & ResearchPCR Primer Tm Calculator
Calculate primer melting temperature (Tm) using nearest-neighbor and basic methods. Determines optimal annealing temperature for PCR reactions based on primer sequence, GC content, salt concentration, and amplicon length.
Use CalculatorYou May Also Find Useful
Tax Calculator
Estimate your 2026 federal income tax based on filing status, gross income, deductions, and current tax brackets. See your marginal and effective tax rates instantly.
Use CalculatorFinance & AccountingSalary to Hourly Calculator
Convert your annual salary to an hourly wage instantly. Adjust for hours per week, weeks per year, and overtime to find your true hourly rate.
Use CalculatorFinance & AccountingCommission Calculator
Determine sales commissions based on revenue, rate tiers, and bonus structures.
Use Calculator