Skip to content

Roofing & Framing

Rafter Length Calculator

Use this rafter calculator to find common rafter length and cut angles; our roof replacement guide covers pitch and roof framing. Find the length of a common rafter for a gable roof. Enter the building span (outside of wall to outside of wall), the roof pitch and the horizontal overhang. The calculator deducts half the ridge board, applies the pitch multiplier and suggests the next standard lumber length to buy.

Rafter size (2×6, 2×8…) depends on span, spacing, species, grade and snow load, and must come from the span tables in your local code (for example IRC Table R802.4.1) or an engineer.

Results from this rafter calculator are planning estimates; confirm quantities and prices with your supplier or contractor before you order.

Enter your project

ft
in
m
/12
ft
in
m
in
cm

1.5 in for a 2× ridge board; 0 if rafters meet directly.

Results

Your results will appear here

Enter your measurements and press Calculate. Defaults show a typical example.

How to use the rafter calculator

  1. Enter the building span measured outside wall to outside wall.
  2. Enter the pitch and the horizontal overhang beyond the wall.
  3. Enter the ridge board thickness (or 0).
  4. Use the plumb cut angle to set your speed square or saw.

Formula

Run = span ÷ 2 − ridge thickness ÷ 2. Rafter length = (run + overhang) × √(1 + (pitch ÷ 12)²). Plumb cut angle = arctan(pitch ÷ 12); seat cut = 90° − plumb angle.

Worked example

A 24 ft span at 6/12 with no ridge deduction and a 1 ft overhang: (12 + 1) × 1.118 = 14.53 ft (14 ft 6⅜ in) — buy 16 ft lumber.

Tips for using the rafter calculator

  • Measure the span from outside of wall to outside of wall, as the calculator expects.
  • Buy rafters at the next standard lumber length above the calculated length.
  • Rafter size and spacing come from your code’s span tables or an engineer, not from length alone.
Looking up through the new wood stud and rafter framing of a house

Rafter Calculator FAQs

What size rafters do I need?

That depends on span, spacing, lumber grade and your area's snow and dead loads, and must come from your local code's rafter span tables or an engineer.

Is the overhang measured along the rafter?

No — enter it horizontally (level). The calculator applies the slope.

Does this work for hip rafters?

No. Hip and valley rafters run at 45° in plan and use a different multiplier. This tool is for common rafters.

Estimate before you call a contractor

Run the numbers with our free calculators so you can compare bids with confidence.