Rafter Length Calculator

Find the length of a common rafter for a gable roof from the building span and roof pitch, including the overhang tail, the rise, the plumb-cut angle and the lumber length to buy.

Answer

24 ft span at 6/12

14 ft 5.57 in

Rafter (ridge to wall)13 ft 4.16 in
Overhang tail1 ft 1.42 in
Run11 ft 11.25 in
Rise5 ft 11.63 in
Plumb cut angle26.6°
Board to buy16 ft

Lengths are measured along the top edge of the rafter, before the birdsmouth and ridge cuts.

The rafter is a hypotenuse

rise 5′ 11.6″run 11′ 11.3″12613.42rafter 14 ft 5.57 in6/1226.6° · 1 ft across = 1.118 ft of roofoverhang 12″

Run (half the span) and rise make a right triangle; the rafter is its long side, extended by the overhang. Drag the ridge or the eave tip, or click the pitch or overhang to type.

Why this answer

  1. Run. Half the span, less half the ridge board: (288 − 1.5) ÷ 2 = 143.25 in.
  2. Rise. 6 in per foot of run: 143.25 × 6 ÷ 12 = 71.63 in.
  3. Rafter length. √(run² + rise²) = run × pitch factor = 143.25 × 1.118 = 160.16 in.
  4. Tail. 12 × 1.118 = 13.42 in, so the total is 173.57 in.
  5. Angle. arctan(6 ÷ 12) = 26.57°: set your speed square to this for the plumb cut.

Why it works

How long is a rafter?

rise 6′ 0″run 12′ 0″rafter 13′ 5″6/12 · 26.6°

Step 1 of 3

Only halfway

A garage is 24 ft wide. A common rafter runs from one wall up to the ridge. How far does it run horizontally?

Pick the run and check.

Put it to use

On the job

  • Cut one pattern rafter, test-fit it on both walls, then trace the rest from it.
  • The birdsmouth seat cut shouldn’t go deeper than a third of the rafter’s depth.
  • Rafter size (2 × 6, 2 × 8, 2 × 10…) depends on span, spacing, snow load and wood species: use your local span tables. For the shingles, see the Roofing Calculator.

How it works

The rafter length calculator finds the length of a common rafter for a gable roof. The run is half the building's span, less half the ridge board's thickness. The rafter is the hypotenuse of the right triangle formed by the run and the rise.

Multiplying the run by the pitch factor, √(12² + pitch²) ÷ 12, gives the same answer as Pythagoras. The overhang tail is added the same way: horizontal overhang × pitch factor.

It also gives the rise, the plumb-cut angle (arctan of pitch ÷ 12) and the next standard lumber length that's long enough.

Run = (span − ridge thickness) ÷ 2Rise = run × pitch ÷ 12Rafter = √(run² + rise²) = run × pitch factorPlumb angle = arctan(pitch ÷ 12)

Worked example: 24 ft span, 6/12 pitch, 1½ in ridge, 12 in overhang

  1. Run: (288 − 1.5) ÷ 2 = 143.25 in.
  2. Main rafter: 143.25 × 1.118 = 160.16 in.
  3. Tail: 12 × 1.118 = 13.42 in, so the total is 173.58 in (14 ft 5.6 in).
  4. Buy 16 ft boards; the plumb cut is 26.6°.

Common mistakes

  • Using the full span instead of half of it.
  • Adding the rise to the run instead of using Pythagoras.
  • Forgetting the overhang tail or the ridge board deduction.
  • Measuring along the bottom edge instead of the top edge of the rafter.

Frequently asked questions

How do you calculate rafter length?

Divide the span by 2 to get the run, then multiply by the pitch factor (or use √(run² + rise²)). Add the overhang × pitch factor for the tail.

What is the pitch factor for a 4/12 roof?

√(144 + 16) ÷ 12 = 1.054.

How long is a rafter for a 24 ft wide building?

At 6/12 with a 12 in overhang, about 14 ft 6 in, so you'd buy 16 ft lumber.

What angle do I cut rafters at?

The plumb cut angle is arctan(pitch ÷ 12): 18.4° for 4/12, 26.6° for 6/12, 33.7° for 8/12, 45° for 12/12.

What size rafters do I need?

It depends on span, spacing, snow load and wood grade. Look it up in your local code's rafter span tables.