Rafter calculator
Enter the roof's pitch, the building's width and the overhang, then the rafter lumber, its spacing and your snow load. You get the common rafter's length and the board to cut it from, the plumb and seat cut angles, a birdsmouth held within the code's notch limit, the ridge board's least depth, and the smallest rafter the International Residential Code's span tables allow.
Common rafter length
14 ft 5 9/16 in
On the measuring line: 13 ft 5 in line length, less 13/16 in for the ridge, plus 13 7/16 in of tail. Cut from a 16 ft 2x6.
- Rafter
- 2x6 at 16 in
- Allowed span
- 14 ft 7 in
- Plumb cut
- 63.4° to the edge
- Seat cut
- 26.6° to the edge
- Birdsmouth seat
- 3 1/16 in
- Heel (plumb) cut
- 1 9/16 in
- Ridge board, at least
- 1x8 or 2x8
- Rafters
- Add a ridge length
One source: IRC 2024 and 2021, the model building code
Table R802.4.1(1) (Roof live load = 20 psf, ceiling not attached to rafters, L/Δ = 180): a Douglas Fir-Larch No. 2 2x6 at 16 in, 10 psf dead load, spans 14 ft 7 in. This rafter spans 11 ft 11 1/4 in level.
Framing square: 12 on the body, 6 on the tongue; mark the plumb cut along the tongue and the seat along the body. Speed square: pivot to 6 on the common scale.
- OK: Seat notch 1 3/8 in deep, within a quarter of the 2x6’s depth (1 3/8 in; IRC R802.7.1 and R502.8.1): the seat is held to 3 1/16 in, shorter than the 3 1/2 in plate, and still bears more than 1 1/2 in (R802.6). Height above the plate 4 5/8 in.
- OK: Overhang 12 in: within R802.7.1.1’s 24 in for a notched tail, with 4 1/8 in of rafter left over the plate.
The IRC tables cover sawn 2x4 to 2x12 rafters in four species groups, a 20 psf roof live load or up to 70 psf of ground snow, and a 10 or 20 psf dead load. Heavier loads, other species, wind uplift and trusses need a design. Check your local building code: your building department sets the snow load and the edition in force.
Why: A 2x6 rafter, 14 ft 5 9/16 in long on the measuring line, within Table R802.4.1(1).
Roof pitch
6/12
- Angle
- 26.57°
- Slope (grade)
- 50 %
- Rafter per foot of run
- 13.416 in
- Pitch as rise ÷ span
- 1/4
Geometry, exact: angle = atan(6 ÷ 12), slope = 6 ÷ 12 × 100, rafter per foot = √(12² + 6²).
Half the roof, seen from the gable end
The rafter in the accent colour from its tail to the ridge; dashed, the run (12 ft) across to the ridge’s centre and the rise (6 ft) up to it; the wall at the left.
IRC rafter spans for this lumber
| Spacing | 2x4 | 2x6 | 2x8 | 2x10 | 2x12 |
|---|---|---|---|---|---|
| 12 in | 10 ft 10 in | 16 ft 10 in | 21 ft 4 in | 26 ft | over 26 ft |
| 16 in | 9 ft 10 in | 14 ft 7 in (chosen) | 18 ft 5 in | 22 ft 6 in | 26 ft |
| 19.2 in | 9 ft 1 in | 13 ft 3 in | 16 ft 10 in | 20 ft 7 in | 23 ft 10 in |
| 24 in | 8 ft 2 in | 11 ft 11 in | 15 ft 1 in | 18 ft 5 in | 21 ft 4 in |
“Over 26 ft” is the code’s Note b. A misprint is a cell the printed table gets wrong (it breaks the table’s own pattern), so it is not used.
Why these numbers?
The situation
A 6/12 roof over 24 ft, Douglas Fir-Larch No. 2 rafters 16 in on centre, 10 psf dead load.
From your input: the roof and its lumber
What that means
Every foot of run takes √(12² + 6²) = 13.42 in of rafter, so each inch of run is 1.118 in along the slope.
Arithmetic: exact by definition
So
Run 12 ft × 1.118 = 161 in, less 0.84 in for half the ridge, plus 13.42 in of tail = 173.57 in (14 ft 5 9/16 in).
Arithmetic: exact by definition
What that means
IRC Table R802.4.1(1) (Roof live load = 20 psf, ceiling not attached to rafters, L/Δ = 180): a 2x6 spans 14 ft 7 in, measured level (R802.4.1).
One source: International Code Council, the model building code , sources [1, 2]
So
The rafter spans 11 ft 11 1/4 in level, from the outside of the wall to the ridge’s face, within 14 ft 7 in.
Arithmetic: exact by definition
The number
A notch at the end of a rafter may take up to a quarter of its depth (R802.7.1 and R502.8.1): 1.375 in for a 2x6. The rafter keeps at least 1 1/2 in of bearing (R802.6), and the ridge board is at least 1 in nominal and as deep as the 6.15 in plumb cut (R802.3).
One source: International Code Council, the model building code , sources [1, 2]
The number
The IRC tables cover sawn 2x4 to 2x12 rafters in four species groups, a 20 psf roof live load or up to 70 psf of ground snow, and a 10 or 20 psf dead load. Heavier loads, other species, wind uplift and trusses need a design. Check your local building code: your building department sets the snow load and the edition in force.
From your input: where you build
Sources
- International Code Council, 2024 International Residential Code, Chapter 8: R802.3 Ridge, R802.4.1 and Tables R802.4.1(1)–(9) Rafter spans, R802.6 Bearing, R802.7 Notching; Chapter 5: R502.8.1 (free read-only text), read 2026-11-08
- International Code Council, 2021 International Residential Code, Chapter 8: Tables R802.4.1(1)–(9) Rafter spans (free read-only text), read 2026-11-08
How the rafter length is worked out
The run is half the building's width, outside of wall to outside of wall. Along the measuring line, which runs through the outside corner of the seat cut, the rafter is the run times √(12² + rise²) ÷ 12. Half the ridge board's thickness comes off at the top, measured level and then along the slope; the overhang, measured level from the wall, goes on at the tail the same way. Cut the ridge end plumb, step the length down the board, and cut the seat and tail. The board must be longer than the measuring-line length by the rafter's depth times the tangent of the roof angle, because the plumb cuts lean across it.
The birdsmouth
The IRC never names the birdsmouth. Section R802.7.1 sends rafter notches to R502.8.1, where a notch at the end of a member may take no more than a quarter of its depth, and R802.6 asks for at least 1 1/2 inches of bearing on wood. The seat cut is level; it notches the rafter by its length times the sine of the roof angle. Where a full seat on the wall plate would cut deeper than a quarter, the calculator shortens the seat to fit, to the 1/16 inch below. A 3 1/2 inch seat on a 2x6 at 6/12 notches 1.57 inches, more than a quarter of 5 1/2, so the seat becomes 3 1/16 inches. Where the rafter overhangs the wall, R802.7.1.1 permits notches on the tail when 3 1/2 inches of rafter remain and the tail is no longer than 24 inches. Rules of thumb that allow a third of the depth are looser than the code.
The allowed span
Tables R802.4.1(1) to (8) of the 2024 and 2021 IRC give the most a rafter may span, measured level, for Douglas Fir-Larch, Hem-Fir, Southern Pine and Spruce-Pine-Fir in four grades, 2x4 to 2x12, at 12, 16, 19.2 and 24 inches on centre. There is one table for each load and ceiling: a 20 psf roof live load where no snow load applies, or 30, 50 and 70 psf of ground snow, each with the ceiling not attached to the rafters (deflection limit L/180) or attached to them (L/240), and each for a 10 or 20 psf dead load. The calculator reads the table at or above your snow load. The span is counted from the outside of the wall to the ridge's face, which errs long. The tables assume the ceiling joists or rafter ties are at the wall top; higher ties shorten the span by Table R802.4.1(9), down to ties a third of the way to the ridge.
The printed tables have a few cells that break their own pattern, such as a span of 12 feet 12 inches or a 2x10 that spans less than a 2x8. The 2018, 2021 and 2024 editions print them the same way. Where two cells contradict, the calculator uses the shorter and refuses the longer, and it never uses a cell that cannot be a span:
- Table R802.4.1(1), 16 in, Douglas Fir-Larch #3, 2x8 at 20 psf: printed 12-12; 12 inches is not a feet-and-inches value.
- Table R802.4.1(2), 19.2 in, Douglas Fir-Larch #3, 2x10 at 20 psf: printed 13-7; it is longer than the same rafter’s 12-7 in Table R802.4.1(1), and an attached ceiling cannot span farther.
- Table R802.4.1(3), 16 in, Southern Pine SS, 2x10 at 20 psf: printed 1-11; it is shorter than the 2x8’s 18-5 beside it.
- Table R802.4.1(4), 19.2 in, Hem-Fir #1, 2x6 at 20 psf: printed 16-3; it is longer than the 2x8’s 13-0 beside it.
- Table R802.4.1(5), 19.2 in, Hem-Fir #1, 2x4 at 20 psf: printed 8-11; it is longer than the 2x6’s 8-8 beside it and the same rafter’s 6-5 at 10 psf.
- Table R802.4.1(5), 24 in, Hem-Fir #1, 2x4 at 20 psf: printed 8-4; it is longer than the 2x6’s 7-9 beside it and the same rafter’s 5-9 at 10 psf.
- Table R802.4.1(6), 16 in, Spruce-Pine-Fir SS, 2x10 at 20 psf: printed 16-8; it is longer than the same rafter’s 15-11 in Table R802.4.1(5), and an attached ceiling cannot span farther.
- Table R802.4.1(7), 24 in, Douglas Fir-Larch #3, 2x12 at 20 psf: printed 9-10; it is longer than the same rafter’s 9-7 at 10 psf dead load.
What the calculator will not do
It covers common rafters on a gable roof. Hips, valleys and jacks, trusses, I-joists and engineered lumber, ground snow over 70 psf, dead loads over 20 psf, spans past 26 feet and wind uplift connections all need their own tables or a design. Your building department sets the snow load and the code edition in force, so check your local building code before you cut.
Need the pitch first? The roof pitch calculator turns a rise and run, an angle or a slope into every form, with a pitch chart. The 2x6 actual size page shows why a 2x6 rafter is 5 1/2 inches deep.
Sources
- International Code Council, 2024 International Residential Code, Chapter 8: R802.3 Ridge, R802.4.1 and Tables R802.4.1(1)–(9) Rafter spans, R802.6 Bearing, R802.7 Notching; Chapter 5: R502.8.1 (free read-only text), read 2026-11-08
- International Code Council, 2021 International Residential Code, Chapter 8: Tables R802.4.1(1)–(9) Rafter spans (free read-only text), read 2026-11-08
- NIST, PS 20-25 American Softwood Lumber Standard, Table 3: minimum dressed sizes, read 2026-11-07