Linear Regression Calculator

Least Squares Regression Line Calculator - estimates slope & intercept.
Enter observations in box, use a separate line or comma between each measurement.

TrendLine Equation

Slope:1
Intercept:1
R-Squared:1

Graph to Show predicted value and degree of fit. Tap or Hover over the trendline in the graph below to get the predicted value of the series for a given value of X.

Tool Overview - Linear Regression Calculator

This linear regression calculator fits a linear trendline to your data using the least squares technique. It optimizes the fit of the trendline and returns the y-intercept and slope of the line. Then - to help you visualize the trend - we display a plot of the data and the trendline we fit through it. If you hover or tap on the chart (in most browsers), you can get a predicted Y value for that specific value of X. The calculator also evaluates how well the linear trendline fits the data via the R-squared statistic.

Enter your sample data as a string of numbers - separated by commas or with a new line for each measurement. The linear regression calculator will estimate the slope and intercept of a linear trendline that is the best fit with your data.

Some practical comments on using regression in real world analysis:

Sharing Results of The Linear Regression Calculator

Need to pass an answer to a friend? It's easy to link and share the results of this calculator. Hit calculate - then simply cut and paste the url after hitting calculate - it will retain the values you enter so you can share them via email or social media.

Other Math Tools