How to calculate rafter length
A common rafter's length comes from four numbers: building width, pitch, ridge thickness and overhang. The steps:
- Run. Half the span (outside of wall to outside of wall), less half the ridge board: 144 − 0.75 = 143-1/4 in.
- Line length. Run × rafter factor. At 6/12 the factor is 1.118, so 143.25 × 1.1180 = 13′ 4-3/16″ along the top edge from the ridge plumb cut to the wall line.
- Tail. The level overhang × the same factor: 12 in × 1.1180 = 13-7/16″.
- Board. Line + tail = 14′ 5-9/16″, plus 3-5/8″ for the long point of the tail plumb cut. Buy the next even length: a 16 ft 2x8.
The IRC measures rafter spans on the horizontal projection, the same level run used here[1]. The pitch itself comes from the roof pitch calculator.
The birdsmouth cut
The birdsmouth is the notch that seats the rafter on the wall plate: a level seat cut and a plumb heel cut. With a 3-1/2 in seat on a 6/12 roof the heel is 3.5 × 6 ÷ 12 = 1-3/4 in high, and the notch measured square to the rafter is 1-9/16″, 22% of a 2x8.
- The IRC limits notches at the ends of sawn joists and rafters to 1/4 of the member depth (R802.7.1, by reference to R502.8.1)[1]. The code does not name the birdsmouth, so treating the seat as an end notch is the cautious reading.
- Rafter tails that cantilever past the wall may be notched if at least 3-1/2 in of depth remains and the overhang is 24 in or less (R802.7.1.1)[1].
- Height above plate (HAP) is the depth of wood left over the outside wall line. Keep it the same on every rafter and the roof plane stays flat.
Ridge, collar ties and rafter ties
| Item | Rule | Section |
|---|---|---|
| Ridge board[1] | at least 1 in nominal, and as deep as the cut end of the rafter | R802.3 |
| Rafters at the ridge | opposite rafters offset no more than 1-1/2 in | R802.4.2 |
| Collar ties | upper third of the attic, at least 1x4, at most 4 ft apart | R802.4.6 |
| Ceiling joists / rafter ties | in the bottom third of the rafter height; ties at least 2x4 at 24 in | R802.5.2 |
| Bearing | at least 1-1/2 in on wood or metal, 3 in on masonry | R802.6 |
Rafter size and span
Rafter size comes from span tables, not from this calculator. IRC Tables R802.4.1(1) to (8) give spans by species, grade, spacing, snow or roof live load and whether a ceiling is attached[1]. For other loads, the American Wood Council's span tables and free span calculator use the same method[2][3]. Rafter depths here are the dressed sizes in PS 20: a 2x8 is 7-1/4 in[4]. For roofs with hips, see the hip roof calculator; for a single slope, the shed roof pitch calculator.
Common rafter mistakes
Most short rafters come from the run, the ridge or the overhang:
- Full span as the run. Each common rafter runs half the span.
- No ridge deduction. Take half the ridge thickness off the run, measured level.
- Overhang along the rafter. Enter the overhang level, as it shows on the plans.
- Birdsmouth too deep. End notches in sawn rafters are limited to 1/4 of the depth (2021 IRC R802.7.1)[1].
- Ridge too shallow. The ridge must be at least as deep as the cut end of the rafter (R802.3)[1].
- Boards too short. Add the long point of the tail plumb cut; the board-to-buy figure includes it.
Frequently asked questions
How does a rafter length calculator work?
It takes half the span less half the ridge as the run, multiplies it by the rafter factor for the pitch, then adds the overhang times the same factor and the long point of the tail cut.
How do you calculate rafter length?
Multiply the level run (half the span minus half the ridge) by √(1 + (pitch ÷ 12)²), then add the overhang times the same factor.
How long is a rafter for a 24 ft building?
At 6/12 with a 1-1/2 in ridge and a 12 in overhang, about 14′ 5-9/16″. At 4/12 it is 13′ 7-5/8″.
How deep can a birdsmouth cut be?
The IRC limits end notches in sawn rafters to 1/4 of the depth. On a 2x8 that is 1-13/16 in measured square to the rafter.
What is the rafter factor for a 4/12 roof?
1.0541: each foot of level run needs 12.65 in of rafter.
What size rafter do I need for a 12 ft span?
It depends on species, grade, spacing, snow load and whether a ceiling is attached. Read the span in IRC Tables R802.4.1(1) to (8) or the American Wood Council span calculator, measured on the horizontal projection.
What is the difference between a rafter and a truss?
A rafter is a single sloped member cut on site and paired with a ridge and ceiling joists or ties. A truss is a factory-built triangle of chords and webs designed by an engineer for its span and loads.
How far apart are rafters?
Usually 16 or 24 in on centre; the IRC span tables list 12, 16, 19.2 and 24 in spacings. Closer spacing allows a longer span for the same size.
How many rafters do I need?
Building length ÷ spacing, rounded up, plus one, for each side of a gable. A 40 ft building at 16 in centres takes 31 pairs, 62 rafters.
How does a birdsmouth cut calculator work?
It takes the seat length (the wall width) and the pitch: the heel cut is seat × pitch ÷ 12, and the height above plate is the rafter depth measured plumb minus the heel. Keep the notch within 1/4 of the rafter depth.