How to use the rafter length calculator
- Enter the building span. Measure from the outside of one bearing wall to the outside of the other.
- Enter the pitch as rise per 12 (for example 6 for a 6/12 roof), or switch to Angle if you have it in degrees. Not sure? Use the roof pitch calculator first.
- Add the overhang and ridge board. The overhang is the level distance the eaves project past the wall. A 2× ridge board is 1½″ thick.
- Read the rafter length from the top plumb cut at the ridge to the tail, plus the stock length to buy and how many rafters to order.
Rafter length formula
A common rafter is the hypotenuse of a right triangle. Its horizontal leg is the run, half the span minus half the ridge board. Its vertical leg is the rise. Multiplying the run by the pitch's rafter multiplier gives the sloped length.
Multiplier = √(1 + (Pitch ÷ 12)²)
Rafter (ridge to wall) = Run × Multiplier
Tail = Overhang × Multiplier
Total rafter length = (Run + Overhang) × Multiplier
The plumb cut at the ridge and tail is cut at the roof angle measured from the edge of the board (the angle you set on a speed square is the pitch). The seat cut of the bird's mouth is 90° minus the roof angle, so it sits level on the wall plate.
Rafter count
Rafters per side = building length ÷ spacing, rounded up, plus one for the end. Double it for a gable roof with two sides.
Rafter length chart
Common rafter line length from the wall to the ridge centre, without overhang or ridge deduction. Add the tail length for your overhang.
| Span | 4/12 | 6/12 | 8/12 | 10/12 | 12/12 |
|---|---|---|---|---|---|
| 20 ft | 10′ 6½″ | 11′ 2⅛″ | 12′ ¼″ | 13′ ¼″ | 14′ 1¾″ |
| 24 ft | 12′ 7¾″ | 13′ 5″ | 14′ 5⅛″ | 15′ 7½″ | 16′ 11⅝″ |
| 28 ft | 14′ 9⅛″ | 15′ 7⅞″ | 16′ 9⅞″ | 18′ 2⅝″ | 19′ 9⅝″ |
| 32 ft | 16′ 10⅜″ | 17′ 10⅝″ | 19′ 2¾″ | 20′ 9⅞″ | 22′ 7½″ |
| 36 ft | 18′ 11⅝″ | 20′ 1½″ | 21′ 7⅝″ | 23′ 5⅛″ | 25′ 5½″ |
Worked examples
Run = 144″ − 0.75″ = 143.25″. Multiplier for 6/12 = 1.118. Rafter to the wall = 160.2″, tail for a 12″ overhang = 13.4″. Total = 14′ 5⅝″, so buy 16 ft boards. Total rise = 6 ft.
Run = 72″ − 0.75″ = 71.25″. Multiplier for 4/12 = 1.054. With a 6″ overhang: (71.25 + 6) × 1.054 = 6′ 9⅜″. An 8 ft board leaves room for the cuts.
Frequently asked questions
How do I know what lumber length to buy?
Round the total rafter length up to the next stock length. Dimensional lumber is sold in 2 ft steps from 8 ft to 20 ft at most yards (some stock 22–24 ft). Leave at least a couple of inches for the plumb cuts at each end.
What size rafter do I need?
That depends on span, spacing, wood species, roof load and snow load. Use the rafter span tables in your local code (IRC Table R802.4.1) or ask your lumberyard or engineer. This calculator gives length, not structural size.
What is a bird's mouth cut?
It's the notch where the rafter sits on the wall's top plate: a level seat cut and a vertical heel cut. Don't cut deeper than about a third of the rafter's depth, or the rafter loses strength.
Does the ridge board change the rafter length?
Yes. Each rafter stops at the face of the ridge board, so you subtract half its thickness from the run. For a 1½″ ridge, that's ¾″ of run per side.