1. Home
  2. Roofing & Carpentry Calculators
  3. Rafter Calculator

Rafter Calculator

Calculate common rafter length for a gable roof. Enter the building span, roof pitch, overhang and ridge board to get rafter length, cut angles, ridge height and rafter count.

How to Use the Rafter Calculator

  1. Enter the building span from outside of wall to outside of wall.
  2. Choose the roof pitch.
  3. Enter the level overhang and the ridge board thickness (1.5 in for a 2× ridge).
  4. Enter the building length and rafter spacing to count rafters.

Common Rafter Formulas

Rafter length = (Span ÷ 2 − Ridge thickness ÷ 2 + Overhang) × Pitch multiplierMultiplier = √(1 + (Pitch ÷ 12)²)
Plumb cut angle = arctan(Pitch ÷ 12)Seat cut angle = 90° − Plumb cut angle
Rafters = (Building length ÷ Spacing + 1) × 2Two sides of a gable roof

Example: 24 ft Span at 6/12

Run: 12 ft − 0.0625 ft (half the ridge) + 1 ft overhang = 12.94 ft

Length: 12.94 × 1.118 = 14.46 ft (14 ft 5.6 in) → buy 16 ft boards

Plumb cut: 26.57° · Seat cut: 63.43°

Rafters at 24 in on a 40 ft building: 21 per side, 42 total

Rafter Multipliers by Pitch

PitchMultiplierPlumb angle
4/121.05418.43°
5/121.08322.62°
6/121.11826.57°
8/121.20233.69°
10/121.30239.81°
12/121.41445.00°

Choosing Rafter Size

  • Rafter size depends on span, spacing, wood species and grade, and snow and dead loads.
  • Use the span tables in your local code (based on the IRC in many US areas) or ask an engineer.
  • Trusses are an alternative to stick framing and are designed by the truss maker.
  • Ceiling joists or rafter ties are usually needed to resist outward thrust on the walls.

Tips for Cutting Rafters

  • Cut one pattern rafter, test it on both sides, then use it to mark the rest.
  • Crown every board so the bow faces up.
  • Size roofing once the frame is set with the roofing calculator.
  • Price lumber with the board foot calculator.

Rafter Calculator FAQs

How do I calculate rafter length?

Take half the span, subtract half the ridge board thickness, add the level overhang, and multiply by the pitch multiplier. For a 24 ft span at 6/12 with a 12 inch overhang, that is about 14.46 ft.

What angle do I cut rafters at?

The plumb cut at the ridge equals the roof angle, arctan(pitch ÷ 12). For 6/12 that is 26.57°. The seat cut (birdsmouth) is 90° minus that, 63.43°.

How many rafters do I need?

Divide the building length in inches by the spacing, add 1, then double it for both sides. A 40 ft building at 24 inches on center needs 42 rafters.

What size lumber do I need for rafters?

It depends on span, spacing, species, grade and roof loads. Check the rafter span tables in your local building code or have an engineer size them.