Line Regression Equation Calculator
Linear Regression Calculator works out Fitted equation and Slope (b) from X values (predictor), Y values (response) and Model. 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 Linear Regression 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 Linear Regression Calculator
Enter X values (predictor), Y values (response), Model and Number of predictors. Fitted equation updates as you type, and “Use a worked example” loads checked figures you can adjust. 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.
Least-squares line through (1,2) (2,4) (3,5) (4,4) (5,5) example
With X values (predictor): 1,2,3,4,5, Y values (response): 2,4,5,4,5, Predict y at x =: 6, the calculator returns Slope (b): 0.6, Intercept (a): 2.2, R squared: 0.6. This example is checked against an independent source in the test suite.
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), Model, Number of predictors, Weights and Predict y at x =.
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 get linear regression on 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 do I perform linear regression on a TI-84 calculator?
It needs X values (predictor), Y values (response), Model, Number of predictors, Weights and Predict y at x =. Nothing else is required, and the figures stay in your browser.
How do I calculate linear regression?
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.
Can AI do linear regression?
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.
What information do I need for the Linear Regression Calculator?
You need X values (predictor), Y values (response), Model, Number of predictors, Weights, Predict y at x =, Predictor values to predict at and Confidence level. The page opens with default figures that give fitted equation of y = 2.2 + 0.6x, so you can see the scale before entering your own.
What does this Linear Regression Calculator show?
It shows Fitted equation, Slope (b), Intercept (a), All coefficients, Number of observations, Correlation r, R squared and Adjusted R squared, with the working and any warnings for your entries.
