How to Calculate Rafter Length

Rafter length calculations are essential for new construction, additions, and estimating roofing materials. Whether you are building a shed, framing a gable roof, or just need to understand your roof dimensions, this guide walks through the math step by step.

The Basic Formula

Rafter length is based on the Pythagorean theorem. A rafter forms the hypotenuse of a right triangle where the run is the horizontal leg and the rise is the vertical leg.

Rafter Length = √(Run² + Rise²)

Where: Run = half the building span (for a centered ridge), Rise = Run x (Pitch/12)

Step-by-Step for Common Rafters

  1. Measure the building span: This is the total width of the building from exterior wall to exterior wall.
  2. Calculate the run: For a standard gable roof with a centered ridge, the run is half the span. For a shed (single-slope) roof, the run equals the full span.
  3. Determine the pitch: Use our pitch measurement guide or the plans.
  4. Calculate the rise: Rise = Run x (Pitch / 12). For a 6/12 pitch with a 12-foot run: Rise = 12 x (6/12) = 6 feet.
  5. Apply the Pythagorean theorem: Rafter Length = √(Run² + Rise²).
  6. Add the overhang: Add the length of the eave overhang (typically 12–24 inches) to get the total rafter length.

Example Calculation

Building span: 28 feet

Run: 28 / 2 = 14 feet

Pitch: 6/12

Rise: 14 x (6/12) = 7 feet

Rafter length: √(14² + 7²) = √(196 + 49) = √245 = 15.65 feet

With 18" overhang: 15.65 + 1.5 = 17.15 feet → use 18-foot lumber

Shortcut: Using the Pitch Multiplier

An even faster method uses the pitch multiplier table:

Rafter Length = Run x Pitch Multiplier

Using the same example: 14 ft run x 1.118 (6/12 multiplier) = 15.65 ft. Same result, no square root needed.

Hip Rafter Calculation

Hip rafters run diagonally from the ridge to the corner of the building. They are longer than common rafters because they span at a 45-degree angle in plan view.

Hip Rafter Length = √(Run² + Run² + Rise²)

Or equivalently: √(2 x Run² + Rise²)

For a 14-foot run with a 6/12 pitch: √(2 x 196 + 49) = √441 = 21 feet.

Valley Rafter Calculation

Valley rafters are calculated the same way as hip rafters, since they also run at a 45-degree angle in plan view. The formula is identical to the hip rafter formula above.

Rafter Length Table (Common Rafters)

Run (ft) 4/12 6/12 8/12 10/12 12/12
88.4'8.9'9.6'10.4'11.3'
1010.5'11.2'12.0'13.0'14.1'
1212.6'13.4'14.4'15.6'17.0'
1414.8'15.7'16.8'18.2'19.8'
1616.9'17.9'19.2'20.8'22.6'

Values do not include overhang. Add 1–2 feet for typical eave overhangs.

Practical Tips

  • Always add overhang: Do not forget to add 12–24 inches for the eave overhang to your calculated rafter length.
  • Size up lumber: If your calculated length is 15.7 feet, buy 16-foot or 18-foot lumber to allow for cuts.
  • Account for the ridge: In standard framing, the rafter does not reach the ridge center — subtract half the ridge board thickness (typically 3/4 inch for a 2x ridge).
  • Use our calculator: Our Roof Pitch Calculator includes rafter length calculations automatically.

Frequently Asked Questions

Does rafter length include the overhang?

The mathematical rafter length goes from the exterior wall plate to the ridge. The overhang (tail) is additional. Always specify total cutting length including overhang when ordering lumber.

How do I account for the ridge board?

Subtract half the ridge board thickness from the calculated run before computing. For a 2x8 ridge board (1.5" actual), subtract 0.75" from each side. On a 14-foot run, this reduces the run to 13.9375 feet — a minor adjustment but important for precision framing.

What if my building is not symmetrical?

If the ridge is not centered, calculate each side separately using each side's actual run. One side will have longer rafters than the other. This is common with additions or offset ridge designs.