Linear Regression Calculator interactive tool
Separate values with commas, spaces, or new lines.
Must have the same count as x values.
Least squares regression line:
y = 0.9000 · x + 1.3000
Slope (m)
0.9000
Intercept (b)
1.3000
Correlation (r)
0.9000
R²
0.8100
R ranges from −1 (perfect negative linear correlation) to +1 (perfect positive). R² shows how much of the variation in y is explained by the linear model.
What Is Linear Regression?
A linear regression calculator fits a straight line y = mx + b through a set of (x, y) data points using the least squares method. It reports the slope, intercept, correlation coefficient r, and R² value so you can judge how well the line explains the data.
When to Use Linear Regression
Linear regression is used in science experiments, economics, and data analysis whenever you suspect a roughly linear relationship between two variables. Students can paste values from a spreadsheet into this regression tool, get the best‑fit line instantly, and then interpret the slope and R² in the context of their project or lab report.
How To Use the Linear Regression Calculator
- Paste or type your x values into the first box, separated by commas, spaces, or new lines.
- Paste or type the corresponding y values into the second box, making sure there are the same number of values as in x.
- The linear regression calculator will compute the best-fit line y = mx + b using least squares.
- Review the slope, intercept, correlation coefficient r, and R² to understand how well the line fits your data.
- Use the Example button to load a simple dataset, or Reset to start with an empty form.
