ThisCalculator

Everyday

Linear Regression Power Calculator: How to Use It

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

This calculator works out the statistical power of a simple linear regression test. You enter your expected sample size, the number of predictor variables, the anticipated effect size (f²), and your significance level (alpha), and it returns the power of the test, which is the probability of detecting a true effect. It also shows the critical F-value and the noncentrality parameter, which are the intermediate values used in the calculation.

Formula

The power of a linear regression F-test is calculated using the noncentral F distribution. The formula for power is:

Power = P(F ≥ Fcrit | df1, df2, λ)

Where:

  • F is the F-statistic from the regression model.
  • Fcrit is the critical value from the central F distribution at your chosen alpha level, with degrees of freedom df1 and df2.
  • df1 = k (number of predictors).
  • df2 = n – k – 1 (residual degrees of freedom).
  • λ (lambda) is the noncentrality parameter, calculated as λ = f² × n, where n is the total sample size.
  • f² is the effect size for regression, defined as f² = R² / (1 – R²), where R² is the proportion of variance explained by the model.

The critical F is found from the central F distribution: Fcrit = F(1 – α, df1, df2). Power is then the probability that a noncentral F random variable with the given degrees of freedom and noncentrality parameter exceeds Fcrit.

Worked Example

Let’s use the default values from the calculator: sample size n = 100, number of predictors k = 1, effect size f² = 0.15, and alpha α = 0.05.

  1. Degrees of freedom: df1 = k = 1, df2 = n – k – 1 = 100 – 1 – 1 = 98.
  2. Critical F: Fcrit = F(1 – 0.05, 1, 98) ≈ 3.9381 (from F-distribution tables or software).
  3. Noncentrality parameter: λ = f² × n = 0.15 × 100 = 15.
  4. Power = P(F ≥ 3.9381 | df1=1, df2=98, λ=15). Using software, this probability is approximately 0.9329.

So with 100 participants, one predictor, a medium effect size (f²=0.15), and α=0.05, the power is about 0.93, meaning you have a 93% chance of detecting the effect if it truly exists.

When to Use This Calculator

Use this calculator during the planning phase of a study that will be analyzed with multiple linear regression. You might want to know:

  • What sample size do I need to achieve 80% power? (Run the calculator with different n values until power reaches 0.80.)
  • Given my available sample size, how much power do I have to detect a small, medium, or large effect?
  • How does adding more predictors affect my power?

This is especially common in social sciences, psychology, epidemiology, and any field where regression is used to test hypotheses about relationships between variables. It is also useful for grant proposals or ethics reviews that require a justification of sample size.

How to Choose Effect Size (f²)

The effect size f² is the key input you must estimate from prior research or theory. Cohen’s conventions for regression are:

  • Small effect: f² = 0.02
  • Medium effect: f² = 0.15
  • Large effect: f² = 0.35

These values correspond to R² of 0.02, 0.13, and 0.26, respectively. If you have a prior study with an R², you can convert it using f² = R² / (1 – R²). For example, if a previous study found R² = 0.10, then f² = 0.10 / 0.90 ≈ 0.111. If you are unsure, it is safer to use a smaller effect size to ensure your study is adequately powered to detect weaker effects.

Common Mistakes and Pitfalls

  • Using the wrong degrees of freedom: For the overall F-test, df1 = k (number of predictors), not k+1. The intercept is not counted as a predictor.
  • Confusing f² with R²: f² is not the same as R². Always convert using the formula above.
  • Ignoring sample size in the noncentrality parameter: λ = f² × n, not just f². Doubling your sample size doubles λ, which increases power.
  • Applying one-tailed vs. two-tailed tests: The F-test is inherently one-tailed (it tests whether the model explains more variance than chance). The alpha level is the upper tail probability.
  • Rounding too early: Rounding the critical F or λ to 2 decimals can change the final power by a few percentage points. Keep full precision until the final step.

Limitations and Alternatives

This calculator assumes a fixed sample size, a single test of the overall model, and a normally distributed error term. It does not account for:

  • Multiple comparisons or testing individual coefficients separately (which would require a different power calculation).
  • Missing data, which reduces effective sample size.
  • Unbalanced designs or clustered data, which may require more complex power analysis.

If you are planning a study with multiple primary hypotheses, consider using software like G*Power (free) or R’s pwr package, which offer more options. For simple cases, this calculator gives a quick and accurate estimate.

Frequently Asked Questions

What is statistical power?

Statistical power is the probability that your test will reject the null hypothesis when it is false. In other words, it’s the chance of finding a real effect. Power of 0.80 or higher is conventionally considered adequate.

What if I want to calculate sample size instead of power?

You can use this calculator iteratively: try different sample sizes until the power reaches your target (usually 0.80). For a one-off calculation, you can also use a dedicated sample size calculator, but this one works fine for simple cases.

Does the number of predictors affect power?

Yes. Adding more predictors increases df1 and changes df2 (n – k – 1), which generally reduces power for a given sample size and effect size, because you are estimating more parameters. The calculator accounts for this automatically.

What is the noncentrality parameter?

The noncentrality parameter (λ) measures how far the true distribution is from the null distribution. In regression, λ = f² × n. A larger λ means the effect is easier to detect, so power increases.

Can I use this for logistic regression?

No. This calculator is for linear regression (continuous outcome). Logistic regression has a different power calculation based on the odds ratio and event rate. Use a specialized calculator for logistic regression.

What is a good power level?

Most researchers aim for 0.80, meaning an 80% chance of detecting a true effect. Some fields prefer 0.90 or higher, especially when the cost of missing an effect is high. The calculator lets you see how power changes with sample size.

Related

Formula used
in n | Sample size (n) | - | 100 | 3
in k | Predictors (k) | - | 1 | 0
in f2 | Effect size f² | - | 0.15 | 0.01
in a | Alpha (α) | - | 0.05 | 0.001
out power | Power | - | 1 - ncdist(crit, df1, df2, ncp) | 4
out crit | Critical F | - | finv(1 - a, df1, df2) | 4
out ncp | Noncentrality λ | - | f2 * n | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.