Slope Calculator

m = Δy/Δx, or rise ÷ run. Click any i for detail.

Jump to result

Line

Start from
i
Mode

Two points, or rise and run.

x₁
i
x1

First point x.

y₁
i
y1

First point y.

x₂
i
x2

Second point x.

y₂
i
y2

Second point y.

Rise
i
Rise

Vertical change.

Run
i
Run

Horizontal change. 0 is vertical.

How to use this calculator

  1. Choose two points (x₁,y₁) and (x₂,y₂) or rise and run.
  2. Enter the numbers.
  3. Read slope m and angle from the +x axis.
  4. Watch for vertical lines where run is zero.

Results explained

Slope is rise over run. Positive m goes up to the right. Roof pitch uses inches per 12 inches horizontal, not coordinate slope.

Quick reference: slope

From (0,1) to (4,4), rise 3 over run 4 gives m = 0.75.

ItemDetail
Two pointsm = (y₂−y₁)/(x₂−x₁)
Rise/runm = rise/run
Horizontalm = 0
Verticalundefined (run = 0)

This returns m; it does not draw the line.

How the estimate is built

m = (y₂ − y₁) / (x₂ − x₁); angle = atan(m) in degrees.

Example scenario

(0,1) to (4,4) → 0.75 (3/4).

FAQ

How is roof pitch different?

Pitch is rise per 12 in horizontal. Convert pitch to slope if you need m.

Can slope be negative?

Yes. A line falling left-to-right has negative m.

What if x values match?

Run is zero, slope is undefined (vertical line).