Independent guide. Not a contractor, and we don't sell leads.
How we make money

Rafter Length Calculator

Enter your building span, roof pitch, overhang and ridge board to get rafter length in feet and inches, the rise, and the stock length to buy.

Key takeaways

  • Rafter length is the level run multiplied by the slope multiplier for your pitch.
  • A ridge board shortens each rafter's run by half the board's thickness.
  • This tool gives length only, not the rafter size or spacing your code requires.

Enter the span from outside wall to outside wall, your pitch, and any overhang. The overhang is the level distance past the wall, not the length along the slope.

  • Total rafter length14 ft 5 5/8 inAlong the slope, ridge to tail, before any plumb cut allowance
  • Ridge to wall13 ft 4 1/8 inOverhang adds 1 ft 1 3/8 in
  • Rise at the ridge5 ft 11 5/8 inOver a level run of 11 ft 11 1/4 in
  • Shortest stock length16 ftNext even length; check that it leaves room for cuts

Nothing you enter leaves your browser. Gives length only. Rafter size and spacing come from your local building code or an engineer.

Show the math with your numbers
  1. Run: (288 in − 1.5 in) ÷ 2 = 143.25 in
  2. Multiplier for 6/12: 1.118
  3. Ridge to wall: 143.25 × 1.118 = 160.16 in
  4. Overhang: 12 × 1.118 = 13.42 in
  5. Total: 173.57 in = 14 ft 5 5/8 in
What if: pitch per 12
Pitch per 12Total rafter length
3 in13 ft 4 in
4 in13 ft 7 5/8 in
5 in14 ft 0 1/4 in
6 in (yours)14 ft 5 5/8 in
8 in15 ft 6 5/8 in
10 in16 ft 10 1/8 in
12 in18 ft 3 1/2 in

How the calculator works

  1. Run: (span − ridge board thickness) ÷ 2
  2. Slope multiplier: √(1 + (pitch ÷ 12)²)
  3. Ridge to wall: run × multiplier
  4. Overhang length: level overhang × multiplier
  5. Total: ridge to wall + overhang length

Worked example

A 24-foot span with a 6/12 pitch, a 12-inch overhang and a 1½-inch ridge board:

Step Math Result
Run (288 in − 1.5 in) ÷ 2 143.25 in
Multiplier for 6/12 √(1 + 0.5²) 1.118
Ridge to wall 143.25 × 1.118 13 ft 4 ⅛ in
Overhang 12 × 1.118 1 ft 1 ⅜ in
Total 14 ft 5 ⅝ in

The next even stock length is 16 feet, which leaves room for cuts. Framing lumber is typically sold in even-foot lengths, so check what your supplier stocks.

What this calculator doesn't do

  • Size the rafter: the depth, grade and spacing depend on span, load and your local code. Check your building department's rules or ask an engineer.
  • Lay out the cuts: it doesn't work out plumb cuts or birdsmouth notches. Ridge-board and tail details can change the cut length slightly, so measure your first rafter before you cut the rest.
  • Handle hips and valleys: hip and valley rafters run at an angle across the plan, so they need a different calculation.

To find your pitch first, use the roof pitch calculator. To work out the area these rafters cover, use the roof area calculator.

How pitch changes the lumber you buy

On a 24-foot span with no ridge board or overhang, pitch alone can move you up a stock length:

Pitch Rafter length Shortest even stock
4/12 12.65 ft 14 ft
6/12 13.42 ft 14 ft
8/12 14.42 ft 16 ft
10/12 15.62 ft 16 ft
12/12 16.97 ft 18 ft

Adding an overhang lengthens each one further, so check the stock length before you price the job.

Frequently asked questions

Is the span measured inside or outside the walls?

This calculator expects the distance between the outside edges of the walls, where the rafters land. Measure the way your plans do, because some details differ.

Why does the ridge board matter?

Each rafter stops at the face of the ridge board rather than the center of the building. So each run is shorter by half the board's thickness.

What if I have no ridge board?

Enter 0. That gives the theoretical length from the center of the building to the wall line.

What size rafter do I need?

This tool can't tell you. Sizing depends on span, spacing, lumber grade and roof loads, and those vary by location. Use your local code's tables or an engineer.

Sources

We use primary sources where we can: building codes, federal rules and manufacturer documents. Read our editorial standards.

  • 2021 International Residential Code, Chapter 8, Section R802 (wood roof framing, including rafter rules and span tables)