Calculate regression equations, R², correlation, and make predictions with interactive visualizations
Enter data and click Calculate to see results
Linear regression is a statistical method for modeling the relationship between a dependent variable (Y) and an independent variable (X). It finds the best-fitting straight line through the data points.
The linear regression line is expressed as:
Where:
R² measures how well the regression line fits the data:
| R² Value | Interpretation | Fit Quality |
|---|---|---|
| 0.90 - 1.00 | 90-100% of variance explained | Excellent |
| 0.70 - 0.89 | 70-89% of variance explained | Good |
| 0.50 - 0.69 | 50-69% of variance explained | Moderate |
| 0.00 - 0.49 | Less than 50% explained | Weak |
The correlation coefficient measures the strength and direction of the linear relationship:
The standard error measures the typical distance between observed and predicted values:
A smaller SEE indicates better predictions.
Slope Interpretation: "For every 1-unit increase in X, Y increases/decreases by b units."
Intercept Interpretation: "When X = 0, the predicted value of Y is a."
R² Interpretation: "The model explains R²×100% of the variance in Y."
Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.
R² is the proportion of variance in Y explained by X using the fitted linear model. Higher values indicate better fit, but check residuals for assumptions.
Linearity, independence, homoscedasticity (constant variance), and approximately normal residuals. Inspect residual plots for violations.
Enter an X value; the model predicts Y = intercept + slope × X. Consider prediction intervals for uncertainty around point estimates.
Try transformations (e.g., log) or polynomial terms, or consider non‑linear or robust methods if residual patterns persist.