Skip to content
CalcVerse

Slope Calculator

Find the slope of the line through two points, its equation in slope-intercept form, the distance between the points, the midpoint and the angle of inclination.

How to use this calculator

  1. Enter the coordinates of the first point (x₁, y₁).
  2. Enter the coordinates of the second point (x₂, y₂).
  3. Results update instantly.

Formula

Slope is rise over run. The y-intercept follows from substituting one point into y = mx + b.

m = (y₂ − y₁) / (x₂ − x₁)
b = y₁ − m x₁
d = √((x₂ − x₁)² + (y₂ − y₁)²)
θ = atan2(y₂ − y₁, x₂ − x₁)

Example

  1. Points (1, 2) and (4, 8).
  2. m = (8 − 2) / (4 − 1) = 2; b = 2 − 2 × 1 = 0.
  3. Equation: y = 2x; distance = √(9 + 36) ≈ 6.708.

Frequently asked questions

What does a negative slope mean?

The line goes down from left to right: y decreases as x increases.

What is the slope of a vertical line?

Undefined, because the run (x₂ − x₁) is zero. Its equation is x = constant.

How is slope expressed as a grade?

Multiply the slope by 100 to get a percentage grade. A slope of 0.05 is a 5% grade.