Cutting rafters is one of the most satisfying parts of framing a roof — and one of the most unforgiving. If your math is off by half an inch, the ridge board will be out of level, the fascia won't line up, and the sheathing will show the error.
You do not need a degree in trigonometry to get it right, but you do need to understand the basic geometry of a roof triangle. This guide walks through the exact steps to calculate rafter length, including how to account for the overhang and the width of your ridge board.
01. The Anatomy of a Rafter
Before calculating, let's define the parts of the triangle you are working with. Every roof rafter is the hypotenuse (the long side) of a right-angled triangle.
- Rise: The vertical distance from the top of the wall plate to the top of the ridge.
- Total Run: The horizontal distance from the outside edge of the wall plate to the center of the ridge board.
- Actual Run: The Total Run minus half the thickness of the ridge board.
- Overhang: The distance the rafter extends past the outside of the wall to create the eaves (soffit).
Because the roof is symmetrical, you typically calculate one side and use that same length for the other side.
02. The Math (Pythagorean Theorem)
If you know the Rise and the Run, you can calculate the Rafter Length using the Pythagorean theorem: a² + b² = c².
Example Calculation:
Let's say you have a 6:12 pitch and a Total Run of 12 feet.
- Rise = (12 ÷ 12) × 6 = 6 feet
- Run = 12 feet
- c² = (6²) + (12²)
- c² = 36 + 144 = 180
- c = √180 = 13.416 feet
So, the base rafter length (from the outer edge of the wall to the center of the ridge) is 13.416 feet, or about 13 feet 5 inches.
Note: This calculation assumes the rafter sits perfectly on the outer edge of the wall plate. In reality, we need to account for the overhang and the ridge board (covered in sections 4 and 5).