Regression · SLR-1X

Sample Size for Simple Linear Regression

Plan a test of one numerical or binary categorical predictor in simple linear regression with a continuous outcome.

1. Planning setup

A categorical predictor is supported only when it has two categories and is coded 0/1.

2. Information obtained from previous studies or literature

3. Inputs decided by the researcher

For a numerical predictor, the slope is the expected change in mean Y for a one-unit increase in X.

Defaults to 10%. Enter 0 if no adjustment is required.

4. Results

Enter the simple-regression assumptions and select Calculate.

Formula, assumptions, limitations, and methodological note

Example clinical scenario

A researcher plans to test whether systolic blood pressure predicts estimated glomerular filtration rate. X may be entered as a numerical blood-pressure measurement, or as a binary hypertension indicator coded 1 for hypertension and 0 for no hypertension.

Formula and methodological note

The calculator uses the established normal-approximation formula for testing one slope in simple linear regression. For a binary predictor coded 0/1, SDx is derived as √[p(1−p)], and the slope is the anticipated mean outcome difference E(Y|X=1) − E(Y|X=0).

It assumes one predictor, one continuous outcome, independent observations, linearity, constant residual variance, and a nonzero slope satisfying the formula's SD relationship. The method does not cover multiple regression, covariate adjustment, clustering, non-linearity, heteroscedasticity, measurement error, or multi-category predictors. Results are rounded upward before dropout/non-response inflation. This tool supports research planning and does not replace statistical consultation.

Method references

  1. Cohen J. Statistical Power Analysis for the Behavioral Sciences. 2nd ed. Hillsdale: Lawrence Erlbaum Associates; 1988.
  2. Chow SC, Shao J, Wang H, Lokhnygina Y. Sample Size Calculations in Clinical Research. 3rd ed. Boca Raton: Chapman and Hall/CRC; 2017.

Suggested citation

Yaacob, Najib Majdi. “Sample Size for Simple Linear Regression (SLR-1X).” Web calculator. NajibMY, 2026. https://najibmy.netlify.app/tools/sample-size/regression/simple-linear-regression/.