How to Calculate Hypotenuse and Slope
Given the horizontal run (a) and vertical rise (b) of a right triangle, the hypotenuse is found using the Pythagorean theorem: c = √(a² + b²). The slope angle is arctan(b ÷ a), and the gradient is (b ÷ a) × 100%. These calculations are essential for stair design, roof pitching, ramp construction, and any sloped surface work.
Roof pitch in the US is typically expressed as X/12 — meaning X inches of rise for every 12 inches of run. A 4/12 pitch equals a 33.3% gradient and about 18.4°. A 12/12 pitch is exactly 45°. The pitch ratio in the results shows rise:run as 1:X, which you can relate to the X/12 convention by multiplying by 12.
For accessibility compliance, ADA ramps must not exceed 1:12 (8.3% gradient, 4.76°). Comfortable residential stairs fall around 35–38°. Roofs need a minimum pitch of about 2/12 (17%) for most shingles to drain properly without leaking. Use the gradient and angle values from this calculator to verify your design meets the required standards.
Frequently Asked Questions
The pitch ratio 1:X means that for every 1 unit of rise, there are X units of run. For example, 1:3 means the slope rises 1 foot for every 3 feet of horizontal distance, which equals a 33.3% gradient and about 18.4°.
No — as long as both the run and rise use the same unit, the results are correct. The hypotenuse will be in that same unit. Mixing feet with inches, for example, will give wrong results.
Not directly in this calculator, but you can use trigonometry: rise = run × tan(angle). For example, a 30° slope over 10 ft run gives a rise of 10 × tan(30°) ≈ 5.77 ft.