Roof Pitch Calculator
This roof pitch calculator turns a few measurements into the numbers you need for framing. Enter rise and run, or pitch and run, and it returns the pitch in rise:12, degrees, percent, and ratio. You’ll also get rafter length, overhang, roof area, rafter count, and a cost estimate. It’s built for contractors and DIYers who want accurate numbers before cutting lumber.
Roof pitch is the foundation of every rafter cut. Get it wrong and the whole roof is off. This calculator gives you the pitch in four formats at once, plus the rafter length and total material cost. It’s designed for framers, roofers, and anyone planning a roof replacement or new build. Whether you’re working from a set of plans or measuring an existing roof, the tool handles the math. Enter the numbers you have, pick a calculation mode, and read the results. No signup, no downloads, and it works on any device. The tool runs in your browser, so your measurements stay private. Use it to double-check a supplier’s quote or to plan a weekend project.
How to Use the Roof Pitch Calculator
Choose your unit system. Imperial uses feet and inches; metric uses meters and millimeters.
Pick a calculation mode. Rise & Run finds pitch. Pitch & Run finds rise. Pitch & Rise finds run. Building Span mode works from wall-to-wall dimensions.
Enter the measurements you have. Rise, run, or span. For span mode, add the ridge board thickness.
Set the overhang, building length, and rafter spacing. These drive rafter count and total lumber.
Choose your currency and enter the lumber cost per foot or meter.
Adjust the waste factor. 10% is typical. Bump it to 15% for complex roofs.
Read the summary. You’ll see pitch in four formats, rafter length, roof area, and total cost.
How the Roof Pitch Calculator Formula Works
The core relationship is simple: pitch is rise divided by run. Everything else builds off that ratio.
Formula: Pitch Ratio = Rise ÷ Run
Formula: Angle = atan(Pitch Ratio)
Formula: Slope Length = √(Rise² + Run²)
Formula: Total Rafter Length = Slope Length + (Overhang ÷ cos(Angle))
Formula: Roof Area = Plan Area × √(1 + Pitch Ratio²)
Formula: Rafters = 2 × (Ceiling(Building Length ÷ Spacing) + 1)
The tool converts pitch to four formats: rise:12, degrees, percent grade, and ratio (1:X). Rise:12 multiplies the ratio by 12. Degrees takes the arctangent. Percent multiplies the ratio by 100. Ratio inverts the pitch ratio.
Edge cases matter. If run is zero, the pitch is undefined. If pitch is zero, the roof is flat. The calculator rejects zero or negative inputs for run and pitch. For span mode, the run is half the span minus half the ridge thickness. If the ridge is thicker than the span, the calculation stops.
Worked Example
A gable roof with a 32-foot span, 1.5-inch ridge board, 7:12 pitch, 18-inch overhang, 50-foot building length, and 16-inch rafter spacing.
Step 1 — Run. (32 ft × 12 − 1.5 in) ÷ 2 = (384 − 1.5) ÷ 2 = 191.25 in = 15.94 ft.
Step 2 — Pitch ratio. 7 ÷ 12 = 0.5833.
Step 3 — Angle. atan(0.5833) = 30.26°.
Step 4 — Rise. 15.94 × 0.5833 = 9.30 ft.
Step 5 — Slope length. √(9.30² + 15.94²) = √(86.49 + 254.08) = √340.57 = 18.45 ft.
Step 6 — Overhang along slope. 1.5 ft ÷ cos(30.26°) = 1.5 ÷ 0.8632 = 1.74 ft.
Step 7 — Total rafter length. 18.45 + 1.74 = 20.19 ft.
Step 8 — Plan area. 50 × 15.94 × 2 = 1,594 ft².
Step 9 — Roof area. 1,594 × √(1 + 0.5833²) = 1,594 × 1.1577 = 1,845 ft². Squares = 18.45.
Step 10 — Rafter count. Spacing 16 in = 1.333 ft. Ceiling(50 ÷ 1.333) + 1 = 39 per side. Total = 78.
Step 11 — Total lumber. 20.19 × 78 = 1,575 ft. With 10% waste = 1,732 ft.
Step 12 — Cost at $0.85/ft, $2,500 labor. Lumber = $1,472. Total = $3,972. Cost per rafter = $50.93.
Interpretation: The roof has a 7:12 pitch (30.26°). Each rafter is 20.19 feet. You need 78 rafters and 1,732 feet of lumber with waste. Material and labor land around $3,972.