Roofing

Rafter Length Calculator

Quick answer: rafter length = run × √(1 + (pitch ÷ 12)²), where run = (span − ridge thickness) ÷ 2. A 24 ft span at 6/12 with a 1.5 in ridge has an 11.94 ft run and a 13.35 ft rafter; adding a 12 in overhang gives 14 ft 5 9/16 in — buy 16 ft stock.

Find common rafter length for a gable roof from the building span and pitch, with the ridge board deducted and the overhang (tail) measured along the slope. Also shows total rise, roof angle, and the plumb cut setting.

Rafter geometry

Run = (span − ridge) ÷ 2 Rise Rafter length Overhang Ridge

Common Rafter Calculator

Span is measured across the outside of the wall plates.

Total rafter length (with overhang) —
Ridge to plate—
Tail along slope—
Buy lumber—
Run (each side)
—
Total rise
—
Roof angle
—
Plumb cut
—
Slope factor
—

Theoretical line lengths, rounded to 1/16 in. Rafter size and spacing are not calculated — use the IRC R802.4.1 span tables or an engineer. Pitch from angle or rise? Use the roof pitch calculator.

Ridge board

How to calculate rafter length

A common rafter is the hypotenuse of a right triangle. The horizontal leg is the run, the vertical leg is the rise, and pitch links the two: a 6/12 roof rises 6 in for every 12 in of run. Because pitch is a ratio, you never need the rise itself to find the rafter — the slope factor does the work.

Rafter = (Run + Overhang) × √(1 + (P ÷ 12)²) Run = (Span − Ridge thickness) ÷ 2
  1. Measure the span from the outside edge of one wall's top plate to the outside edge of the opposite wall.
  2. Deduct the ridge board. Subtract its thickness (1.5 in for a 2× ridge) and halve the result to get the run of one rafter.
  3. Compute the slope factor √(1 + (pitch ÷ 12)²). For 6/12 it is √1.25 = 1.118.
  4. Multiply run × factor for the length from the ridge plumb cut to the outside of the wall plate.
  5. Add the tail: horizontal overhang × the same factor.
  6. Round up to a stock length (lumber comes in 2 ft increments) to allow for the plumb cut and tail trimming.

Worked example

A 28 ft wide garage gets an 8/12 roof with a 2× ridge (1.5 in) and a 16 in horizontal overhang.

  • Run: (28 − 0.125) ÷ 2 = 13.94 ft
  • Slope factor: √(1 + (8 ÷ 12)²) = 1.2019
  • Ridge to plate: 13.94 × 1.2019 = 16.75 ft = 16 ft 9 in; tail: 16 × 1.2019 = 19 1/4 in
  • Total: 18.35 ft = 18 ft 4 1/4 in → buy 20 ft rafters; rise 13.94 × 8/12 = 9 ft 3 1/2 in; plumb cut 33.69°

Slope factors and angles by pitch

Multiply any horizontal run by the slope factor to get length along the rafter. Last column: rafter length for 12 ft of run (a 24 ft span with no ridge board or overhang).

Roof angle, slope factor, and rafter length per 12 feet of run for common pitches
PitchAngle (plumb cut setting)Slope factorRafter per 12 ft run
3/1214.04°1.030812.37 ft
4/1218.43°1.054112.65 ft
5/1222.62°1.083313.00 ft
6/1226.57°1.118013.42 ft
7/1230.26°1.157713.89 ft
8/1233.69°1.201914.42 ft
9/1236.87°1.250015.00 ft
10/1239.81°1.301715.62 ft
12/1245.00°1.414216.97 ft

Rafter layout tips and common mistakes

  • Forgetting the ridge deduction. Skipping it makes every rafter too long by half the ridge thickness measured along the slope — 0.84 in on a 6/12 roof with a 2× ridge. Small, but the pair is off by more than 1.5 in at the peak.
  • Mixing horizontal and sloped overhang. Plans usually give overhang as a horizontal projection from the wall. Multiply it by the slope factor before adding it to the rafter.
  • Cutting all rafters from one layout without a test pair. Cut a pattern rafter, test it at both ends of the building, then use it as a template. Walls are rarely perfectly parallel.
  • Over-deep bird's mouths. The seat cut should bear fully on the wall plate (usually 1.5 in minimum bearing), and many builders limit the notch depth to about one-third of the rafter depth. Follow your plans and local code.
  • Sizing rafters by length alone. Allowable spans depend on snow load, dead load, spacing, and lumber grade. The IRC rafter span tables (R802.4.1) and ceiling-joist/rafter-tie rules (R802.5) govern; this tool only finds geometry.

Rafter length FAQ

How do you calculate rafter length?

Find the run (half the building span minus half the ridge board thickness), then multiply by the slope factor √(1 + (pitch ÷ 12)²). For a 24 ft span, 6/12 pitch, and 1.5 in ridge, the run is 11.94 ft and the rafter is 11.94 × 1.118 = 13.35 ft, about 13 ft 4 3/16 in before overhang.

How do you add overhang to rafter length?

Multiply the horizontal overhang by the same slope factor and add it to the rafter length. A 12 in horizontal overhang on a 6/12 roof adds 12 × 1.118 = 13.4 in along the rafter, bringing a 13.35 ft rafter to 14.46 ft, so you would buy 16 ft lumber.

What angle is the plumb cut on a rafter?

The plumb cut is vertical when the rafter is installed, so on a speed square you pivot to the roof angle: 26.57° for a 6/12 pitch, 33.69° for 8/12, and 45° for 12/12. Speed squares also have a common-rafter scale where you simply set the pitch number.

What is the slope factor for a 6/12 roof?

The slope factor for a 6/12 roof is √(1 + 0.5²) = 1.118, meaning every foot of horizontal run equals 1.118 ft of rafter. Other common factors are 1.054 for 4/12, 1.202 for 8/12, 1.302 for 10/12, and 1.414 for 12/12.

What size rafters do I need?

Rafter size depends on span, spacing, lumber species and grade, roof dead load, snow load, and whether a ceiling is attached. This calculator gives length only. Use the rafter span tables in IRC Section R802.4.1 or an engineer's design, and confirm with your local building department.

How we built this calculator: results use the standard volume, area, and coverage formulas shown on this page, with typical U.S. material densities, bag yields, and waste factors that you can override. Written and checked by the YardsCalculator editorial team. Last reviewed: October 2026.