Rafter Length & Roof Framing Calculator

Common-rafter geometry and material quantities for a simple symmetrical gable roof.

Geometry estimate, not structural design. Common rafters only: no hips, valleys, jack rafters, unequal slopes or shed roofs.

Your roof

Outside-to-outside width. Decimal feet are welcome.

Used to count rafter-pair locations, including both ends.

Roof pitch

Examples: enter 4 for 4/12, 6 for 6/12, or 12 for 12/12.

6/12 pitch

Ridge board and eave

Half this thickness is removed from each side’s horizontal run. Enter 0 for conceptual geometry without a ridge board.

Horizontal projection beyond each outside wall—not length along the sloped rafter.

Rafter spacing

Use the spacing required by your plan. This calculator does not select structurally appropriate spacing.

Purchasing allowance and optional cost

Applied once to the common-rafter piece count.

Leave blank to omit cost. For lengths beyond the list, enter your supplier’s price for an appropriate continuous board.

How rafter length is calculated

For a simple gable roof, half the building span establishes the basic horizontal run. Half the entered ridge-board thickness is removed from each side’s run. The entered pitch determines rise. The rafter line is the hypotenuse.

Overhang is not added directly

A 12-inch horizontal overhang requires more than 12 inches measured along a sloped rafter. We convert the horizontal projection into its corresponding sloped length before adding it to the wall-to-ridge line.

Why ridge thickness matters

The two rafters terminate at opposite faces of the ridge board, so each side’s horizontal run is reduced by half the ridge thickness, not the full thickness.

We count spaces along building length by rounding up length divided by maximum spacing, then add one location for the other end. Each location has two common rafters. Purchasing allowance applies once to this piece count.

Stock guidance uses the common list 8, 10, 12, 14, 16, 18, 20, 22 and 24 ft. Your lumberyard may not stock every length. Calculated line footage differs from purchased board footage. Optional cost covers only the boards priced, excluding ridge board, fascia, sheathing, hardware, delivery, tax, labor and other materials.

Geometry estimate, not structural design

RockUtility calculates common-rafter geometry and material quantities from the dimensions, pitch and spacing you enter. It does not determine whether those values are structurally appropriate.

Actual framing requires consideration of lumber species and grade, rafter size, span, dead/live loads, snow, wind, bearing, connections, birdsmouth geometry, ridge beam versus ridge board, ceiling/rafter ties, collar ties, openings, hips/valleys, and local code and engineering requirements.

This tool does not size lumber, select allowable spacing, design birdsmouth cuts or connections, size ridge beams, specify ties, approve structural adequacy or design spliced rafters. Confirm geometry and continuous board length against your framing plan before cutting.