Simple linear regression is a statistical model that describes the linear relationship between an independent variable (X) and a dependent variable (Y) as a line: Ŷ = β₀ + β₁X.
Linear Regression Calculator
Compute simple linear regression via OLS with equation, r², standard error, and prediction.
OLS linear regression with r², standard error, and prediction.
Simple linear regression models the relationship between an independent variable X and a dependent variable Y as a straight line: Ŷ = β₀ + β₁X. Coefficients are estimated by Ordinary Least Squares (OLS), which minimizes the sum of squared residuals. r² indicates how well the line fits the data.
Enter data pairs and get the regression line equation.
- Type x, y pairs — one per line. Use comma, semicolon, or space as separator.
- The tool automatically computes slope, intercept, r², and standard error.
- Use the prediction section to compute the expected Y for any X value.
Sources and references for this tool
These references help contextualize formulas, standards, APIs and limitations used on this page. They do not replace professional validation when a result has legal, financial, medical or operational impact.
- NIST/SEMATECH e-Handbook — Linear RegressionNIST — Definition, assumptions and interpretation of simple linear regression.
- Ordinary Least Squares EstimationWikipedia — Ordinary least squares method used to compute the regression line.
- Statistics How To — Linear RegressionStatistics How To — Practical guide to regression equation, slope, intercept, r² and standard error.