Skip to content
RoofPitch HQ

The roofing toolkit

Rafter Length Calculator: Span & Roof Pitch

Estimate the sloping wall-to-ridge length of a common rafter from a symmetrical gable roof's full span and pitch, with results in feet and inches.

Enter your measurements

Results update as you type. Use horizontal measurements, not sloping lengths.

Outside wall to outside wall for a symmetrical gable. The calculator uses half this span.

Common rafter length

conventional

12.65ft

One-side run
12 ft
Wall-to-ridge rise
4 ft
Length in inches
151.79 in

Symmetrical gable, wall to ridge centerline. Excludes overhangs, ridge thickness, and cutting allowances.

Start with a symmetrical gable

This rafter length calculator estimates the sloping wall-to-ridge distance for a common rafter. It assumes a straight, symmetrical gable with the ridge centered between the exterior wall reference lines. Enter the full horizontal span in feet, then enter the roof pitch. The result is a useful geometry check before detailed framing layout.

The calculator divides the span in half to obtain the horizontal run for a side of the roof. Do not enter an already-halved run in the span field. The pitch describes rise per 12 inches of horizontal distance; it does not describe how many inches the rafter itself rises along its sloping edge.

Follow the span-to-length example

For a full span of 24 feet and a 4:12 pitch, the horizontal run is 12 feet. That run produces a vertical rise of 4 feet. The sloping reference length is about 12.65 feet, or 151.79 inches.

These distances form a right triangle. The calculated length is the square root of the horizontal run squared plus the rise squared. Adding run and rise would trace a horizontal segment followed by a vertical segment; it would not measure the diagonal rafter line.

Separate reference geometry from framing details

The output stops at the ridge centerline and excludes the overhang. Actual framing needs adjustments for the selected ridge detail, ridge-board thickness, bearing location, birdsmouth, and end cuts. Those details belong in the framing layout, so the displayed result should not go straight onto a board as a finished cut length.

An overhang adds a rafter tail beyond the wall and needs its own horizontal projection and cut layout. Do not add a horizontal overhang directly to the sloping result as though those distances followed the same line. Keep reference dimensions clearly labeled on your sketch.

Check the roof shape before reusing the answer

Hip rafters, valley rafters, unequal slopes, and off-center ridges do not share the simple half-span geometry used here. Measure and lay out those conditions separately. For additions, also confirm where the existing and proposed roof planes meet instead of assuming matching wall widths create matching ridge heights.

Length alone does not determine rafter size or structural capacity. Lumber species, grade, spacing, connections, and design loads require the applicable framing tables or an engineered design. Use this result to check dimensions and discuss the layout, then follow the approved framing requirements for construction.

A few helpful answers

Roof pitch, explained

Should I enter the whole roof span or the horizontal run?

Enter the full wall-to-wall span of a symmetrical gable. The calculator halves it internally. In the example, a 24-foot span produces a 12-foot horizontal run. Do not halve the span before entering it.

Does this length include the roof overhang?

No. It estimates the sloping distance from the wall reference line to the ridge centerline. Overhangs and their rafter tails need separate geometry and detailing. Ridge-board thickness, birdsmouth cuts, and end cuts also affect a finished rafter.

Can I use the result as a lumber cut length?

Use it as a geometric reference, not a ready-to-cut dimension. A framing layout must account for ridge thickness, bearing locations, overhangs, and cut details. Verify the plan and measurements before cutting or ordering structural lumber.

Will it work for a hip rafter or an off-center ridge?

This calculator is for a common rafter in a symmetrical gable roof. Hip and valley rafters have different geometry, and an off-center ridge gives unequal horizontal runs. Use a layout method matched to that roof rather than the half-span assumption.