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

  1. Enter the X Dataset and Y Dataset as comma-separated lists of equal length.
  2. Enter an X Value to predict.
  3. 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.
Live Support
We usually reply within minutes

Enter your name to start a conversation with our team.