How rafter length is calculated
A common rafter is the sloped side of a right triangle. Its horizontal leg is the run (half the building width), its vertical leg is the rise, and the rafter is the hypotenuse. The pitch factor turns the run straight into rafter length.
Run = span ÷ 2 − ridge thickness ÷ 2
Pitch factor = √(1 + (rise ÷ 12)²)
Rafter length = (run + overhang) × pitch factor
Example: a 24 ft wide building with a 6/12 pitch, a 1.5 inch ridge board and a 12 inch overhang. The run is 12 ft minus 0.75 inch, or 11.94 ft. Add the 1 ft overhang for 12.94 ft, and multiply by 1.118 to get about 14.47 ft, or 14 ft 5 5/8 in. Buy 16 ft boards.
Pitch factors and angles
| Pitch | Angle | Pitch factor | Rise per foot of run |
|---|---|---|---|
| 4/12 | 18.43° | 1.054 | 4 in |
| 5/12 | 22.62° | 1.083 | 5 in |
| 6/12 | 26.57° | 1.118 | 6 in |
| 7/12 | 30.26° | 1.158 | 7 in |
| 8/12 | 33.69° | 1.202 | 8 in |
| 10/12 | 39.81° | 1.302 | 10 in |
| 12/12 | 45.00° | 1.414 | 12 in |
Before you cut
- This gives the line length along the top edge of the rafter. The birdsmouth seat cut and tail cut are laid out on the board from there.
- Cut one pattern rafter, test it at both ends of the building, and use it as a template once it fits.
- Rafter size and spacing depend on span, snow load and lumber grade. Check your local code's span tables or have the roof engineered.
Frequently asked questions
How do I calculate rafter length?
Take half the building width (the run), subtract half the ridge board thickness, and multiply by the pitch factor, which is the square root of 1 plus (rise ÷ 12) squared. Add the overhang, also multiplied by the pitch factor.
What is the pitch factor?
It's how much longer a sloped rafter is than its horizontal run. For a 6/12 roof the factor is 1.118, so every foot of run needs 1.118 feet of rafter. Steeper roofs have larger factors.
What angle do I cut the rafter at?
The plumb cut at the ridge and at the tail is set to the roof angle, which is the arctangent of rise ÷ 12. A 6/12 roof is 26.57 degrees. On a speed square, you can simply pivot to the 6 on the common scale.
Should I measure the overhang horizontally?
Yes. Overhang is usually specified as horizontal distance past the wall. The calculator converts it to length along the rafter using the same pitch factor.
What lumber length should I buy?
Buy the next standard length longer than the total rafter length, because you need room for the plumb cuts. The calculator suggests a length from the common sizes of 8 to 24 feet in 2-foot steps.