Least Squares Regression Line Calculator
Least Squares Regression Line Calculator works out Fitted equation and Slope (b) from X values (predictor), Y values (response) and Predict y at x =. The default figures on this page give fitted equation of y = 2.2 + 0.6x; change any entry and the result, the working and the sources update together.
Your figures
Updates as you typeHow this is worked out
8 steps
- n = 5 observations.
- Sxx = 10, Sxy = 6, Syy = 6.
- Slope b = Sxy / Sxx = 6 / 10 = 0.6
- Intercept a = ybar - b xbar = 4 - 0.6 x 3 = 2.2
- Fitted model: y = 2.2 + 0.6x
- SST = 6 splits into SSR = 3.6 explained and SSE = 2.4 unexplained, so R^2 = 0.6.
- Standard error of the estimate s = sqrt(SSE / 3) = 0.89442719.
- Prediction at 6: 5.8.
All coefficientstable
Fitted valuestable
Residualstable
Scatter points with the fittable
| x | y | fitted | residual |
|---|---|---|---|
| 1 | 2 | 2.8 | -0.8 |
| 2 | 4 | 3.4 | 0.6 |
| 3 | 5 | 4 | 1 |
| 4 | 4 | 4.6 | -0.6 |
| 5 | 5 | 5.2 | -0.2 |
Its 5 worked examples are re-run on every release, last on 15 September 2026. What changed
Sources and references
4 sources
What the Least Squares Regression Line Calculator calculates
Fits a least-squares model to paired data and reports the equation, slope, intercept, correlation, R squared, adjusted R squared, standard errors, t and F tests, the ANOVA sums of squares, residuals and a prediction at any chosen x. Handles simple, multiple, weighted, exponential, power, logarithmic and binary logistic fits.
How to use this Least Squares Regression Line Calculator
Enter X values (predictor), Y values (response), Predict y at x = and Confidence level. Fitted equation updates as you type. Change one figure at a time to see what drives the result.
How the result is worked out
Open “How this is worked out” beside the result for the step-by-step calculation behind Fitted equation, Slope (b) and Intercept (a).
The method follows NIST/SEMATECH e-Handbook of Statistical Methods, 4.1 Introduction to Process Modeling and 1.3.5.11 Linear Regression, Draper, N.R. & Smith, H. (1998), Applied Regression Analysis, 3rd edition, Wiley, McCullagh, P. & Nelder, J.A. (1989), Generalized Linear Models, 2nd edition, Chapman & Hall and Kay, S.M. (1993), Fundamentals of Statistical Signal Processing: Estimation Theory, Prentice Hall, chapter 12.
What you can compare
Change one input at a time to see how it affects Fitted equation, Slope (b) and Intercept (a). The inputs you can vary are X values (predictor), Y values (response), Predict y at x = and Confidence level.
Results are general information, not financial, tax, legal, medical or engineering advice. Check any decision that matters with a qualified professional.
See something wrong? Report a problem with this calculator
Frequently asked questions
How to find the least squares regression line on a Casio calculator?
Fits a least-squares model to paired data and reports the equation, slope, intercept, correlation, R squared, adjusted R squared, standard errors, t and F tests, the ANOVA sums of squares. Open “How this is worked out” beside the result to see each step for your own figures.
How to calculate least squares of a regression line?
It needs X values (predictor), Y values (response), Predict y at x = and Confidence level. Nothing else is required, and the figures stay in your browser.
How to make a regression line on a calculator?
The result gives Fitted equation, Slope (b), Intercept (a), All coefficients, Number of observations and Correlation r, each labelled with its unit so the figure can be read on its own.
Is the regression line the least squares line?
Fits a least-squares model to paired data and reports the equation, slope, intercept, correlation, R squared, adjusted R squared, standard errors, t and F tests, the ANOVA sums of squares. On the figures this page opens with — predict y at x = 6 — the fitted equation is y = 2.2 + 0.6x. Put your own figures in their place and the working updates beside the result.
How to calculate least squares regression line?
The page opens with worked default figures: fitted equation of y = 2.2 + 0.6x. Replace them with your own and every figure updates as you type.
How to find regression on TI-84?
The method comes from NIST/SEMATECH e-Handbook of Statistical Methods, 4.1 Introduction to Process Modeling and 1.3.5.11 Linear Regression, Draper, N.R. & Smith, H. (1998), Applied Regression Analysis, 3rd edition, Wiley and McCullagh, P. & Nelder, J.A. (1989), Generalized Linear Models, 2nd edition, Chapman & Hall, listed in full under Sources so the figures can be checked against the original.
