Skip to content
Woodworking Math

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.

The pitch
The rafters

Over 70 psf of ground snow is past the IRC tables and needs a design.

Dead load
Ceiling
More: ridge, wall plate, raised ties, rafter count
Blank: at the wall top. Higher ties shorten the allowed span (IRC Table R802.4.1(9)).

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

Table R802.4.1(1), Douglas Fir-Larch No. 2, 10 psf dead load: the most each rafter may span, measured level
Spacing2x42x62x82x102x12
12 in10 ft 10 in16 ft 10 in21 ft 4 in26 ftover 26 ft
16 in9 ft 10 in14 ft 7 in (chosen)18 ft 5 in22 ft 6 in26 ft
19.2 in9 ft 1 in13 ft 3 in16 ft 10 in20 ft 7 in23 ft 10 in
24 in8 ft 2 in11 ft 11 in15 ft 1 in18 ft 5 in21 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?
  1. 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

  2. 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

  3. 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

  4. 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]

  5. 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

  6. 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]

  7. 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

How we source these numbers

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:

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

  1. 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
  2. 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
  3. NIST, PS 20-25 American Softwood Lumber Standard, Table 3: minimum dressed sizes, read 2026-11-07

How we source these numbers