Power analysis is the calculation that tells you how many participants a study needs to have a good chance of detecting an effect that is really there. G*Power is the most widely used free software for running it. Before collecting data, you specify the size of effect you care about, the significance level, and the statistical power you want, and the calculation returns the required sample size. Done in advance, it protects a study from being too small to find anything or wastefully larger than necessary.
The logic rests on four quantities that are mathematically linked: the effect size, the alpha level or significance threshold, statistical power, and the sample size. Fix any three and the fourth is determined. A study planned this way states its assumptions openly, which is exactly what funders, ethics committees, and reviewers now expect.
Running the calculation a priori, before data collection, is the only version that genuinely informs design. An underpowered study, one with too few participants, is likely to miss a real effect and produce a false negative, while also making any significant result it does find less trustworthy. An oversized study wastes resources and, in clinical contexts, exposes more participants than necessary. A correct sample size sits between those failures.
The calculation is also a transparency device. By forcing you to state the smallest effect worth detecting, your significance level, and your target power, it makes the study's assumptions explicit and checkable. That is why an a priori power analysis has become a standard expectation in grant applications and ethics submissions, and why our biostatistics consulting service builds one into study design routinely.
Effect size is the magnitude of the relationship or difference you want to be able to detect. It is the hardest input to choose and the one reviewers scrutinize most, because the required sample is extremely sensitive to it. Base it on a meaningful difference in your field, a pilot study, or prior literature, not on a number reverse-engineered to make the sample feel achievable.
Alpha, the significance level, is the tolerated rate of false positives, conventionally 0.05. Power is the probability of detecting the effect if it exists, conventionally set at 0.80, with 0.90 increasingly preferred. Sample size is usually the unknown you solve for. The test you plan to run, whether a comparison of means, a correlation, a regression, or an analysis of variance, determines which formula applies, so the analysis is specific to your design.
G*Power supports a wide range of tests and is free, which is why it dominates teaching and practice. You select the test family that matches your planned analysis, choose the a priori calculation type, enter your effect size, alpha, and desired power, and read off the required sample size. It also produces the reverse calculations: a sensitivity analysis that finds the smallest effect a given sample can detect, and a post hoc calculation of achieved power, though post hoc power on observed effects is widely criticized and rarely informative.
The software is only as good as the inputs. A precise sample size built on an arbitrary effect size is precise nonsense. Choosing a defensible effect size, and matching the calculation to the exact test you will run, is where the methodological judgment lives. For more complex designs such as structural equation modeling, a simple calculator is insufficient and simulation-based power analysis is the correct approach.
Standard power formulas assume a single straightforward test. Real studies often need more. Designs with clustering, repeated measures, or multiple comparisons require adjustments that a basic calculation ignores, and ignoring them underestimates the sample needed. Studies expecting attrition must inflate the recruited sample to end with enough completers. Latent variable models and multilevel designs usually call for simulation-based power analysis rather than a closed-form calculation.
You can explore the core relationships with our sample size calculator and our power analysis calculator, which are ideal for the common single-test case. When the design is more complex, our methodology team runs the simulation and documents the assumptions so the calculation holds up to review.
- Skipping the a priori analysis. Designing a study without one risks an underpowered result that cannot find a real effect.
- Reverse-engineering the effect size. Choosing an effect size to make the sample feel achievable produces a meaningless calculation.
- Relying on post hoc power. Achieved power computed from the observed effect adds little and can mislead.
- Forgetting attrition. The number you need to recruit is larger than the number you need to complete the study.
- Using a single-test formula for a complex design. Clustering, repeated measures, and latent variables require adjusted or simulation-based methods.
Power is not a separate formula bolted onto a test; it falls out of the same sampling distribution. Under the null hypothesis a test statistic follows its familiar central distribution (a t, F, or chi-square centred on zero or its degrees of freedom). Under a true effect it follows a noncentral version of that distribution, shifted by a noncentrality parameter that grows with both the effect size and the sample size. For a comparison of means the noncentrality is roughly the effect size multiplied by the square root of the per-group sample size:
ncp ~= d * sqrt(n / 2) power = P( statistic > critical value | noncentral distribution )
Power is simply the area of that shifted distribution beyond the critical value fixed by alpha. Two things follow that the four-number framing hides. First, required sample scales with the inverse square of the effect size, so halving the effect you want to detect roughly quadruples the sample. Second, everything that increases the noncentrality, larger true effect, lower outcome variance, a more efficient design, buys power, which is why reducing measurement error or using a within-subject design can be worth more than recruiting more people.
The required sample is more sensitive to the effect size than to anything else, so this input deserves the most scrutiny and is where most power analyses go wrong. Cohen's small, medium, and large conventions are a last resort, not a default; they were never meant to substitute for a field-specific judgment. The defensible anchor is the smallest effect size of interest, the smallest difference that would actually change practice or theory, sometimes formalised as a minimal clinically important difference. Powering for that protects you from a study that is significant but trivial.
Pilot studies are the other common source, and they carry a specific trap. A small pilot estimates the effect size with enormous uncertainty, and because researchers tend to build on pilots that looked promising, the borrowed effect is often inflated, a selection effect that guarantees the main study is underpowered. If you must use a pilot, use the lower bound of its confidence interval rather than the point estimate, or better, plan around the smallest effect worth detecting and treat the literature as a sanity check, not a source.
A single sample size is conditional on every nuisance parameter you fed the calculation: the outcome standard deviation, the control-group event rate, the correlation between repeated measures. Those are estimates, and if they are wrong the real power is not what the printout says. The mature responses are to compute a power or sensitivity curve across the plausible range of effect sizes and variances rather than a single point, and, when the inputs are genuinely uncertain, to use assurance (also called Bayesian or hybrid power), which averages power over a prior distribution for the effect rather than betting everything on one assumed value. Reporting the curve, and the assumptions behind it, is what turns a number into a defensible plan.
Multiplicity, allocation, and one-sided tests
Several design choices change the calculation in ways a single-test run ignores. Testing several primary outcomes or several pairwise contrasts inflates the family-wise error rate, so you must power against the corrected alpha (a Bonferroni-adjusted level, for instance), which raises the sample. An unequal allocation ratio (more controls than cases) loses efficiency relative to a balanced design and must be entered explicitly. A one-sided test needs fewer participants but is only legitimate when an effect in the opposite direction would be treated as no effect, which is rarely true; defaulting to one-sided to shrink the sample is the kind of choice a reviewer will challenge.
Clustered and repeated-measures designs need a design effect
When participants are grouped (patients within clinics, students within classes) their responses are correlated, and a standard formula that assumes independence understates the sample badly. Inflate the simple-random-sample size by the design effect:
design effect = 1 + (m - 1) * ICC
where m is the average cluster size and ICC is the intraclass correlation. Even a small intraclass correlation produces a large inflation when clusters are big. Repeated-measures and longitudinal designs depend instead on the within-person correlation across time, which usually reduces the required sample. For multilevel models, latent variable models, and anything without a clean closed form, simulation-based power (generate data under the assumed model thousands of times and count how often the test is significant) is the honest method, and it doubles as a check that the planned analysis actually recovers the effect.
# Closed-form cases mirror what G*Power does
library(pwr)
pwr.t.test(d = 0.5, sig.level = 0.05, power = 0.80) # n per group for a two-group t test
pwr.r.test(r = 0.30, sig.level = 0.05, power = 0.90) # n for a correlation
# Inflate for clustering with the design effect, then for attrition
deff <- 1 + (20 - 1) * 0.05 # 20 per cluster, ICC 0.05
n_completers <- ceiling(64 * deff) # 64 = the simple-random-sample n
n_recruit <- ceiling(n_completers / (1 - 0.15)) # 15 percent expected attrition
# No closed form? Simulate power for a mixed model
library(simr)
# fit a pilot/assumed lmer model 'm', then:
powerSim(m, nsim = 1000)
A power analysis turns four linked quantities, effect size, alpha, power, and sample size, into a defensible study plan, and G*Power makes the standard cases easy. The discipline is choosing a meaningful effect size honestly, matching the calculation to your exact analysis, and accounting for attrition and design complexity rather than trusting a single tidy number.
If your study needs a power analysis that will satisfy a grant panel, an ethics committee, or a reviewer, our statistical consulting team runs it and documents every assumption. Request a quote and tell us about your design.