Home / Tools / Power Analysis Calculator

Power Analysis Calculator

Statistical power is the probability your study will actually detect a real effect of a given size. Pick a design, supply three of the four key inputs (effect, alpha, power, n), and the calculator solves for the fourth, from sample-size planning to minimum detectable effect. Everything runs in your browser.

i New to power analysis? Read the 4-min primer

What power is. Statistical power is the probability of detecting a real effect of a given size at a chosen alpha. Power = 0.80 means that if the effect you are positing actually exists, you have an 80% chance of getting a significant result, and a 20% chance of missing it (a Type II error). Pick the design first, then ask what power you can afford.

The four-way relationship. Sample size n, effect size, alpha, and power form a closed system: pin three, the fourth is forced. Bigger effects need fewer subjects. Tighter alpha (0.01 vs 0.05) costs sample size. Higher power (0.90 vs 0.80) costs sample size. Smaller effects cost the most: halving d roughly quadruples n.

How to read the result. If you solved for n, the number you get is the smallest sample that reaches the target power. If you solved for power, you get the probability of detecting the effect at the n you can collect. If you solved for the minimum detectable effect, the number is the smallest effect you have a chance of catching given your n, alpha, and target power.

Picking the design. Continuous outcome, two groups: two-sample t-test on Cohen's d. Continuous outcome, paired or single-arm: one-sample or paired t. Binary outcome, two arms: two-proportion test on Cohen's h. Multi-arm continuous: one-way ANOVA on Cohen's f. Bivariate Pearson correlation: correlation power on r. Goodness-of-fit or contingency: chi-square on Cohen's w with correct df.

Try:

Study parameters
When to use this design

    result

    -

    How this is computed
    1
    2
    3
    The same analysis in R
    
      

    No data leaves your browser Verified against R's pwr.t.test(), pwr.anova.test(), pwr.r.test() and friends Free, no sign-up

    Anatomy of a power calculation
    power = P( T > t_crit | H1 ) T ~ noncentral t( df, ncp ) ncp = d · sqrt( n1 · n2 / (n1 + n2) )
    Noncentral t (one- and two-sample, paired). Under the alternative, the t-statistic follows a noncentral t with df from the design and a noncentrality parameter (ncp) that grows with sqrt(n) and the standardized effect. Power is the area of that noncentral distribution beyond the critical value of the central t. We evaluate that tail exactly with the AS 243 series (Lenth, 1989), the routine behind R's pt(t, df, ncp), so one- and two-sided power match pwr.t.test() to machine precision.
    power = P( F > F_crit | H1 ) F ~ noncentral F( df1, df2, ncp ) ncp = f² · k · n (one-way ANOVA)
    Noncentral F (one-way ANOVA). The omnibus F under H1 is noncentral F. We sum central F CDFs weighted by Poisson(ncp/2) probabilities, the exact Poisson-mixture representation, starting at the peak weight so it converges in a handful of terms. df1 = k-1 (numerator), df2 = k(n-1) (denominator). Matches pwr.anova.test().
    h = 2 · ( arcsin sqrt(p2) - arcsin sqrt(p1) ) ncp_z = |h| · sqrt(n/2) (two-prop, n per arm) ncp_z = |h| · sqrt(n) (one-prop) power = 1 - Φ( z_crit - ncp_z )
    Normal approximation for proportions. Cohen's h is the variance-stabilising arcsine transform applied to each proportion, then differenced. After the transform, the test statistic is approximately normal with unit variance, so power becomes a tail probability of a shifted standard normal. Matches pwr.2p.test and pwr.p.test. It gets brittle when expected counts are tiny; switch to an exact test there.
    z_r = atanh(r) + r / ( 2(n-1) ) (bias-corrected Fisher z) z_rc = atanh( r_crit ) power = Φ( (z_r - z_rc) · sqrt(n - 3) )
    Correlation power (Fisher z). We follow the exact route pwr.r.test() uses: apply the variance-stabilising Fisher z transform to the target r (with the small r / (2(n-1)) bias correction), transform the critical correlation the same way, and read power off a standard normal whose SE is 1 / sqrt(n-3). This matches pwr.r.test() to machine precision.
    w = sqrt( sum( (p_obs - p_exp)² / p_exp ) ) ncp_chi = w² · n power = 1 - F_chi( x_crit | df, ncp_chi )
    Chi-square noncentrality. Cohen's w is the population effect size for chi-square: a normalized RMS deviation between observed and expected cell probabilities. Multiplied by n it becomes the noncentrality parameter of a chi-square with the design's df (k-1 for goodness-of-fit, (r-1)(c-1) for contingency). Power is the upper tail of that noncentral chi-square beyond the critical value.

    When this is the wrong tool

    These closed-form formulas assume a single fixed effect with a known sampling distribution. If your design breaks that assumption, reach for the alternative.

    If you haveUse instead
    Clustered or hierarchical data (students in classes, patients in clinics)The independence assumption fails. Inflate n by the design effect 1 + (m-1)ρ (m = cluster size, rho = intraclass correlation), or simulate against the mixed model you plan to fit.
    Time-to-event / survival outcomeThe number of events drives power, not the number of patients. Use Schoenfeld's formula on the log hazard ratio, or simulate against a Cox model with realistic censoring.
    Bayesian a priori sample sizeFrequentist power asks for a long-run rejection rate. A Bayesian sample-size question (posterior precision, Bayes-factor design) is a different paradigm; simulate against your prior and likelihood.
    Pilot-study sample sizePilots are sized for feasibility (recruitment, dropout, instrument validity), not hypothesis power. Cohen's tables do not apply; aim for about 12 per arm or follow a feasibility guide.
    Mixed effects, GLMM, nested ANOVANo closed form. Simulate: generate datasets under H1, fit the model, count rejections.

    Frequently asked questions

    How do I calculate the power of a t-test?

    Power = 1 - beta, the probability of detecting a true effect. For a two-sample t-test, power depends on effect size (Cohen's d), sample size per group, and alpha. A standard target is 0.80. The calculator inverts the relationship: given any three of {n, d, alpha, power}, it solves for the fourth, same as R's pwr::pwr.t.test.

    What is the minimum detectable effect (MDE)?

    MDE is the smallest true effect size your study would detect with the desired power and alpha at a given sample size. If your MDE is 0.5 SD but you only care about effects above 0.2 SD, your study is underpowered and a non-significant result is uninformative. Always compute MDE before running an experiment.

    Why does my study need so many subjects to detect a small effect?

    Required sample size grows with the inverse square of the effect size. Halving the effect quadruples n. To detect Cohen's d = 0.2 (small) at 80% power needs about 200 per group; d = 0.5 (medium) needs 64; d = 0.8 (large) needs only 26. Run the math first to confirm the study is feasible.

    Go deeper

    Numerical methods: exact noncentral t via the AS 243 series (the routine behind R's pt); noncentral F and chi-square via the exact Poisson-mixture CDF series; correlation via the Fisher-z route of pwr.r.test; proportions via Cohen's h and the arcsine normal approximation. Verified against R 4.6.0's pwr package to better than 1e-6.