Rafter Length Calculator

Rafter length = run × √(1 + (pitch ÷ 12)²) plus the overhang: on a 24 ft span with a 6/12 pitch and 12 in overhang, each rafter is about 14 ft 5½ in, so you buy 16 ft boards. Enter your roof below.

Your estimate

Rounded up to whole bags, tiles or rolls. Quantities include the allowances you set.

How to use the rafter calculator

  1. Enter the building span: the outside-to-outside width of the walls the rafters sit on.
  2. Enter the pitch as rise per 12 inches of run (6 for a 6/12 roof). Not sure? Use the roof pitch calculator.
  3. Enter the overhang — the horizontal distance the eave sticks out past the wall.
  4. Enter the ridge board thickness: 1.5 in for a 2× ridge board, 0 if rafters meet each other directly.
  5. Enter the building length and spacing to count rafters.

The rafter length formula

Run = span ÷ 2 − ridge thickness ÷ 2

Line length = run × √(1 + (pitch ÷ 12)²)

Overhang length = overhang × √(1 + (pitch ÷ 12)²)

Rafter length = line length + overhang length

The square-root term is the Pythagorean theorem expressed per foot of run, and is the same "pitch multiplier" printed on the rafter tables of a framing square. The line length runs from the outside edge of the wall plate (where the bird's-mouth seat cut sits) to the face of the ridge board, measured along the top edge of the rafter.

Worked example

A 24 ft wide garage with a 6/12 roof, 12-inch overhang, 1.5-inch ridge board, 40 ft long, rafters 16 inches on center:

Lumber is sold in 2 ft increments (8, 10, 12 … 24 ft). Always leave a few inches for squaring the ends and the plumb cut, which is why 14 ft 5½ in rounds up to 16 ft.

Cutting the rafter

Rafter size and spans

This calculator finds length, not structural size. The allowable span for 2×6, 2×8, 2×10 or 2×12 rafters depends on wood species and grade, spacing, snow load and dead load; use the rafter span tables in IRC Section R802 or the American Wood Council span tables, and check with your local building department. Rafter ties or ceiling joists are needed to resist outward thrust on the walls.

Tips

Frequently asked questions

How do I calculate rafter length?

Take half the span minus half the ridge board, multiply by √(1 + (pitch ÷ 12)²), then add the overhang multiplied by the same factor.

How long is a rafter for a 24 ft span with a 6/12 pitch?

About 13 ft 4 in from wall to ridge, or 14 ft 5½ in with a 12-inch overhang, so you would buy 16 ft boards.

How many rafters do I need?

Divide the building length in inches by the spacing, round up and add one for each side, then double it. A 40 ft building at 16 inches on center needs 31 per side, 62 total.

What is the plumb cut angle on a rafter?

The plumb cut angle equals the roof angle, for example 26.57 degrees for a 6/12 pitch. The seat cut is 90 degrees minus that.

Does rafter length include the overhang?

This calculator shows both: line length from wall to ridge and total length including the overhang tail.