Skip to main content
Calcimator

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
  1. Enter matched (x, y) data point pairs — at least three points are needed for a meaningful regression.
  2. The calculator fits a line y = mx + b using least squares: slope m = Σ(xi−x̄)(yi−ȳ) / Σ(xi−x̄)².
  3. Slope (m) tells you how much y changes per unit increase in x; Intercept (b) is the predicted y when x = 0.
  4. R-Squared (coefficient of determination) ranges from 0 to 1 — values closer to 1 indicate a stronger linear fit.
  5. The chart overlays your data points and the best-fit line so you can visually assess the fit quality.
  6. For non-linear relationships consider transforming variables (e.g., log y) before entering them.
Ad Placeholder

Related Calculators

Ad Placeholder