Logistic Regression Power Analysis Calculator

Evaluate sample size, power, and detectable odds ratios. Visualize tradeoffs across event rates and exposures. Improve binary study design with faster evidence-based planning today.

Calculator inputs

This version uses a Wald-style approximation for one binary predictor and applies variance inflation from the entered R² value.

Example data table

These examples use a two-sided alpha of 0.05 and a target power of 0.80.

Scenario n p0 Prevalence Odds ratio Achieved power Required n
Screening pilot 120 0.120 0.350 1.800 0.050 0.1957 781
Balanced cohort 250 0.200 0.500 1.600 0.100 0.3205 881
Rare exposure study 450 0.180 0.150 2.100 0.120 0.6588 630
Adjusted registry analysis 600 0.250 0.400 1.400 0.250 0.3521 1,887
Protective factor check 320 0.300 0.450 0.720 0.080 0.2335 1,660

Formula used

Model: logit[P(Y = 1 | X)] = β0 + β1X

Odds ratio link: OR = eβ1, so β1 = ln(OR)

Exposed event probability: p1 = (OR × p0) / (1 - p0 + OR × p0)

Variance inflation factor: VIF = 1 / (1 - R²)

Approximate standard error: SE(β1) ≈ √{VIF × [1 / (n(1 - q)p0(1 - p0)) + 1 / (nq p1(1 - p1))]}

Noncentral effect size: δ = |β1| / SE(β1)

Two-sided power: 1 - Φ(z1-α/2 - δ) + Φ(-z1-α/2 - δ)

One-sided power: 1 - Φ(z1-α - δ)

Required sample size: solve for n that makes the chosen power equation reach the target value.

How to use this calculator

  1. Enter the total sample size you can realistically recruit.
  2. Set alpha and the power target for your study goal.
  3. Enter the baseline event probability for the unexposed group.
  4. Enter predictor prevalence as the share with X = 1.
  5. Enter the odds ratio you want to detect or evaluate.
  6. Use R² to reflect overlap with other covariates.
  7. Select one-sided or two-sided testing.
  8. Choose the detectable effect direction for the minimum detectable odds ratio output.
  9. Submit the form to view power, required sample size, and charted power across sample sizes.
  10. Download the summary as CSV or PDF for reporting notes.

Frequently asked questions

1. What does this calculator estimate?

It estimates achieved power, required sample size, and the minimum detectable odds ratio for a single binary predictor in a logistic regression framework.

2. When is this approximation useful?

It works well for planning studies with binary outcomes and one main binary exposure. It is best for early design checks, not final regulatory submissions.

3. How does baseline event probability affect power?

When the outcome is extremely rare or extremely common, information drops. Midrange event probabilities usually improve precision and reduce required sample size.

4. What does predictor prevalence mean?

It is the share of observations with X = 1. Very imbalanced group sizes usually weaken power because one group contributes limited information.

5. Why include other-covariate R²?

It inflates variance through a variance inflation factor. Higher overlap between predictors means less unique information for the tested effect.

6. What if my odds ratio is below 1?

Odds ratios below 1 indicate a protective association. The calculator still works and reports the corresponding exposed event probability.

7. Can this handle continuous predictors or interactions?

Not directly. This version uses a binary predictor approximation. For continuous terms, interactions, clustering, or rare-event corrections, use simulation or specialist software.

8. Should I rely on one-sided tests?

Only when a reverse effect would be scientifically irrelevant before data collection. One-sided testing can shrink required sample size, but it needs strong justification.

Related Calculators

Linear Regression CalculatorMultiple Regression CalculatorLogistic Regression CalculatorSimple Regression CalculatorPower Regression CalculatorLogarithmic Regression CalculatorR Squared CalculatorAdjusted R SquaredSlope Intercept CalculatorCorrelation Coefficient Calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.