Skip to content
RoofCostLab

Framing tool

Rafter Length Calculator

Enter the building span and roof pitch to get common rafter length, ridge height above the plate, and the board length you need including overhang.

Common rafter length equals the horizontal run multiplied by the pitch multiplier. On a 24 ft span at 6/12, the run is 12 ft and the rafter is 13.42 ft, or 13 ft 5 in, plus overhang.

Calculate rafter length

Run is half the span for a symmetrical gable roof.

ft

Outside to outside of the walls.

ft
ft

For the rafter count.

Common rafter

15 ft 8 in

run + overhang, along the slope

Horizontal run 12 ft
Rafter (no overhang) 13 ft 5 in
Ridge height above plate 6 ft 0 in
Hip / valley rafter 17 ft 5 in
Rafters needed 62

How rafter length is calculated

A common rafter is the hypotenuse of a right triangle whose base is the run and whose height is the rise. Because pitch is expressed per 12 inches, the shortcut is run × √(1 + (rise/12)²), the same pitch multiplier used for roof area.

The run is measured from the outside of the wall to the centre of the ridge. On a symmetrical gable that is half the span, minus half the ridge board thickness if you are cutting precisely. The overhang extends along the same slope, so it is multiplied too. A 2 ft horizontal overhang adds 2.24 ft of board at 6/12, not 2 ft.

Hip and valley rafters

Hip and valley rafters run diagonally, so they use a 17 unit run instead of 12, because the diagonal of a 12 × 12 square is 16.97. Their length is the run multiplied by √(1 + (rise/17)²) × √2, which for a 6/12 roof over a 12 ft run gives about 17.4 ft.

Always cut one rafter, test-fit it in place, and use it as the pattern for the rest. A calculation error repeated forty times is an expensive afternoon.

Frequently asked questions

How do I calculate rafter length?

Multiply the horizontal run by the pitch multiplier √(1 + (rise/12)²). For a 12 ft run at 6/12 pitch, that is 12 × 1.118 = 13.42 ft, or 13 ft 5 in.

How long should rafters be for a 24 ft span?

At 6/12 pitch the run is 12 ft and each common rafter is 13 ft 5 in before overhang. Adding a 2 ft overhang brings the board length to about 15 ft 8 in, so you would buy 16 ft stock.

What spacing should roof rafters be?

16 inches on centre is standard for most residential roofs. 24 inches is permitted with thicker sheathing and lighter roofing, and 12 inches is used under heavy tile or slate or in high snow-load areas.

How many rafters do I need?

Divide building length in inches by the spacing, then add one for the closing rafter. A 40 ft building at 16 in on centre needs 31 per side, so 62 for a gable roof.

What is the difference between a rafter and a truss?

Rafters are cut and framed on site and leave the attic open and usable. Trusses are engineered assemblies delivered complete, go up much faster, span further, and fill the attic with webbing.

Related calculators