ADVERT
📐 Linear Regression Calculator
Fit a linear regression line to (x, y) data, and see the slope, intercept, correlation coefficient, R², and predicted values from the best-fit line.
Linear Regression Calculator
Paste paired (x, y) data and fit a least‑squares regression line. See the slope, intercept, correlation, R², and predicted values from the best‑fit line.
Data
The calculator will ignore lines that do not contain two numeric values.
linear regression calculatorbest fit line & correlation calculator
Regression summary
Regression equation
ŷ = 1.45 + 0.75x
Slope (b₁)
0.75
Intercept (b₀)
1.45
Correlation (r)
0.984798
Coefficient of determination (R²)
0.969828
Prediction
x value to predict for
The prediction uses the best‑fit line and assumes a linear relationship continues at this x value.
Predicted value
ŷ at x
5.95
How to use this tool
- Paste your (x, y) pairs, one per line.
- Review the regression equation, slope, intercept, correlation, and R².
- Enter an x value to see the predicted y from the best‑fit line.
Best fit line calculator for quick analysis
- Turn a small data set into a linear trend line in seconds.
- Use the slope and intercept in spreadsheets, reports, or exam questions.
- Check how strong the linear relationship is using r and R².
What this linear regression calculator assumes
- The relationship between x and y is approximately linear.
- The calculation uses ordinary least squares with no extra weighting.
- The tool does not check residuals or outliers, so always interpret results in context.
FAQ
- Can I swap x and y?
- Yes, but remember that regressing y on x is not the same as regressing x on y. Decide which variable should be treated as the predictor and which as the response.
- What does R² tell me?
- R² (the coefficient of determination) tells you what proportion of the variation in y is explained by the linear relationship with x.
- Is this suitable for large data sets?
- It works best for small to moderate data sets you might see in homework, projects, or quick analyses. For very large data, a dedicated stats package or spreadsheet may be better.
ADVERT
ADVERT