Interactive module guide
Power & Sample Size Calculator — Plan Studies
This power and sample size calculator plans studies across four common designs, solving for the required n or the achievable power.
Free · No sign-up · Calculations stay in your browser
This calculator answers the two questions every study should settle before data collection: how many observations are needed to detect a given effect with a target power, and what power a feasible sample size actually delivers.
It covers four standard designs—one-sample/paired t, two-sample t, one proportion, and two proportions—driven by a standardized effect size (Cohen’s d for means, Cohen’s h for proportions), α, and the tail configuration.
Mean designs integrate the noncentral-t distribution directly; proportion designs use Cohen’s arcsine normal approximation.
Use the power and sample size calculator before data collection; specify the smallest effect worth detecting, never the effect you hope to observe.
When to use this power and sample size calculator
Use it when
- Use it at the design stage of any confirmatory study: grant proposals, prereg protocols, A/B tests, and lab plans all need a sample-size justification tied to a smallest effect of interest.
- Use the power mode to audit feasibility: given the participants you can realistically recruit, what effect could the study actually detect? An answer near 50% power for plausible effects is a redesign signal, not a footnote.
- Use it in teaching to make the four-way trade-off concrete: effect size, α, power, and n move against each other, and sliding one input shows exactly what the others must pay.
Choose another method when
- Avoid computing “post-hoc power” by plugging in the observed effect after the study; it is a deterministic transformation of the p-value and adds no information.
- Avoid powering for the effect you hope is true; the defensible input is the smallest effect that would still matter, which is usually smaller and demands more data.
- Avoid using these standardized formulas for clustered, sequential, survival, unequal-allocation, or otherwise specialized designs where the planned analysis has a different sampling distribution.
Interactive tool
The calculator loads as you approach this section so the guide remains fast on mobile connections.
Example preview
Sample size for a medium effect
- Inputs
- Two-sample t design, d=0.5, α=0.05 two-tailed, 80% power.
- Representative result
- About 64 observations per group; scipy’s exact noncentral-t power at n=64 is 80.1%.
Illustrative only. Load the interactive tool to enter your own values and review assumptions.
Watch the explanation
2:19 minThe player loads only after you press play. You can also watch on YouTube.
Read the complete transcript
Power and Sample Size. Power planning belongs before data collection. Start with the smallest effect worth detecting, not the effect you hope to see and never the effect already observed. Choose one of four designs: one-sample or paired t, equal-size two-sample t, one proportion, or two proportions. For mean designs, enter the magnitude of Cohen's d. For proportion designs, enter Cohen's h on the arcsine scale. Select alpha and a pre-specified tail rule. A two-sided design spends alpha across both rejection tails; a one-sided claim changes the scientific question. In t designs, power integrates a noncentral t distribution. The noncentrality is d times the square root of n over a design multiplier. The multiplier is one for one-sample or paired t and two for two-sample t. Two-group answers are per group; one-group answers are total. Proportion designs use Cohen's h with a normal approximation. Label those powers approximate and verify consequential plans in design-specific software.
Sample-size mode brackets and binary-searches integer n. It returns the smallest n whose calculated power reaches the target, not a rounded shortcut. Plan an equal-size two-arm t study for d point five, eighty percent power, two-sided alpha point zero five. At sixty-three per group, exact noncentral-t power is about seventy-nine point five two percent, still below target. At sixty-four per group, degrees of freedom are one hundred twenty-six and noncentrality is two point eight two eight. Power at sixty-four is eighty point one five percent. Sixty-four is therefore the smallest adequate per-group size under this model. A feasible forty per group delivers only about fifty-nine point eight percent power. The calculator prices that shortfall; it cannot decide whether to recruit more or redesign. Smaller effects and higher target power require more data. Add attrition outside the analyzable n, and use specialized methods for clusters, unequal allocation, survival, or sequential designs. Plan power free at Distri Scope dot com.
How to read the result
The rounded-up n typically delivers slightly more than the target power; the display shows the power at exactly that n so the margin is visible.
Halving the effect size roughly quadruples the required n — the inverse-square law that dominates all planning arithmetic.
One-tailed tests need fewer observations at the same nominal α, but the choice must be justified by a genuinely directional question, not by the smaller n.
How to use the power and sample size calculator
Choose what to solve for; the form then shows either the target power or the fixed per-group sample size, never both.
The effect size is standardized: Cohen’s d = (μ₁−μ₂)/σ for mean designs, Cohen’s h = 2·asin√p₁ − 2·asin√p₂ for proportion designs — enter its magnitude.
For two-group designs the answer is per group; for one-sample designs it is the total.
Formula, hypotheses, and assumptions
Conditions to review
- The standardized effect size is specified in advance
- Observations will be independent with the stated design
- Noncentral-t reference distribution for mean designs
- Arcsine (Cohen’s h) machinery for proportion designs
Calculator parameters
- Solve For: default Sample size.
- Design: default Two-sample t.
- Standardized Effect (d or h): default 0.5.
- Target Power (1−β): default 0.8.
- Sample Size (per group): default 64.
- Significance Level (α): default 0.05.
- Tails: default Two-tailed.
What the method is doing
For t designs, achieved power is the probability that a noncentral-t statistic with δ=d√(n/m) crosses the selected one- or two-sided critical boundary. Both tails are included for a two-sided design.
Sample-size mode brackets and binary-searches integer n, returning the smallest n whose calculated power reaches the target rather than rounding a closed-form approximation.
Proportion designs stay on the arcsine (h) scale throughout, the Cohen convention that makes power independent of the baseline rate.
Worked example: the classic 64 per group
A two-arm study expects a medium standardized effect (d = 0.5) and wants 80% power with a two-tailed α = 0.05 two-sample t test. Solve for the per-group sample size, then check what power an affordable 40 per group would give.
- 1Solving for n returns 64 per group — the textbook answer — with noncentral-t power about 80.15% at exactly 64.
- 2The exact noncentral-t benchmark agrees: scipy gives power 0.8015 at n = 64 and 0.7952 at n = 63, so 64 is the smallest adequate size.
- 3Switching to power mode with n = 40: the noncentral-t power falls to about 60%, far below the target.
- 4The gap frames the decision: recruit 24 more per group, accept a three-in-five chance of missing a real medium effect, or argue for a larger smallest-effect-of-interest.
Interpretation
The worked numbers show planning arithmetic doing its job: the difference between 40 and 64 per group is the difference between a coin-flip-and-a-bit and the conventional 80% standard. Every alternative to recruiting more — relaxing α, going one-tailed, redefining the effect of interest — is a substantive decision that this calculator prices but cannot make.
Common mistakes
- For proportion designs, label power as an arcsine normal approximation and verify consequential plans against software tailored to the actual baseline rates and analysis model.
- Do not treat 80% power as a law of nature; it is a convention, and consequential studies often justify 90% or more.
- Do not forget attrition: the calculator prices analyzable observations, and recruitment targets must add expected dropout on top.
Limits and independent validation
Four designs only; ANOVA, correlation, and regression power are not yet covered.
The t-design calculation assumes normally distributed outcomes and the standardized equal-size designs stated here; robustness, attrition, unequal allocation, and variance uncertainty are not modeled.
No allocation-ratio option: two-group designs assume equal group sizes.
Before using the result
- Check the classic anchors: d = 0.5, 80%, two-tailed α = 0.05 must give 64 per group (two-sample) and 34 (one-sample).
- Cross-check consequential t-design answers against independent noncentral-t software such as G*Power or R; results should agree within numerical tolerance under the same conventions.
- Sanity-check monotonicity: increasing power or shrinking the effect must never decrease the required n.
Related modules and resources
Explore Other Hypothesis Tests
- One Sample Z-Test Calculator
- One Sample T-Test Calculator
- Two Sample Z-Test Calculator
- Two Sample T-Test Calculator
- Paired T-Test Calculator
- One-Way ANOVA Calculator
- Two-Way ANOVA with Replication
- Chi-Square Test Calculator
- Chi-Square Goodness-of-Fit Test
- F-Test Calculator
- One-Proportion Z-Test
- Two-Proportion Z-Test
- Exact Binomial Test
- Fisher’s Exact Test
- McNemar Test
- Mann-Whitney U Test
- Wilcoxon Signed-Rank Test
- Sign Test
- Kruskal-Wallis Test
- Friedman Test
- Pearson Correlation Test
- Spearman Correlation Test
- Kendall Tau Test
- Levene Test
- Brown-Forsythe Test
- Welch ANOVA
- Repeated Measures ANOVA
- TOST Equivalence Test
- Power & Sample Size
- Confidence Interval Calculator
- Critical Value Lookup
See every option in the Statistical Hypothesis Test Calculator or review the DistriScope methodology. Educational information; last reviewed 2026-08-09. Verify consequential calculations independently.