About the Statistical Power
This calculator estimates the statistical power of a two-sample test before data is collected, given an expected effect size, the planned sample size per group, and a chosen significance level. It is meant for planning studies or experiments where the goal is to know the chance of correctly detecting a real effect if one exists.
How It Works
You provide the expected effect size as Cohen's d, the sample size per group, and select a significance level of either 0.05 or 0.01. The calculator converts the significance level into a critical z-value, scales the effect size by the sample size to get a noncentrality-like term, and uses the normal distribution to estimate the probability of detecting the effect. It reports this probability as a percentage and states whether it meets the common 80% adequacy threshold.
Formula & Methodology
This is a normal approximation for a two-sample, two-tailed test assuming equal group sizes in both arms. The alpha value comes from a fixed dropdown of 0.05 or 0.01, converted to a two-tailed critical z-value via the inverse normal CDF at 1 - alpha/2. The resulting power figure is clamped between 0 and 1 before being displayed as a percentage, and the calculator labels power at or above 80% as 'Adequately powered' and anything below as 'Underpowered'.
Examples
A moderate effect at a typical sample size
With an effect size of 0.5, a sample size of 40 per group, and alpha of 0.05, delta = 0.5 * sqrt(40/2) = 0.5 * sqrt(20) ≈ 2.236, and zAlpha ≈ 1.96, yielding a power estimate in the neighborhood of 80%, right at the conventional adequacy line.
A small effect with insufficient sample size
With an effect size of 0.2, a sample size of 40 per group, and alpha of 0.05, delta = 0.2 * sqrt(20) ≈ 0.894, which is well below zAlpha of 1.96, producing a power estimate far under 80% and labeled 'Underpowered'.
Advantages
- Lets researchers check whether a planned sample size is adequate before running an experiment, rather than discovering low power after the fact.
- Directly ties the significance level choice (0.05 or 0.01) into the power estimate, showing the tradeoff between stricter error control and detection ability.
- Labels the result against the 80% convention automatically, giving an immediate adequacy read instead of just a raw percentage.
Common Mistakes
- Plugging in an overly optimistic effect size that isn't grounded in prior data, which produces an inflated and unrealistic power estimate.
- Assuming a study is well-powered just because the sample size is large, without checking whether the expected effect size is actually large enough to be detected at that sample size.
- Treating power calculated after the fact from observed data ('post-hoc power') the same as prospective power calculated before data collection, which is a different and less meaningful use of the formula.
Edge Cases to Watch For
- Sample size must be greater than zero or the calculator returns an error, since it appears inside a square root and division.
- The result is clamped between 0% and 100% power even if the raw formula would produce a value slightly outside that range due to floating point behavior.
- This is a two-tailed test approximation for equal group sizes; unequal group sizes or a one-tailed hypothesis are not modeled by this formula.
Common Use Cases
- Researchers designing an experiment who need to justify a planned sample size before collecting data.
- Analysts evaluating whether a completed or planned A/B test had enough participants per group to reliably detect the effect they cared about.
- Students learning how effect size, sample size, and significance level interact to determine the probability of detecting a true effect.