Roof Rafter Length Calculator
Common rafter length from the run or building span and the pitch (x/12, degrees, percent or total rise), with the ridge board deduction, sloped overhang tail, plumb and seat cut angles, birdsmouth heel and height above plate, the board length to buy, rafter count and an optional hip or valley rafter.
How it works
pitch = 12 × tan(angle) = 12 × slope% = 12 × rise ÷ run · slope factor = √(12² + pitch²) ÷ 12 · line length = (run − ridge ÷ 2) × slope factor · tail = overhang × slope factor · heel = seat × pitch ÷ 12 · height above plate = depth ÷ cos(angle) − heel · board ≥ rafter + depth × pitch ÷ 12 · hip = (run − ridge ÷ 2) × √(2 + (pitch ÷ 12)²)
A common rafter is the sloped side of a right triangle. Its base is the run, the level distance from the outside of the wall to the center of the ridge, and its height is the rise. Roof framers skip the trigonometry with the slope factor, √(12² + pitch²) ÷ 12, which is how many feet of rafter you get per foot of run. Each rafter stops at the face of the ridge board, so half the ridge thickness comes off the run first. The overhang is measured level, so it also gets multiplied by the slope factor to give the sloped tail. Both plumb cuts are set at the roof angle from square, and the seat cut of the birdsmouth is at right angles to them. The seat sits on the wall plate. Its plumb heel is the seat length × pitch ÷ 12, and what is left above it is the height above plate, which sets where the top of the rafter lands on the wall. Keep the notch to about a third of the rafter depth. The board must be a little longer than the rafter because of the angled ends, about the rafter depth × pitch ÷ 12, and is rounded up to the next stock length. Hip and valley rafters run at 45° in plan, so their factor is √(2 + (pitch ÷ 12)²), and their pitch reads as x over 16.97.
Worked example
A 6/12 roof over a 12 ft run with a 1.5 in ridge board, 12 in overhang, 2×8 rafters and a 2×4 wall: slope factor = √(144 + 36) ÷ 12 = 1.1180. The run drops to 12 ft − 0.75 in = 11.9375 ft, so the line length is 11.9375 × 1.1180 = 13.35 ft and the tail is 1 × 1.1180 = 1.12 ft. The rafter is 14.46 ft, about 14 ft 5-9/16 in. Plumb cuts are 26.6° from square. The heel is 3.5 × 6 ÷ 12 = 1.75 in, the plumb depth is 7.25 ÷ 0.894 = 8.11 in and the height above plate is 6.36 in. Add 7.25 × 0.5 = 3.6 in for the angled ends to get 14.77 ft, so buy 16 ft 2×8s. At 16 in on center on a 40 ft building that is 31 rafters per side, 62 in all.
Sources: Inch Calculator — rafter length with beam (ridge) thickness and overhang · Omni Calculator — birdsmouth cut, heel depth and ridge board formulas · International Residential Code R802 — roof framing, ridge depth and rafter notching
Frequently asked questions
Is the run the same as the span?
No. For a gable roof the run is half the span, measured level from the outside of the wall to the center of the ridge. Choose Building span if you have the full width and the calculator halves it. The ridge board deduction is then applied separately.
Why subtract half the ridge board?
Rafters butt into the faces of the ridge board, not its center. Each one is shortened by half the ridge thickness measured level, which is 3/4 in for a 1-1/2 in board. Set the thickness to 0 if your run already ends at the ridge face or the rafters meet at a point.
Does the overhang change the rafter length?
Yes, along the slope. A 12 in level overhang becomes 12 × the slope factor of sloped tail, so it is always longer than 12 in on a pitched roof. The calculator adds it and also lists it on its own.
How deep should a birdsmouth be?
The seat usually matches the wall plate width: 3-1/2 in on 2×4 walls and 5-1/2 in on 2×6 walls. The usual rule of thumb is to remove no more than a third of the rafter depth. On steep roofs a full seat can cut too deep, and the calculator tells you the longest seat that stays within that limit.
What are the plumb and seat cut angles?
The plumb cuts at the ridge and the tail are at the roof angle from square, 26.6° for 6/12. On a speed square, pivot it and line up the pitch number on the common scale. The seat cut is at 90° to the plumb cut.
What is the slope factor for common pitches?
It is about 1.054 for 4/12, 1.118 for 6/12, 1.202 for 8/12 and 1.414 for 12/12. The table under the results gives your rafter length at each of these pitches.
Related calculators
Estimates only — add for waste and confirm every load-bearing decision against local building codes and a design professional.