QiLing Tools

📉Linear Regression Calculator - Regression Line, r and R² Online

Paste your x and y columns and get the least-squares regression equation, the correlation coefficient r and R² immediately. Switch to a quadratic or cubic fit, inspect the residual of every point, predict y for any x, and open the scatter plot with the fitted curve in the grapher.

Free · No sign-up · Runs in your browserLast updated:

Loading tool...

How to use Linear Regression

  1. 1Copy two columns from a spreadsheet or lab notes — one point (x, y) per line
  2. 2Choose a linear, quadratic or cubic fit
  3. 3Read the equation, r and R², and enter an x in the prediction box for ŷ
  4. 4Click “Plot the scatter and the fitted curve” to see the fit in the grapher

FAQ

What is the difference between r and R²?
r measures the direction and strength of a linear relationship and runs from −1 to 1. R² is its square in the linear case and gives the share of the variation explained by the fit; the closer to 1 the better. Polynomial fits report R² only.
How large does r have to be to count as strong?
A common rule of thumb: |r| ≥ 0.8 is strong, 0.5 to 0.8 moderate, 0.3 to 0.5 weak, and below 0.3 essentially none. The tool labels it for you.
What are residuals for?
A residual is observed minus fitted. The table shows which points sit furthest from the trend, and a clear pattern in the residuals (all positive then all negative, say) is a sign that a straight line is the wrong model — try the quadratic or cubic fit.
How should the data be formatted?
One point per line with x and y separated by a comma, space or tab, so you can paste two columns straight from a spreadsheet. With a single column the row number is used as x.
Does a high R² prove causation?
No. R² only describes how closely the curve follows the data. Two quantities can move together because of a third common cause; establishing causation needs an experiment or domain knowledge.