Calculators · §8
Form MS-C8
Multivariable model · binary outcome

Sample size for logistic regression (events per variable)

A feasibility check for adjusted analyses: does your dataset carry enough outcome events to support the number of predictors in your model?

A feasibility rule of thumb, not a full power analysis. A planning estimate, not a substitute for a statistician.

Method & formula

For a binary outcome, the effective sample size is the number of participants in the rarer outcome category — the events. The classical rule of thumb requires at least 10 events per candidate predictor (Peduzzi 1996): five predictors at a 20% event rate means ≥ 50 events, so ≥ 250 participants.

Treat this as a floor, not a target. The events-per-variable rule checks feasibility; it does not guarantee a stable or well-calibrated model. The modern approach (Riley et al., Stat Med 2019; van Smeden et al.) derives the required sample from the anticipated model performance, outcome prevalence, and number of parameters — and usually asks for more. Categorical predictors count once per estimated coefficient (a 4-category variable spends 3), and any predictor you considered counts, not just those that survived selection.

Source: Peduzzi P, et al. A simulation study of the number of events per variable in logistic regression analysis. J Clin Epidemiol 1996;49:1373–79 · Riley RD, et al. Minimum sample size for developing a multivariable prediction model. Stat Med 2019;38:1276–96.

Inputs, explained

Number of predictors/covariates
All candidate model terms, counting k−1 for a k-category variable, plus any interactions. Variables screened out during selection still count.
Event rate
The expected proportion with the outcome. If more than half have the outcome, the events are the participants without it — use 1 minus the rate.

A sample size is one line of a statistical plan. MedStatica turns a plain-language description of your study into the full plan — design, recommended analysis, power, causal diagram, methods paragraph, and runnable R, Python, SAS, and Stata code. The first plans are free, no card required.

Plan my study free →

Related calculators: linear regression (subjects per variable) · comparing two proportions · survival analysis (log-rank / Cox) · all calculators