Back to Tools
Regression calculator
Regression Navigator
Least Squares Predictive Analytics Engine
About the Regression calculator
Fit a straight line to your data with linear regression, and predict Y for a new X.
How to use the Regression calculator
- Enter the X Dataset and Y Dataset as comma-separated lists of equal length.
- Enter an X Value to predict.
- Press Calculate to see the line equation, RΒ² and the Predicted Y.
Formula and method
The best-fit line is y = a + bΒ·x with slope b = Ξ£(x β xΜ)(y β Θ³) Γ· Ξ£(x β xΜ)Β² and intercept a = Θ³ β bΒ·xΜ.
Worked example
X = 1, 2, 3, 4, 5 and Y = 2, 4, 6, 8, 10 give y = 2x, and predict Y = 14 for X = 7.
Tips
- Check the scatter of your data before trusting a straight line.
- Predicting far outside your data range is unreliable.
Frequently Asked Questions
The share of the variation in Y explained by the line. Closer to 1 means a better fit.