Roof Rafter Calculator

Calculate rafter dimensions, count, and total lumber needed for roof framing.

Formula & Explanation

Rafter calculations determine structural lumber needs for roof framing: Run = Building Width ÷ 2 (from centerline to wall) Rise = Run × (Pitch Rise ÷ Pitch Run) Common Rafter Length = √(Run² + Rise²) Rafter Count = ceil(Building Width ÷ (Spacing ÷ 12)) + 1 Total Rafter Length = Rafter Length × Rafter Count × 2 (for both roof sides) Example: 40-ft building, 6:12 pitch, 16" spacing - Run = 20 ft - Rise = 20 × (6÷12) = 10 ft - Rafter length = √(400 + 100) = 22.4 ft - Rafter count ≈ 31 per side (62 total) - Total material ≈ 1387 linear feet Note: This is preliminary. Professional framing requires detailed engineering per building code.

Assumptions

  • Calculation is for common rafters (not hip or valley rafters)
  • Rafter spacing is in inches on-center (typical: 12", 16", 24")
  • Does not account for collar ties, purlins, ridge beams, or other structural members
  • Load capacity depends on lumber grade, size, and local building code
  • This calculation is for estimating only; structural design must be done by a licensed engineer
  • Hip and valley roofs require additional specialty rafters not calculated here

Example Calculation

A 40-ft wide building with 6:12 pitch and 16" rafter spacing requires approximately 1,386 linear feet of 2x6 or 2x8 rafter lumber.

Inputs

buildingWidth:40
pitchRise:6
pitchRun:12
rafterSpacing:16

Results

run:20.00
rise:10.00
rafterLength:22.36
rafterCount:31
totalRafterLength:1386.32

Rafter Spacing Requirements by Load

spacingloadstrength
12" on centerHeavy snow, high windMaximum
16" on centerModerate climateStandard residential
24" on centerLight snow, typical areaMinimum code

Frequently Asked Questions

Related Calculators