Rafter Calculator

Enter span, pitch and overhang to get the rafter length, the cut angles, the birdsmouth and the board to buy, drawn to scale.

Units
Roof
Building span
ft
in

Outside of wall to outside of wall.

in 12

Inches of rise per 12 in of run. Not sure? Use the roof pitch calculator.

in

Measured level from the outside of the wall to the tail cut.

Ridge board
Building length
ft
in

To count rafters.

Spacing

Rafter length, tail to ridge cut

14 ft 5 ⁹⁄₁₆ in

Line length to the ridge board 13 ft 4 ³⁄₁₆ in plus a 1 ft 1 ⁷⁄₁₆ in tail. Buy 16 ft 2×8 boards.
Plumb cut angle
26.6°
Seat cut angle
63.4°
Seat cut
3 ½ in
Heel (birdsmouth depth)
1 ¾ in
Height above plate
6 ⅜ in
Rafters, both sides
62
14 ft 5 ⁹⁄₁₆ in overall13 ft 4 ³⁄₁₆ in lineplumb cut 26.6°

Swipe sideways to see the whole drawing.

wall plateseat 3 ½ inheel 1 ¾ inHAP 6 ⅜ in

Swipe sideways to see the whole drawing.

Code check

  • Bearing on the plate 3 ½ in

    1½ in min, IRC R802.6

  • Birdsmouth notch, square to the edge 1 ⁹⁄₁₆ in

    1 ¹³⁄₁₆ in max (¼ of depth), IRC R802.7.1

  • Ridge board depth 8 ⅛ in plumb cut

    ridge at least as deep, IRC R802.3

The math
  1. Run

    24 ft ÷ 2 − 1 ½ in ÷ 2 (half the ridge) = 11 ft 11 ¼ in

  2. Pitch factor

    √(1 + (6 ÷ 12)²) = 1.118

  3. Line length

    11 ft 11 ¼ in × 1.118 = 13 ft 4 ³⁄₁₆ in

  4. Tail

    12 in × 1.118 = 1 ft 1 ⁷⁄₁₆ in

  5. Birdsmouth

    seat 3 ½ in × tan 26.6° = heel 1 ¾ in; 7 ¼ in ÷ cos 26.6° − heel = HAP 6 ⅜ in

  6. Rafters

    40 ft ÷ 16 in + 1, × 2 sides = 62 rafters

Material list

Gable roof, 24 ft span at 6/12, 12 in overhang, 2×8 rafters.

QuantityItem
62boards

2×8 × 16 ft rafters

cut to 14 ft 5 ⁹⁄₁₆ in, 16 in on center

3boards

Ridge board, 2×10 × 16 ft

42 ft of ridge, at least 8 ⅛ in deep

Is the 2×8 deep enough for this span and your snow load? Size it with the beam span calculator.

A common rafter for a 24 ft wide building at 6/12, with a 12 in overhang and a 1½ in ridge board, is 13 ft 4 3/16 in from the outside of the wall to the ridge board, plus a 1 ft 1 7/16 in tail: 14 ft 5 9/16 in overall, cut from a 16 ft board. The plumb cuts are laid out at 26.6° and the birdsmouth on a 2×4 wall is a 3½ in seat with a 1¾ in heel, leaving 6⅜ in of a 2×8 above the plate.

How rafter length is calculated

A rafter is the sloped side of a right triangle. Its run is the level distance it covers: half the span on a gable roof, less half the thickness of the ridge board because the rafter stops at the ridge's face, not its center. Multiply the run by the pitch multiplier to get the line length. The tail is the level overhang times the same multiplier.

Line length = (span ÷ 2 − ridge thickness ÷ 2) × √(1 + (pitch ÷ 12)²)  ·  Tail = overhang × the same factor

Worked example with the defaults: 24 ft ÷ 2 − ¾ in = 11 ft 11¼ in of run. At 6/12 the factor is 1.118, so the line length is 13 ft 4 3/16 in. The 12 in overhang adds 1 ft 1 7/16 in of tail, for 14 ft 5 9/16 in overall. Lengths are measured along the top edge between the plumb lines; any line parallel to the edge gives the same length between the same two plumb cuts. Round up to the next stock length: here a 16 ft board.

Plumb cut and seat cut angles

The plumb cut (at the ridge and usually at the tail) is vertical when the rafter is in place. On the board it sits at the pitch angle from square: 26.6° for 6/12. Set a speed square to the pitch, or to the angle, and mark along it. The seat cut is level when installed, 90° minus the pitch angle on the board: 63.4° here.

Rafter with birdsmouth: seat, heel and HAP

The birdsmouth is the notch that lets the rafter sit on the wall plate. It has two cuts: the level seat that bears on the plate, and the plumb heel at the outside face of the wall.

  • The seat should bear at least 1½ in on wood (IRC R802.6).
  • The IRC limits notches at the ends of rafters to one quarter of the rafter depth (R802.7.1, which points to R502.8.1). Measured square to the edge, the notch is the seat length times the sine of the pitch angle.
  • The height above plate (HAP) is what is left of the rafter measured plumb over the wall: the plumb depth of the rafter minus the heel.

For the default 2×8 (7¼ in deep) on a 3½ in plate at 6/12: heel = 3½ × tan 26.6° = 1¾ in, notch = 1 9/16 in square to the edge (the limit is 1 13/16 in), and HAP = 7¼ ÷ cos 26.6° − 1¾ = 6⅜ in. Keep the HAP the same on every rafter so the roof plane stays flat.

The Journal of Light Construction points out the catch on steep roofs: a 2×12 at 12/12 can only take about a 4 in seat before the notch passes a quarter of its depth, less than the width of a 2×6 wall. The calculator cuts the seat back when that happens and tells you. You will see the "one third of the depth" rule on some sites; the IRC text limits end notches to one quarter, so that is what the code check uses.

Shed roof and lean-to rafters

A shed roof rafter runs from wall to wall with no ridge, so its run is the whole span and it gets a birdsmouth on both walls and a tail at each end. A 10 ft span at 3/12 with 12 in overhangs is (10 + 1 + 1) ft × 1.0308 = 12 ft 4 7/16 in. On a 2×4 wall the high wall's plate ends up 29⅛ in above the low one when both seats are cut the same.

Rafter count and ridge board

At 16 in on center, a 40 ft building needs 40 ft ÷ 16 in + 1 = 31 rafters a side, 62 in all. The ridge board must be at least 1 in nominal and no shallower than the cut end of the rafter (R802.3). The plumb cut of a 2×8 at 6/12 is 8⅛ in, deeper than another 2×8, so the list calls for a 2×10 ridge. If ceiling joists or rafter ties don't tie the walls together, the ridge has to be a designed beam instead.

What to check next

Rafter spans depend on species, grade, spacing and snow load; the beam span calculator sizes framing members, and the IRC rafter span tables (R802.4.1) are the reference your inspector will use. Check the pitch first with the roof pitch calculator, compare with engineered trusses in the roof truss calculator, and once the framing is up, order sheathing and shingles with the roofing calculator. The framing calculator handles the walls the rafters sit on.