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 to 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
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
Beta distribution calculator
Calculate beta density, CDF, upper tail and quantile together with its mean and variance.
Chi-square test calculator
Calculate chi-square goodness of fit, independence, or a chi-square critical value.
Continuous uniform distribution calculator
Calculate density, CDF, upper tail, quantile, mean and variance for U(a,b).