Rafter Length Calculator

Last reviewed How we calculate

A rafter is longer than half the width of the building, because it climbs at the roof pitch and usually runs past the wall to form the overhang. This works out the length of a common rafter on a simple gable roof from measurements you can take at ground level.

Common rafter length from span and pitch

Work out the length of a common rafter from the building span, roof pitch and overhang, plus the rise to the ridge.

How to measure
Half of a gable, seen from the end. The run is half the span less half the ridge board; the overhang is measured level from the outside of the wall; the rafter length is measured along the top edge. Center of span Rafter length Overhang Run (half the span)

This calculator needs JavaScript to work. The measurements below are the ones you would need to do the sum by hand.

Outside wall to outside wall, measured across the direction the rafters run.

Not sure? The roof pitch calculator works it out from a level and a tape.

Horizontal distance from the outside of the wall to the fascia. Enter 0 for none.

1.5 in for a standard 2x ridge board. Enter 0 where the rafters meet each other directly.

Rafter length, including overhang — Along the top edge of the rafter, from the ridge cut to the tail.

Horizontal run of one rafter Half the span, less half the ridge board.
—
Ridge to outside of wall
—
Overhang tail, along the slope
—
Rise from wall plate to ridge
—
Roof angle
—
Shortest standard board North American dimensional lumber, sold in 2 ft steps up to 24 ft.
—

This gives the line length of a common rafter on a simple gable. It does not size the rafter: the depth and spacing a rafter needs depend on its span, the load it carries and the timber grade, and your local code has span tables for that. Cut one pattern rafter, test it at both ends of the building, and only then cut the rest.

How the calculation works

Start with the run: half the building span, less half the thickness of the ridge board the rafters butt against. Multiply the run by the pitch multiplier, the sloped length of the rise-and-run triangle divided by its run, and you have the rafter from the ridge to the outside of the wall. The overhang is measured level, so it is walked up the same slope and added on as the tail.

A worked example

A building 24 ft wide with a 6 in 12 roof, a 12 in overhang and a 1.5 in ridge board has a run of 11.94 ft. The pitch multiplier at 6 in 12 is 1.118, so the rafter measures 13.35 ft from the ridge to the wall, and the tail adds 1.12 ft, for 14.46 ft in all. The shortest standard board that yields it is 16 ft, which leaves room for the plumb cut at the top and the cut at the tail.

What it does not tell you

It gives a length, not a size. Whether a rafter needs to be a 2×6, a 2×8 or deeper depends on how far it spans, how far apart the rafters are, the snow and dead load it carries and the grade of the timber. Those come from the span tables in your local building code or from an engineer, and a roof being re-covered with something heavier needs that check before anything else.

It also assumes a plain gable. Hip and valley rafters run at an angle in plan and are longer than common rafters for the same run, and jack rafters step down in length along a hip. Those need calculations of their own.

Before you cut

Mark and cut one rafter, offer it up at both gable ends, and check that the ridge line and the fascia line come out straight. Walls are rarely perfectly parallel. Once the pattern fits, use it to mark the rest.

Frequently asked questions

What is the pitch multiplier?

It is how much longer a sloped line is than the level distance it covers: the square root of the rise squared plus 144, divided by 12. At 6 in 12 it is about 1.118, so a rafter with a 10 ft run is about 11.18 ft long.

Does the rafter length include the overhang?

The headline figure does. The breakdown shows the part from the ridge to the outside of the wall and the overhang tail separately, so you can see how much each adds.

What size of timber do my rafters need?

That depends on the span, the rafter spacing, the loads the roof carries and the grade of the timber, and it comes from the span tables in your building code or from an engineer. This calculator gives the length only.