Rafter Calculator

Get rafter length with ridge deduction and overhang, the birdsmouth seat, heel and HAP, the plumb cut setting for your speed square, rafter count and the lumber to buy — with IRC notch checks. Don't know the slope yet? Find your pitch first with the roof pitch calculator.

Compare to your roof
Rafter size
Actual depth 7 1/4"
Wall plate width
Spacing
Total rafter length
14' 5 9/16"
line length + tail
Line length
13' 4 3/16"
plate to ridge
Tail
1' 1 7/16"
overhang × slope factor
Buy
16 ft 2x8
needs 14' 9 3/16"
Speed square
6
on the COMMON scale · plumb cut 26.6°
Rafter count
—
enter building length

Checks

  • Birdsmouth notchFail

    Notch 2 7/16" exceeds IRC limit 1 13/16" (1/4 of 7 1/4"). Max seat for this rafter: 4"

  • Seat bearingPass

    Seat 5 1/2" ≥ 1 1/2" bearing (IRC R802.6).

  • Rafter tailPass

    Overhang ≤ 24" and 4 13/16" left above the notch ≥ 3 1/2" (IRC R802.7.1.1).

  • Ridge board depthBorderline

    Ridge board must be at least as deep as the plumb cut (8 1/8"): use 2x10 or larger.

Many framers use a 1/3-depth rule of thumb; the IRC text limits end notches to 1/4.

Rafter size must be verified against IRC span tables (R802.5.1), local code and loads.

Rafter layout

Line 13' 4 3/16"Tail 1' 1 7/16"Total 14' 5 9/16"Deduct 3/4" level6 on COMMON (26.6°)Birdsmouth — see detail belowBuy: 16 ft 2x8Tail plumb cut

Birdsmouth at the wall

ABCDEFOverhang 1' 0" (max 24")
A
Seat 5 1/2"
B
Heel 2 3/4"
C
HAP 5 3/8"
D
Plumb depth 8 1/8"
E
Notch limit (d/4) 1 13/16"
F
Remaining above notch 4 13/16"

Marking sequence

  1. Set the speed square at 6 on the COMMON scale and mark the top plumb line.
  2. Measure 3/4" level from that line and mark the new plumb cut (ridge deduction).
  3. From the new plumb cut (step 2), measure 13' 4 3/16" along the top edge and mark the heel plumb line.
  4. On the heel plumb line measure 5 3/8" down from the top edge, then draw the level seat cut 5 1/2" long.
  5. From the heel plumb line measure 1' 1 7/16" along the top edge and mark the tail plumb cut.
  6. Cut one pattern rafter, test-fit it on the ridge and plate, then use it to mark the rest.
Notch exceeds the 1/4 depth limit.

How to measure for rafters

  • Span: from the outside of one wall's top plate to the outside of the opposite top plate.
  • Pitch: rise in 12 of run. Not sure? The roof pitch calculator covers 5 ways to measure it — rise & run, a level, span & height, a pitch you know or an angle.
  • Ridge board thickness: 1 1/2" for 2x lumber.
  • Wall plate width: 3 1/2" for 2x4 walls, 5 1/2" for 2x6 walls. The seat cut follows it by default.
  • Overhang: measured LEVEL from the outside face of the wall, not along the rafter.

How the rafter calculator works

Run and ridge deduction

run = span ÷ 2 − ridge ÷ 2 on a gable. The rafter stops at the ridge face, so half the ridge thickness comes off the run. On a shed roof the run is the full span and there is no ridge deduction.

Line length

line length = run × slope factor, where slope factor = √(1 + (pitch ÷ 12)²). This is the distance along the rafter from the heel plumb line to the ridge plumb cut.

Tail

tail = overhang × slope factor. Total rafter length = line length + tail.

Birdsmouth

heel = seat × pitch ÷ 12, plumb depth = d ÷ cos θ, HAP = plumb depth − heel, where d is the actual rafter depth and θ the roof angle.

Board length to buy

board = total + d × pitch ÷ 12 — the extra covers the plumb cut at the top — rounded up to the next stock length from 8 to 20 ft.

Birdsmouth limits (IRC)

  • End notch no deeper than 1/4 of the rafter depth (R802.7.1).
  • At least 1 1/2" of bearing on the plate (R802.6).
  • Where the rafter is notched and overhangs the wall, at least 3 1/2" of rafter must remain above the notch and the cantilever must not exceed 24" (R802.7.1.1).
  • No notching of engineered lumber — LVL, I-joists, trusses — unless the manufacturer allows it (R802.7.2).

Many framers use a 1/3 rule of thumb, but the IRC text says 1/4. On a 2x8 with a full 5 1/2" seat at 6/12 the notch is too deep, so shorten the seat. The ridge board must be at least 1" nominal and no shallower than the rafter's plumb cut.

Worked example

A 28 ft gable at 6/12 with 2x8 rafters, a 1 1/2" ridge, 2x6 walls, a 12" overhang, rafters 16" on center and a 40 ft building length.

  • Run: 168" − 3/4" = 167 1/4".
  • Line length 15' 7"; tail 1' 1 7/16"; total 16' 8 7/16".
  • A full 5 1/2" seat gives a 2 7/16" notch, over the 1 13/16" limit — use a 4" seat: heel 2", HAP 6 1/8".
  • Plumb cut 8 1/8", deeper than a 2x8, so the ridge must be a 2x10.
  • Ridge top sits 7' 5 3/4" above the plate.
  • 62 rafters (31 per side). Buy 18 ft 2x8. Speed square: 6 on COMMON.

Rafter size and spacing

This tool does geometry, not structural sizing. Check rafter size against the IRC span tables (R802.5.1) or the American Wood Council span calculator, along with your local code and loads. Spacing matters too: 16" on center needs more rafters than 24" but allows thinner sheathing and stiffer roofs; 24" on center cuts the count and needs sheathing rated for that span.

FAQ

How do you calculate rafter length?

Find the run (half the building span on a gable, minus half the ridge thickness), then multiply by the slope factor for your pitch, √(1 + (pitch ÷ 12)²). That gives the line length from the plate to the ridge. Add the overhang tail — level overhang × slope factor — for the total rafter length.

What is the ridge deduction and why half the ridge thickness?

The rafters from each side meet against the ridge board, not at the ridge centerline. Each rafter stops at the face of the ridge, which is half the ridge thickness from the centerline, so half the thickness (3/4" for a 1 1/2" ridge) is taken off the run of each rafter, measured level.

How deep can a birdsmouth cut be?

IRC R802.7.1 limits end notches to 1/4 of the rafter depth, measured square to the rafter edge. On a 2x8 (7 1/4" deep) that is 1 13/16". Many framers use a 1/3 rule of thumb, but the code text says 1/4, so shorten the seat cut if the notch comes out deeper.

What is HAP (height above plate)?

HAP is the depth of rafter left above the wall plate at the heel plumb line: plumb cut depth minus heel height. It sets how high the rafter sits above the plate and, with the run, where the top of the rafter lands at the ridge. Keep HAP the same on every rafter so the roof plane stays flat.

Why is overhang measured level and not along the rafter?

Eave overhang is specified and built as a horizontal distance from the wall face — it controls soffit width and gutter position. The calculator converts that level distance into the tail length along the rafter by multiplying by the slope factor.

How many rafters do I need?

Divide the building length by the spacing, round up and add one for each side: a 40 ft building at 16" on center needs 31 rafters per side, 62 on a gable. A shed roof has one side. Add extra for gable-end overhangs or doubled rafters at openings.

Can I cut a birdsmouth in an LVL or I-joist?

Not unless the manufacturer allows it. IRC R802.7.2 prohibits notching engineered lumber — LVL, I-joists and trusses — except as the manufacturer permits. Use the manufacturer's bearing details, such as beveled plates or metal connectors, instead.

Related calculators