We believe math and science education should be free and accessible to everyone. Why education matters >

Rafter Calculator

This roof rafter calculator plans a complete rafter order for a gable roof. Enter building length, span, pitch, and spacing; the calculator returns rafter count per side, total rafters, lumber length to order, total linear feet with 10% waste, board feet, and the plumb and seat cut angles. For single-rafter length only, use the separate Rafter Length Calculator.

How Rafter Counts Are Calculated

Rafters per side = ceil(building length / rafter spacing in feet) + 1 (for the starting rafter).

For a 40-foot building at 16-inch spacing: 40 / 1.333 = 30, plus 1 = 31 rafters per side. A gable roof needs these on both sides, so total rafters = 62.

Rafter Length Formula

Each rafter is the hypotenuse of a right triangle:

Rafter length = sqrt(run² + rise²) + overhang rafter

Where:

  • Run = half the building span
  • Rise = run x (pitch / 12)
  • Overhang rafter is the extra length past the wall, calculated the same way

For a 28-foot span with a 6:12 pitch and 12-inch overhang:

  • Run = 14 ft, Rise = 14 x (6/12) = 7 ft
  • Main rafter = sqrt(14² + 7²) = sqrt(245) = 15.65 ft
  • Overhang rafter = sqrt(1² + 0.5²) = 1.12 ft
  • Total rafter length = 16.77 ft, order 18 ft lumber

Rafter Length Table (common pitches, per foot of run)

Pitch Length per foot of run
3:12 1.031 ft
4:12 1.054 ft
5:12 1.083 ft
6:12 1.118 ft
8:12 1.202 ft
10:12 1.302 ft
12:12 1.414 ft

Multiply run (in feet) by this factor to get rafter length (main rafter only, add overhang separately).

Lumber Quantity and Board Feet

The rafter calculator rounds to standard lumber lengths (8, 10, 12, 14, 16, 20 ft) and applies a 10% waste factor to cover miscuts, knots, and breakage.

Board feet per linear foot of common rafter sizes:

  • 2x6 = 1.0 BF/ft
  • 2x8 = 1.33 BF/ft
  • 2x10 = 1.67 BF/ft
  • 2x12 = 2.0 BF/ft

Cut Angles

Plumb cut angle (vertical cuts at the ridge and rafter tail) equals the roof angle: arctan(pitch / 12). For a 6:12 pitch, that's 26.57°.

Seat cut angle (horizontal cut of the birdsmouth) is the complement: 90° - plumb angle. For a 6:12 pitch, the seat cut is 63.43°.

When to Use This Calculator vs Rafter Length Calculator

Use this rafter calculator when you need a complete lumber takeoff for a roofing order (count, total linear feet, board feet). Use the rafter length calculator when you need the precise length of a single rafter including ridge board adjustment for actual cutting.

Did this solve your problem?

Frequently Asked Questions

Search Calculators

Search across all calculator categories