Skip to main content

    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.

    Engine version 1.0.0 · Reviewed 1 October 2026

    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

    NN
    Number of participants
    pp
    Number of predictors
    R2R^{2}
    Share of the outcome’s variance the model explains
    f2f^{2}
    Cohen’s effect size, R² / (1 − R²)
    λ\lambda
    Noncentrality of the F distribution
    α\alpha
    Significance level: the chance of a false positive
    1−β1-\beta
    Power: the chance of detecting the effect if it is real
    qq
    Expected dropout

    Formulas

    The smallest N with enough power

    Pr⁡ ⁣(Fp, N−p−1, λ′>Fp, N−p−1, 1−α)≥1−β,λ=f2N,f2=R21−R2\Pr\!\left(F'_{p,\,N-p-1,\,\lambda} > F_{p,\,N-p-1,\,1-\alpha}\right) \ge 1-\beta, \qquad \lambda = f^{2} N, \quad f^{2} = \frac{R^{2}}{1 - R^{2}}

    The overall F test that R² is zero, powered on the noncentral F distribution [1].

    Dropout

    nrecruit=⌈n1−q⌉n_{\text{recruit}} = \left\lceil \frac{n}{1 - q} \right\rceil

    Applied last, to the participants actually recruited.

    Parameters

    Expected R²R2R^{2}

    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 predictorspp

    Values: A whole number of at least 1

    Count every term in the model, including indicator variables for categories and any interactions.

    Significance levelα\alpha

    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.

    Power1−β1-\beta

    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 dropoutqqOptional

    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

    Protocol 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.

    Open this example in the calculator

    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 calculator

    A small effect

    R² = 0.05 with 3 predictors: N = 212.

    Sample size: 212

    Open this example in the calculator

    Validation

    • 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. 1.Cohen J. Statistical Power Analysis for the Behavioral Sciences. 2nd ed. Hillsdale, NJ: Lawrence Erlbaum Associates; 1988.
    2. 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.