Rafter Length Calculator (Common Rafters)

For a gable roof with common rafters meeting at a ridge board. Enter the building span (outside of wall to outside of wall) and the pitch; the tool takes half the ridge thickness off the run, adds the overhang, and gives the length along the rafter, the cut angles and the lumber length to buy.

Important: Rafter size, spacing and connections are structural. Use the span tables for your snow and dead loads, follow your approved plans, and use fall protection when setting rafters.

Results update as you type.

Measure across the building from the outside face of one wall plate to the other.

/12

A 6/12 roof rises 6 in for every 12 in of level run (26.57°).

Horizontal distance from the outside of the wall to the tail cut. 0 for no overhang.

A 2× ridge is 1.5 in. Enter 0 if rafters meet tip to tip.

Size comes from span tables for your snow and dead load. This tool does not size rafters.

Loading animation…

Watch it explained

A step-by-step video using your numbers: what to enter, what the result means, and a “what if” example. On-screen instructions follow each step as it happens.

Loading animation…
0:00 / 0:00

What the animation shows

The animation and the step-by-step video above use your numbers. Here is the same walkthrough written out for the default example.

Finished frame of the rafter length calculator (common rafters) animation for the default example
The last frame of the animation for the default example.

What you enter

  • Building span (outside of walls): 24 ft. Measure across the building from the outside face of one wall plate to the other.
  • Roof pitch (rise per 12 of run): 6 /12. A 6/12 roof rises 6 in for every 12 in of level run (26.57°).
  • Overhang (level, past the wall): 12 in. Horizontal distance from the outside of the wall to the tail cut. 0 for no overhang.
  • Ridge board thickness: 1.5 in. A 2× ridge is 1.5 in. Enter 0 if rafters meet tip to tip.
  • Rafter size: 2×8 (7.25 in). Size comes from span tables for your snow and dead load. This tool does not size rafters.
  • Building length (along the ridge): 40 ft.
  • Rafter spacing (on center): 16 in.

What happens, step by step

  1. Half the span less half the ridge: the run is 11 ft 11-1/4 in.
  2. At 6/12 the roof rises 5 ft 11-5/8 in over that run.
  3. Along the slope: 13 ft 4-3/16 in to the wall, plus 1 ft 1-7/16 in of tail.
  4. Cut plumb at 26.57°; the birdsmouth heel is 1-3/4 in deep.
  5. Rafters repeat every 16 in on both sides: 62 rafters.

The answer: rafter length (with overhang) is 14.46 ft.

How it’s calculated

  • Run = span ÷ 2 − ridge thickness ÷ 2
  • Slope factor = √(1 + (pitch ÷ 12)²)
  • Line length (ridge to wall) = run × slope factor
  • Tail = overhang × slope factor; rafter length = line length + tail
  • Plumb cut angle = arctan(pitch ÷ 12); seat cut is square to the plumb cut
  • Heel height = seat width × pitch ÷ 12; height above plate = rafter depth ÷ cos(angle) − heel
  • Lumber = rafter length + depth × pitch ÷ 12, rounded up to a stock length
  • Rafters = 2 × (building length ÷ spacing, rounded up, + 1)

Worked example

24 ft span, 6/12 pitch, 12 in overhang, 1.5 in ridge, 2×8 rafters on 2×4 walls, 40 ft building at 16 in on center.

Inputs

Building span (outside of walls)
24 ft
Roof pitch (rise per 12 of run)
6 /12
Overhang (level, past the wall)
12 in
Ridge board thickness
1.5 in
Rafter size
2×8 (7.25 in)
Wall plate width (seat cut)
2×4 wall (3.5 in)
Building length (along the ridge)
40 ft
Rafter spacing (on center)
16 in

Results

Rafter length (with overhang)
14.46 ft
In feet and inches
14 ft 5-9/16 in
Ridge to wall (line length)
13.35 ft
Overhang tail
1.12 ft
Lumber to buy
16 ft 2×8
Plumb cut angle (off square)
26.57 °
Birdsmouth heel (plumb) height
1.75 in
Height above plate
6.36 in
Roof rise (top of wall to ridge)
6 ft
Ridge board depth
At least 8-1/8 in deep (2×10 or larger)
Rafters (both sides)
62 rafters

Load this example into the calculator

Assumptions and limits

  • Common rafters on a symmetrical gable roof, framed to a ridge board.
  • Lengths are measured along the rafter between plumb lines, so they hold for the top edge or any line parallel to it.
  • The overhang is level distance from the outside of the wall to a plumb tail cut.
  • Gable-end (rake) overhangs, fly rafters and collar ties are not counted.

Sources: IRC R802.3 (ridge board at least as deep as the rafter cut end) and R802.6 (minimum 1-1/2 in bearing on wood); rafter sizes come from IRC span tables R802.4.1.

Verify the result against the applicable local code, adopted code edition, manufacturer instructions and project requirements. See our methodology.

Questions

How long is a rafter for a 24 ft span at 6/12?

The run is 12 ft less 3/4 in for half the ridge, 11.94 ft. Times the 6/12 slope factor of 1.118 that is 13.35 ft to the wall, or 14.46 ft (14 ft 5-9/16 in) with a 12 in overhang. Buy 16 ft boards.

Why subtract half the ridge board?

The span is measured to the center of the building, but each rafter stops at the face of the ridge board. Half the ridge thickness (3/4 in for a 2× ridge) comes off the level run of each rafter.

How deep should a birdsmouth be?

A common rule is no more than 1/3 of the rafter depth, while keeping at least 1-1/2 in of seat bearing (IRC R802.6). On a 2×4 wall at 6/12 the heel is 1-3/4 in and the notch is about 1-9/16 in deep on a 2×8.

What angle is the plumb cut?

The plumb cut is the roof angle off square: 26.57° for 6/12, 33.69° for 8/12 and 45° for 12/12. On a speed square, pivot to the pitch number on the common scale.