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.