The mathematical formula for slope is rise over run — the change in vertical position divided by the change in horizontal position. The same formula applies to roof pitch, lines on a coordinate plane, road grades, and ramps. Only the units and acceptable values change.
Derivation from two points
Given any two points (x₁, y₁) and (x₂, y₂), the slope of the line connecting them is m = (y₂ − y₁) ÷ (x₂ − x₁). The numerator is "rise" (the change in y); the denominator is "run" (the change in x).
In roofing language, x is horizontal distance along the ground and y is vertical height. So if a rafter starts at (0, 0) at the wall plate and ends at (12, 4) at the peak, the slope is (4 − 0) ÷ (12 − 0) = 4/12.
Three equivalent forms
The same slope can be expressed three ways. As a ratio: 4/12 or 1/3. As a percentage: 33.3% (the ratio multiplied by 100). As an angle in degrees: 18.43° (the arctangent of the ratio, converted from radians).
Each form has its native context. Builders use ratios for roof pitch. Civil engineers use percentages for road grades. Trigonometry and physics use degrees or radians.
Real-world applications
Roof pitch (rise per 12 of run, residential U.S. convention). Road grade (rise per 100 of run, expressed as a percent). Wheelchair ramp (ADA limits at 1:12, or 8.33%). Drainage on a flat surface (1/4 inch per foot, or about 2%). Stairs (rise/run combined to determine step ergonomics).
In every case the underlying math is the same; only the conventional way of expressing it differs.
Need to run the numbers?Use the free roof pitch calculator on the home page to convert pitch to angle, calculate rafter length, or estimate roof area in any unit.