⬅ JusTheTool Home

📐 Roof Rafter Length Calculator

Calculate the exact rafter cut length from your run, pitch, and overhang — including the recommended board length to buy.

0 ft 0 in
Buy: 0 ft boards
Roof Angle: 0°
Total Lumber for All Rafters: 0 ft

How Rafter Length Is Calculated

A common rafter is just the hypotenuse of a right triangle. The "run" is the horizontal distance from the outside wall to the center of the ridge. The "rise" is how much the roof climbs over that same distance, set by your pitch. Once you know both, the rafter length is simple Pythagorean math: length = √(run² + rise²).

💡 Measuring Run Correctly: For a simple gable roof, run is half your building's total width (measured to the outside of the wall framing, not the ridge). For a shed roof or lean-to with a single slope, run is the full width of the structure.

Don't Forget the Overhang

The overhang (eave) extends past the wall at the same slope as the rest of the roof, so it adds length along the same angle — not just a flat addition. Our calculator factors this in automatically so your total cut length is accurate, not just the distance to the wall line.

Hip & Valley Rafters: A Quick Note

This calculator handles common rafters (the standard rafters running from wall to ridge on a gable or shed roof). Hip and valley rafters run diagonally across the corners and use a different run — roughly your common rafter's run multiplied by 1.414 (√2) before applying the same pitch — because they're covering the diagonal of a square, not a straight side. If your project includes hip or valley framing, budget extra length and confirm exact cuts on-site, since the birdsmouth and ridge cuts on hip rafters are compound angles best laid out with a speed square or framing calculator at the actual ridge.

⚠️ This Calculates Length, Not Load CapacityThis tool tells you how long to cut your rafters. It does not tell you what lumber size or species can safely span that distance under snow and live loads — that's a structural question governed by your local building code's span tables (IRC Table R802.5.1, or your regional equivalent) and your rafter spacing. Always confirm rafter size, species, grade, and spacing with your local building department or a structural engineer before framing a load-bearing roof.

Frequently Asked Questions

How do I find the run for a gable roof?

Measure the total width of the building from outside wall to outside wall, then divide by two. That's your run for each common rafter, since the roof slopes up symmetrically from both walls to the ridge in the middle.

What length rafter do I need for a 6/12 pitch and 12 foot run?

With a 6/12 pitch, the rise over a 12 foot run is 6 feet. Using the Pythagorean theorem, the rafter length is √(12² + 6²) = √180 ≈ 13.4 feet, before adding overhang.

Should I buy lumber the exact length of my rafter, or longer?

Always round up to the next standard stock length (8, 10, 12, 14, 16, 18, or 20 feet) plus a few extra inches for the ridge cut and any adjustment during layout. Cutting a rafter too short means starting over.

What's the difference between rafter length and "span"?

Span is the total horizontal distance a roof covers between supports (usually twice the run for a gable roof). Rafter length is the actual diagonal board length needed to cover that span at your chosen pitch — span is always shorter than the rafter itself once pitch is added.