Slope Calculator
m = Δy/Δx, or rise ÷ run. Click any i for detail.
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
- Choose two points (x₁,y₁) and (x₂,y₂) or rise and run.
- Enter the numbers.
- Read slope m and angle from the +x axis.
- 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.
| Item | Detail |
|---|---|
| Two points | m = (y₂−y₁)/(x₂−x₁) |
| Rise/run | m = rise/run |
| Horizontal | m = 0 |
| Vertical | undefined (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).