Skip to content

Advertisement
Advertisement unavailable offline
The page content remains available.

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 do 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 do I 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

Theory — what is linear regression?

Linear regression fits a straight line to paired X and Y values using least squares, describing the average change in Y per unit of X. The coefficients minimise the sum of squared residuals between the observations and the fitted line. The slope b₁ shows how much Y changes on average when X increases by one, and R² shows the share of Y's variability explained by the model. A high R², such as 0.80, indicates a good fit for this sample but does not prove causation.

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
Advertisement unavailable offline
The page content remains available.
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.