Slope Calculator
Find the slope between two points, or calculate slope as a ratio, percentage, angle, or roof pitch from rise and run.
Assumptions used in this calculation
- Consistent units: Rise and run must be entered in the same unit since slope is a unitless ratio between them.
About this calculator
Slope gets expressed in wildly different conventions depending on the context, a road sign uses percentage grade, a roof uses "x-in-12" pitch notation, and a math class asks for slope between two coordinates, and converting between them by hand requires an arctangent that most people can't compute without a calculator anyway. This tool supports two modes: given two points (x1,y1) and (x2,y2), it computes rise, run, the slope, its classification (positive, negative, zero or undefined for a vertical line), the line's equation in y = mx + b form, and a labeled diagram, with every step shown; given a rise and run directly, it expresses the ratio as a percentage grade, an angle in degrees, and roof pitch notation (ratio × 12, shown as "x-in-12", the standard US roofing convention). Rise and run must be entered in the same unit, since slope itself is a unitless ratio between them. That covers coordinate geometry, ramps, roofs, and general grade calculations from one tool instead of needing separate calculators or manual trig for each convention.
Worked example
Two points: (1, 2) and (5, 10)
Result: Slope = 2, line equation y = 2x + 0
How to use this
- 1Enter the rise, the vertical change between two points.
- 2Enter the run, the horizontal change between the same two points.
- 3Read the slope as a ratio, a percentage, an angle in degrees, and a roofing pitch (x-in-12).
Troubleshooting
I only have two coordinate points, not a rise and run.
Subtract the y-coordinates for rise and the x-coordinates for run (rise = y2 − y1, run = x2 − x1), then enter those two differences.
Which output should I use for a roof pitch?
Use the "x-in-12" figure, roofing conventionally expresses pitch as inches of rise per 12 inches of horizontal run, not as a percentage or angle.
Was this helpful?

