Rafter Calculator – How Long Are My Rafters? | CalcLoft

Find out exactly how long your rafters are for any building width and pitch.

Rafter Calculator: How Long Are My Rafters?
Free tool · no sign-up · instant results

How to find rafter length

The rafter is the hypotenuse of a right triangle. For a 24 ft building, the run is 12 ft (half the span). At 4/12 pitch, the rise is 12 × 4/12 = 4 ft. Length = √(12² + 4²) = 12.65 ft, plus overhang.

Formula: rafter = √(run² + rise²) + overhang

Rafter length by span (4/12 pitch)

Building widthRunRafter (no overhang)
16 ft8 ft8.43 ft
20 ft10 ft10.54 ft
24 ft12 ft12.65 ft
28 ft14 ft14.76 ft
32 ft16 ft16.86 ft

Number of rafters

Divide the roof length by the spacing and add one: a 30 ft roof at 24 in spacing needs about 16 rafters per side. Buy a few extra for cuts and mistakes.

Calculate your rafters →

Rafter calculator FAQ

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

At 4/12 pitch: about 12.65 ft plus your overhang.

What is roof run?

Run is half the building width — from the outside wall to the ridge.

Do I need a ridge beam?

Rafters either bear on a ridge board (stick framing) or are pre-engineered trusses. Follow your local code and plans.

Embed this calculator on your site

Free to use. Copy the code below and paste it into any page or post. It links back to Rafter Calculator and helps your readers too.

Not sure which calculator you need?

Browse all free home improvement calculators in one place.

All Calculators