Linear Regression Calculator
Calculate linear regression line, slope, intercept, and R-squared. Find the best-fit line for your data points.
Inputs
Results
Slope (m)
1.5
Y-Intercept (b)0.667
R² (Coefficient of Determination)0.964
Equationy = 1.5x + 0.667
How to Use This Calculator
- Enter matched (x, y) data point pairs — at least three points are needed for a meaningful regression.
- The calculator fits a line y = mx + b using least squares: slope m = Σ(xi−x̄)(yi−ȳ) / Σ(xi−x̄)².
- Slope (m) tells you how much y changes per unit increase in x; Intercept (b) is the predicted y when x = 0.
- R-Squared (coefficient of determination) ranges from 0 to 1 — values closer to 1 indicate a stronger linear fit.
- The chart overlays your data points and the best-fit line so you can visually assess the fit quality.
- For non-linear relationships consider transforming variables (e.g., log y) before entering them.
Ad Placeholder
Related Calculators
Standard Deviation Calculator
Calculate the mean, median, standard deviation, and variance for a set of numbers. Supports both population and sample calculations.
Average Calculator
Calculate mean, median, mode, range, geometric mean, and harmonic mean of a set of numbers.
Probability Calculator
Calculate probability of single events, combined events (AND/OR), permutations, and combinations.
Ad Placeholder