Method document
Sample size for a multiple linear regression
How many participants are needed to show that a linear regression model explains a share of the outcome’s variance, from the expected R² and the number of predictors. Covers dropout.
https://statwisely.com/methods/regression-linear/
When to use it
- Testing whether a set of predictors, taken together, is associated with a continuous outcome.
Not for
- Testing one predictor in a model that contains others. Use the single coefficient.
- A binary outcome. Use logistic regression.
Notation
- Number of participants
- Number of predictors
- Share of the outcome’s variance the model explains
- Cohen’s effect size, R² / (1 − R²)
- Noncentrality of the F distribution
- Significance level: the chance of a false positive
- Power: the chance of detecting the effect if it is real
- Expected dropout
Formulas
The smallest N with enough power
The overall F test that R² is zero, powered on the noncentral F distribution [1].
Dropout
Applied last, to the participants actually recruited.
Parameters
Expected R²
Values: Above 0 and below 1
From a comparable model in the literature or a pilot study. Cohen’s benchmarks of f² = 0.02, 0.15 and 0.35 correspond to R² of about 0.02, 0.13 and 0.26 [1].
Number of predictors
Values: A whole number of at least 1
Count every term in the model, including indicator variables for categories and any interactions.
Significance level
Values: Between 0 and 1; usually 0.05
The false-positive rate you accept. A smaller α, for example to allow for several primary outcomes, needs a larger sample.
Power
Values: Between 0 and 1; usually 0.80 or 0.90
The chance of a significant result if the assumed effect is real. Funders and ethics committees commonly expect at least 0.80.
Expected dropoutOptional
Values: 0% up to, but not including, 100%
The share of participants expected to provide no outcome, from comparable studies. Recruiting more restores the numbers, not the comparability of the groups: if dropout is related to the outcome, the estimate can still be biased.
Assumptions
- Participants are independent; residuals are roughly normal with constant variance.
- Predictors are treated as fixed. A significant overall test says nothing about which predictors matter.
- Dropout is unrelated to the outcome; recruiting more participants restores the numbers but cannot remove bias.
Worked examples
Three predictors, a medium effect
R² = 0.13, so f² = 0.149, with 3 predictors; α = 0.05, 80% power: N = 77.
Sample size: 77
Open this example in the calculatorProtocol statement
To detect an R² of 0.13 with 80% power at a significance level of 0.05, using the overall F test of a linear regression with 3 predictors, the required sample size is 77 participants. Calculated with StatWisely (statwisely.com) using: N: solve the noncentral-F test of R²=0 with λ=Nf² and f²=R²/(1-R²). These are planning estimates; confirm the final design with a qualified statistician.
Six predictors
The same R² spread over 6 predictors: N = 98. Each extra predictor costs degrees of freedom.
Sample size: 98
Open this example in the calculatorA small effect
R² = 0.05 with 3 predictors: N = 212.
Sample size: 212
Open this example in the calculatorValidation
- Every worked example on this page is recomputed by the StatWisely engine whenever the software is built. If a number or formula here stopped matching the calculator, the release would be stopped until this document was corrected.
- An independent implementation in R recomputes this test every night and before each production release, and the results are compared with the engine’s.
- For f² = 0.15 and three predictors, at α = 0.05 and 80% power, StatWisely and G*Power both give 77 [2].
How to cite
StatWisely. Sample size for a multiple linear regression. Method document, engine version 1.0.0, reviewed 2026-10-01. https://statwisely.com/methods/regression-linear/
Cite the original references for the formulas your design uses as well.
References
- 1.Cohen J. Statistical Power Analysis for the Behavioral Sciences. 2nd ed. Hillsdale, NJ: Lawrence Erlbaum Associates; 1988.
- 2.Faul F, Erdfelder E, Lang AG, Buchner A. G*Power 3: a flexible statistical power analysis program for the social, behavioral, and biomedical sciences. Behavior Research Methods. 2007;39(2):175–191.