Rafter Length Calculator: gable roof framing

How it's calculated. Rafter length = (run − half the ridge board + eave overhang) × √(1 + (pitch/12)²). The run is half the building width.
24' wide, 6/12, 1½" ridge, 12" overhang: (143¼" + 12") × 1.118 = 173⅝" = 14' 5⅝" → 16 ft boards
01

Building and pitch

ftin
ftin
/12
in
in
02

Rafters

Rafter size
Rafter spacing
Grade
03

Roofing and loads

psf
Sheathing
Common rafter length
14' 5⅝"
30' 0" × 24' 0" · 6/12 · 2x8 @ 16″
Rafters50
Lumber to buy50 × 2x8 × 16 ft
Ridge height (rise)6' 0"
Ridge board32' 0"
Roof area930 ft² · 10.2 squares with waste
OSB sheets31
Drip edge (eaves + rakes)122 ft
Ceiling joists or rafter ties25
Roof dead weight13,953 lb
Rafter run 11' 11¼" within the 14' 5⅜" maximum (AWC method)

Gable end and 3D model

30' 0" × 24' 0" · 6/12 · 2x8 @ 16″
GABLE END12624' 0"6' 0"14' 5⅝"DELIMETRA · FT-IN
Drag to rotate · scroll to zoom
run × √(1 + (pitch/12)²) + tailRafter26.6°Slopes14' 5⅜"Max rafter span930 ft²Roof area
Your local prices
$
$
$

Prices are not pre-filled: lumber and roofing prices change with the market.

How we calculate

Rafter length is the horizontal run times the slope factor √(1 + (pitch/12)²): a 6/12 roof has a factor of 1.118. The run of a common rafter is half the building width less half the ridge board; the tail adds the eave overhang, also measured horizontally.

Roof area is the sloped surface from the eave edge to the ridge on every face, rakes included. For a hip roof with equal pitches it equals the plan area with overhangs times the slope factor; for a pyramid on a rectangle the end slopes are flatter, and the end overhang is longer so the eaves stay level.

Rafters per slope are the roof length divided by the spacing, plus one. A hip roof has commons under the ridge, one central rafter at each end, four hips and jack rafters on both sides of every hip, each jack shorter by one spacing.

The rafter size is checked by the AWC span method for the species, grade, spacing and snow load, with the dead load of the covering (10, 15 or 25 psf) and L/180, or L/240 with a cathedral ceiling. Hips are at least as deep as the cut end of the rafters framing into them (IRC R802.4.3).

Covering area adds the waste for laps and cuts: 10 % for shingles, metal and tile, 15 % for shakes. A square is 100 ft² of roof.

Rafter length
14' 5⅝"

On a 24 ft wide house with a 6/12 roof, a common rafter rises 6 ft over its 12 ft run. Cut against a 1½ in ridge board and with a 12 in overhang, it is 14 ft 5⅝ in long, so you buy 16 ft boards. A 30 ft long house needs 50 of them at 16 in on center. The roof covers 930 square feet, 10.2 squares of shingles with waste, and takes 31 sheets of OSB and 122 ft of drip edge. The calculator above works this out for any gable roof and checks that the rafter size can carry your snow load.

How the calculator works

Enter the building length and width, the pitch and the overhangs, then the rafter size and spacing, the lumber, the snow load and the covering. The result is the common rafter length, the lumber to buy and the full materials list, with a check against the AWC span method and the code's minimum slope for the covering.

Rafter length

A rafter is the hypotenuse of a right triangle whose base is the run and whose height is the rise. Pitch is rise per 12 in of run, so the sloped length is the run times the slope factor √(1 + (pitch/12)²): 1.054 at 4/12, 1.118 at 6/12, 1.202 at 8/12, 1.414 at 12/12. The run of a common rafter is half the building width less half the thickness of the ridge board, because rafters stop against its face. The tail adds the eave overhang, measured horizontally from the wall, times the same factor.

For the default roof: (144 − ¾) in × 1.118 = 160.2 in to the wall line, plus 12 × 1.118 = 13.4 in of tail, 173⅝ in in total. Lumber comes in even lengths, so that is a 16 ft board with room for the plumb cut at the ridge and the tail cut.

Count and the rest of the frame

Rafters per slope are the roof length, rakes included, divided by the spacing, plus one: 32 ft at 16 in is 24 spaces and 25 rafters, 50 for both slopes. The ridge board runs the same 32 ft. Ceiling joists or rafter ties tie each pair of rafters together at the wall plates; without them a gable roof pushes its walls apart, unless the ridge is a structural beam.

Roof area and materials

The roof surface is the sloped width from the eave edge to the ridge times the roof length, for both slopes: 2 × 14.5 × 32 = 930 ft². Shingles are sold by the square of 100 ft²; with 10 % for starter, hips, ridge and cuts that is 10.2 squares. Sheathing takes 4 × 8 ft OSB or plywood sheets, 31 for this roof with 5 % for cuts. Spaced battens replace sheathing under some metal, shake and tile roofs. Drip edge runs along the eaves and up the rakes.

Is the rafter big enough?

The calculator checks the rafter by the American Wood Council's span method with design values for the species and grade you choose. The span that matters is the horizontal run from the wall to the ridge. A 2x8 Douglas fir-larch No. 2 at 16 in, under 30 psf of snow and 15 psf of shingle roof, can span 14 ft 5 in; the default run is 11 ft 11¼ in, so it passes. A cathedral ceiling, with drywall fastened to the rafters, tightens the deflection limit from L/180 to L/240. If the run is too long, the calculator names the smallest size that works.

The covering also sets a minimum pitch: asphalt shingles need at least 2/12 (IRC R905.2.2), and below 4/12 a double layer of underlayment; lapped metal panels 3/12, wood shakes 3/12, tile 2½/12.

Common mistakes

For the span of any rafter, use the Rafter Span Calculator; for pitch and angle conversions, the Roof Pitch Calculator; for a hip roof, the Hip Roof Calculator.

Questions

How do I calculate rafter length?

Multiply the run by √(1 + (pitch/12)²) and add the overhang times the same factor. A 12 ft run at 6/12 is 12 × 1.118 = 13.4 ft; with a 12 in overhang, 14.5 ft.

How long is a rafter for a 24 ft wide house?

At 6/12 with a 1½ in ridge board and a 12 in overhang: 14 ft 5⅝ in, cut from a 16 ft board.

How many rafters do I need?

Roof length ÷ spacing + 1 per slope. A 30 ft house with 12 in rakes at 16 in on center: 24 spaces, 25 rafters per slope, 50 in all.

What is the slope factor for a 6/12 roof?

1.118: every foot of run is 1.118 ft of rafter. 4/12 is 1.054, 8/12 is 1.202, 12/12 is 1.414.

How many squares is a 30 × 24 gable roof?

With 12 in overhangs at 6/12: 930 ft², 9.3 squares; with 10 % waste, 10.2 squares.

How many sheets of OSB for a roof?

Roof area ÷ 32 ft² plus 5 % for cuts: 930 ft² takes 31 sheets.

What is the minimum pitch for shingles?

2/12 for asphalt shingles (IRC R905.2.2), with double underlayment from 2/12 to 4/12.

Related calculators