Common Rafter Calculator
Span is measured across the outside of the wall plates.
Quick answer: rafter length = run × √(1 + (pitch ÷ 12)²), where run = (span − ridge thickness) ÷ 2. A 24 ft span at 6/12 with a 1.5 in ridge has an 11.94 ft run and a 13.35 ft rafter; adding a 12 in overhang gives 14 ft 5 9/16 in — buy 16 ft stock.
Find common rafter length for a gable roof from the building span and pitch, with the ridge board deducted and the overhang (tail) measured along the slope. Also shows total rise, roof angle, and the plumb cut setting.
Span is measured across the outside of the wall plates.
A common rafter is the hypotenuse of a right triangle. The horizontal leg is the run, the vertical leg is the rise, and pitch links the two: a 6/12 roof rises 6 in for every 12 in of run. Because pitch is a ratio, you never need the rise itself to find the rafter — the slope factor does the work.
A 28 ft wide garage gets an 8/12 roof with a 2× ridge (1.5 in) and a 16 in horizontal overhang.
Multiply any horizontal run by the slope factor to get length along the rafter. Last column: rafter length for 12 ft of run (a 24 ft span with no ridge board or overhang).
| Pitch | Angle (plumb cut setting) | Slope factor | Rafter per 12 ft run |
|---|---|---|---|
| 3/12 | 14.04° | 1.0308 | 12.37 ft |
| 4/12 | 18.43° | 1.0541 | 12.65 ft |
| 5/12 | 22.62° | 1.0833 | 13.00 ft |
| 6/12 | 26.57° | 1.1180 | 13.42 ft |
| 7/12 | 30.26° | 1.1577 | 13.89 ft |
| 8/12 | 33.69° | 1.2019 | 14.42 ft |
| 9/12 | 36.87° | 1.2500 | 15.00 ft |
| 10/12 | 39.81° | 1.3017 | 15.62 ft |
| 12/12 | 45.00° | 1.4142 | 16.97 ft |
Find the run (half the building span minus half the ridge board thickness), then multiply by the slope factor √(1 + (pitch ÷ 12)²). For a 24 ft span, 6/12 pitch, and 1.5 in ridge, the run is 11.94 ft and the rafter is 11.94 × 1.118 = 13.35 ft, about 13 ft 4 3/16 in before overhang.
Multiply the horizontal overhang by the same slope factor and add it to the rafter length. A 12 in horizontal overhang on a 6/12 roof adds 12 × 1.118 = 13.4 in along the rafter, bringing a 13.35 ft rafter to 14.46 ft, so you would buy 16 ft lumber.
The plumb cut is vertical when the rafter is installed, so on a speed square you pivot to the roof angle: 26.57° for a 6/12 pitch, 33.69° for 8/12, and 45° for 12/12. Speed squares also have a common-rafter scale where you simply set the pitch number.
The slope factor for a 6/12 roof is √(1 + 0.5²) = 1.118, meaning every foot of horizontal run equals 1.118 ft of rafter. Other common factors are 1.054 for 4/12, 1.202 for 8/12, 1.302 for 10/12, and 1.414 for 12/12.
Rafter size depends on span, spacing, lumber species and grade, roof dead load, snow load, and whether a ceiling is attached. This calculator gives length only. Use the rafter span tables in IRC Section R802.4.1 or an engineer's design, and confirm with your local building department.
How we built this calculator: results use the standard volume, area, and coverage formulas shown on this page, with typical U.S. material densities, bag yields, and waste factors that you can override. Written and checked by the YardsCalculator editorial team. Last reviewed: October 2026.