Skip to content

Advertisement

Linear regression calculator

Paste paired X and Y values in matching order to fit an ordinary least-squares line.

R-squared: —

Fill in the fields above — the result is computed on this page.

Number of pairs
—
Intercept b₀
—
Slope b₁
—
Pearson correlation r
—
Adjusted R-squared
—
RMSE
—
SSE
—

Fit and residuals

Row X Y Fitted value Residual
Fill in the fields above — the result is computed on this page.
What these numbers mean
  • The sign of b₁ gives the direction, while its magnitude depends on the units of X and Y.
  • A high R-squared does not establish causality or guarantee performance outside the data range.

The model assumes a linear relationship and independent residuals with roughly constant spread. Extrapolation beyond the observed X range may be unreliable, and outliers can strongly move the fitted line.

How to use this page
  1. Paste matching X and Y values.
  2. Review the equation, R-squared and RMSE.
  3. Inspect residuals before interpreting the model.

What this page does not do: The model assumes a linear relationship and independent residuals with roughly constant spread. Extrapolation beyond the observed X range may be unreliable, and outliers can strongly move the fitted line.

Further reading

Linear regression describes the average change in Y for a one-unit change in X. It chooses coefficients that minimise the sum of squared residuals. The slope b₁ is the estimated change in Y when X increases by one.

R-squared is the share of variation in Y described by the line within the analysed sample. The residual table helps reveal poorly fitted observations and patterns that a straight line misses.

Frequently asked questions

What does an R-squared of 0.80 mean?

Within this sample, the line accounts for 80% of the total squared variation of Y around its mean. It is not a probability or proof of causality.

Can I predict outside the X range?

The equation permits it, but that is extrapolation and normally needs separate justification.

See also

← All calculators

Advertisement
Offline app and draw notifications

My saved selections

Selections saved only in this browser. Numbers are shown exactly as saved; this is not a lottery ticket.

Open the My saved selections hub
Restore with preview

Restore in the hub: review the file and confirm first. Both old backups and the complete selections + journal backup are supported. Nothing is uploaded.