Linear Regression Calculator
Find the line of best fit through your data. Enter matching X and Y values separated by commas to get the regression equation, the correlation strength and a prediction for any new X — useful for school projects and quick analysis.
How to use
- Enter X and Y values separated by commas (at least 3 points).
- The regression line y = a + bx and correlation r will show.
- Optional: you can also get the predicted Y for a new X.
Tips
- Enter equal numbers of X and Y values, separated by commas — mismatched counts cannot produce a line.
- A correlation near 1 or −1 means the line fits well; near 0 means the prediction is weak.
- Predictions are safest near your data range; guessing far outside it is unreliable.
Note: This is least squares regression — the line is the one where the sum of squared distances from all points is smallest. Correlation is between −1 and 1.