Rafter Length Calculator

Get total rafter length from building span, pitch, overhang, and ridge thickness.

Your numbers
Your project

Rafter length along the roof line

Enter your numbers above.

How total rafter length is derived from span and pitch

This calculator starts from the full building span rather than a pre-measured run, which is useful when you're working from a floor plan instead of an already-framed wall. The run for each common rafter is half the span, minus half the ridge board's thickness, since the ridge sits between the two opposing rafters rather than adding to either one's run.

The roof angle theta is found from the pitch using θ = arctan(pitch ÷ 12). Rather than computing rise and run separately, this version uses the trigonometric relationship Length = Run ÷ cos(θ), which gives the same rafter line length as the Pythagorean approach but folds run, rise, and slope into one step once the angle is known.

The horizontal overhang you enter is added to the run before the length calculation, so the result is the full rafter length from the ridge cut to the tail cut, ready to compare against your stock lumber lengths before ordering.

Where these numbers come from

The formula and default values in this calculator are based on:

These are planning estimates. Check your local building code, product specifications, and a licensed contractor before you buy materials or build.

Frequently asked questions

Why does the ridge board thickness matter for rafter length?

The ridge board sits between the tops of the two opposing common rafters. If you use half the building span as your run without deducting half the ridge thickness, your rafters will come up slightly long and push the ridge height higher than designed.

Is the overhang here horizontal or measured along the roof slope?

This calculator asks for the horizontal overhang (the distance the fascia sticks out past the wall, measured level), which is how overhang is usually specified on plans. The calculator converts it to along-the-slope length automatically using the roof angle.

How is this different from the Rafter Calculator?

The Rafter Calculator on this site starts from a horizontal run you've already measured. This one starts from the full building span and pitch and works out run for you, including the ridge board deduction, which is handy when framing from a plan set rather than a built wall.

All LumberCalcs tools