Skip to content
ZeroServer.tools

Linear Regression Calculator

Find the line of best fit and R² from your data points.

Format: x,y — one pair per line. Blank lines and invalid rows are ignored.

Regression Equation
y = 2.034286x + (-0.053333)
R² (coefficient of determination)
0.9979
Strong fit
Correlation (r)
0.998947
n (data points)
6
Summary Statistics
Slope (m)Intercept (b)nMean XMean Y
2.034286-0.0533330.997963.50007.0667
Predict Y for a given X
Predicted Y = 14.186667
Scatter Plot with Regression Line
Data Table
xypredictedresidual
1.00002.10001.98100.1190
2.00003.90004.0152-0.1152
3.00006.20006.04950.1505
4.00007.80008.0838-0.2838
5.000010.100010.1181-0.0181
6.000012.300012.15240.1476

About Linear Regression

Linear regression finds the straight line that best fits a set of data points by minimizing the sum of squared residuals (ordinary least-squares). The formula produces slope m and intercept b so you can express any trend as y = mx + band predict new values. R² (coefficient of determination) measures fit quality: >0.9 is a strong relationship, 0.7–0.9 moderate, and below 0.7 weak. The correlation coefficient r adds direction — positive for upward trends, negative for downward. All calculations run locally in your browser; no data is sent to any server.

Private & free — this tool runs entirely in your browser.

Related Calculators tools