Slope Calculator

How to Find the Slope of a Line

The slope measures how steep a line is — the ratio of vertical change to horizontal change between two points.

The slope formula

m = (y₂ − y₁) ÷ (x₂ − x₁)

Finding the y-intercept

Once you have the slope (m), plug one point into y = mx + b to solve for b: b = y₁ − m × x₁

Step-by-step

  1. Enter the coordinates of both points.
  2. The calculator computes the slope m and the y-intercept b.
  3. The full line equation is shown as y = mx + b.

Worked example

Points (1, 2) and (3, 8): m = (8−2) ÷ (3−1) = 6 ÷ 2 = 3. b = 2 − 3×1 = −1. Line equation: y = 3x − 1.

Interpreting slope

Positive slope = line goes up left to right. Negative slope = line goes down. Slope of 0 = horizontal line. Undefined slope = vertical line (x₁ = x₂).