Linear Regression Calculator

Fit a simple linear regression line and return slope, intercept, and R².

Scratchpad (not saved)

What This Calculator Does

Fit a simple linear regression line and return slope, intercept, and R².

It combines x1, y1, x2, y2 to estimate Regression Equation, Slope, Intercept.

Formula & Method

Core equations: m=\frac{n\sum xy-\sum x\sum y}{n\sum x^2-(\sum x)^2},\quad b=\bar{y}-m\bar{x},\quad R^2=1-\frac{SS_{res}}{SS_{tot}}.

Notation used in the formulas: R = Regression Equation; x_{1} = x1; x_{2} = y1; x_{3} = x2; x_{4} = y2; x_{5} = x3; x_{6} = y3.

Method summary: inputs are normalized to consistent units, core equations are evaluated, then secondary values are derived and rounded for display.

Use this calculator for quick scenario analysis. Start with baseline values, change one driver at a time, and compare how sensitive the results are to each input shown above.

Inputs Used

  • x1: Used directly in the calculation.
  • y1: Used directly in the calculation.
  • x2: Used directly in the calculation.
  • y2: Used directly in the calculation.
  • x3: Used directly in the calculation.
  • y3: Used directly in the calculation.
  • x4: Used directly in the calculation.
  • y4: Used directly in the calculation.
  • x5: Used directly in the calculation.
  • y5: Used directly in the calculation.

Related Calculators