Statistics

Linear Regression Calculator

Linear regression finds the straight line that best fits a set of data points. This calculator computes the least-squares slope and intercept, plus the correlation coefficient r and r², from your paired x and y values.

Linear Regression Calculator

Least-squares line and correlation for paired data.

Try:

Frequently asked questions

What is the least-squares line?

It is the line that minimizes the total squared vertical distance between the data points and the line.

What does the correlation coefficient r mean?

r ranges from −1 to 1: values near ±1 indicate a strong linear relationship, values near 0 indicate a weak one.

What is r²?

r² is the fraction of the variation in y explained by the regression line — a measure of fit quality.