Slope calculator

Enter two points (x1, y1) and (x2, y2) — the calculator returns the slope m, y-intercept b, the slope-intercept equation y = mx + b, the angle of the line and the rise / run.

Point 1

Point 2

Slope-intercept equation
y = mx + b
Slope (m)
0
y-intercept (b)
0
Rise (Δy)
0
Run (Δx)
0
Angle (°)
0
Distance
0

Formulas used

  • Slope: m = (y₂ − y₁) / (x₂ − x₁)
  • y-intercept: b = y₁ − m·x₁
  • Equation: y = mx + b
  • Angle: θ = atan(m) × 180 / π
  • Distance: √((x₂ − x₁)² + (y₂ − y₁)²)

When x₁ = x₂ the slope is undefined — the line is vertical, equation x = constant.

FAQ

Positive vs negative slope?

Positive slope rises left-to-right; negative slope falls. A horizontal line has slope 0; a vertical line has undefined slope.

What is point-slope form?

y − y₁ = m(x − x₁). Useful when you have one point and the slope, not the y-intercept.