Rafter Length Calculator

Rafter Parameters

Building width
Roof slope
Measured level from the outside of the wall; leave blank for none
Select rafter type
On-center spacing (jack rafters only)

Calculation Results

0

Are you a roofer? Turn this into a customer quote.

RoofBidder measures the roof from satellite, prices your materials and sends a branded PDF proposal. 3-day free trial.

Try RoofBidder Free

How to Calculate Rafter Length

  1. Run = half the span (outside of wall to outside of wall ÷ 2). Rise = run × pitch ÷ 12.
  2. Common rafter = √(run² + rise²), plus the overhang.
  3. Hip or valley rafter (equal pitches on both sides): its run is the common run × √2, so length = √((run × √2)² + rise²), plus the overhang.
  4. Jack rafters get shorter by the same amount each step, the common difference = spacing × (common rafter length ÷ run). The calculator lists every jack length from the corner.
  5. Overhang (horizontal): enter it measured level from the outside of the wall. The calculator adds overhang ÷ cos(angle) along a common, jack or lean-to rafter. On a hip or valley the overhang runs √2 times as far in plan with the same drop, so it adds overhang × √(2 + (pitch ÷ 12)²).
  6. The length is to the center of the ridge. Deduct half the ridge board thickness (measured level) from each common rafter, and buy the next even lumber length (a 14.53 ft rafter → a 16 ft board).

For a lean-to or shed roof (one slope), choose the lean-to / shed rafter type: the run is the whole width of the building.

Rafter Length Examples

Example 1: Gable roof, common rafters

24 ft span, 6:12, 12 in. horizontal overhang
- Run 12 ft, rise 6 ft, rafter 13.42 ft
- Overhang along the rafter 1.12 ft: 14.53 ft (buy a 16 ft board)

Example 2: Hip rafter

30 ft span, 35°, 16 in. horizontal overhang
- Run 21.21 ft (15 × √2), rise 10.50 ft, rafter 23.67 ft
- Overhang along the hip 2.10 ft: 25.78 ft

Example 3: Valley rafter

24 ft span, 6:12, no overhang
- Run 16.97 ft, rise 6 ft: 18.00 ft

Example 4: Jack rafters

24 ft span, 6:12, 16 in. spacing, 12 in. horizontal overhang
- Common difference 17.89 in.
- Jacks 17.89, 35.78, 53.67, 71.55, 89.44, 107.33, 125.22 and 143.11 in., plus 13.42 in. of overhang each

Example 5: Lean-to (shed) rafter

10 ft wide, 3:12
- Run 10 ft (the full width), rise 2.50 ft: 10.31 ft
- With a 12 in. horizontal overhang: 11.34 ft

Rafter Lumber and Spacing

  • Rafters are usually 16 or 24 inches on center. Hip and valley rafters are single members at the corners, usually one size deeper than the common rafters.
  • The rafter size (2x6, 2x8 ...) depends on span, spacing, species, grade and snow load; use the rafter span tables in the International Residential Code (Tables R802.4.1(1) through R802.4.1(8)) or ask your lumber yard.
  • Lumber comes in 2 ft increments (8, 10, 12, 14, 16 ft ...); round the total length up.
  • Cut the birdsmouth with the birdsmouth cut calculator.

Rafter Length Calculator FAQs

How do I calculate rafter length?
Run = half the span; rise = run × pitch ÷ 12; rafter = √(run² + rise²), plus the overhang along the rafter. A 24 ft span at 6:12 gives 13.42 ft to the ridge.
How long is a rafter on a 6:12 roof?
About 1.118 × the run: 13.42 ft for a 12 ft run (24 ft span), before the overhang.
How do I calculate hip and valley rafter length?
With equal pitches, the hip or valley runs diagonally, so its run is the common run × √2 (1.414). Length = √((run × 1.414)² + rise²); a 24 ft span at 6:12 gives 18.00 ft.
How do I work out jack rafter lengths?
Find the common difference (spacing × common length ÷ run): 17.89 in. at 16 in. spacing on a 6:12 roof. Each jack is one common difference longer than the last; add the overhang along the rafter to each.
How do I calculate rafters for a lean-to roof?
A lean-to has one slope, so the run is the full width. Choose the lean-to / shed rafter type and enter the full width as the span; a 10 ft wide lean-to at 3:12 has a 10.31 ft rafter before the overhang, or 11.34 ft with a 12-inch overhang.
Should the overhang be included?
Yes. Enter the overhang measured level (horizontally) from the outside of the wall; the calculator adds it along the rafter as overhang ÷ cos(angle). A 12-inch overhang adds 1.12 ft to a 6:12 common rafter. On a hip or valley the overhang runs √2 times as far in plan, so a 12-inch overhang adds 1.50 ft on a 6:12 hip.
What size rafters do I need?
It depends on span, spacing, wood species and grade, and snow load; check the IRC rafter span tables (R802.4.1) or your lumber yard. The calculator gives length, not size.
Can the calculator work out the birdsmouth cut?
Use the birdsmouth cut calculator with your rafter depth, wall plate width, pitch and overhang.