Linear regression calculator
Paste paired X and Y values in matching order to fit an ordinary least-squares line.
Fit and residuals
| Row | X | Y | Fitted value | Residual |
|---|---|---|---|---|
| Fill in the fields above — the result is computed on this page. | ||||
How do I use this page?
- Paste matching X and Y values.
- Review the equation, R-squared and RMSE.
- 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?
Can I predict outside the X range?
See also
A/B test calculator
Compare two proportions in an A/B test. Calculate conversion rates, difference, uplift, z score, p value and c
A/B test planning — sample size, MDE and duration
Plan a two-proportion experiment, estimate detectable effect and traffic duration.
ACF and PACF autocorrelation calculator
Calculate ACF and PACF across time-series lags. Review the chart, reference bounds and coefficient table.