Lumber & framing calculator

Rafter calculator

Preliminary paired-rafter count and rafter length from roof plan dimensions, pitch and spacing.

Calculator result and formula

Rafter pairs to plan: 18 pairs

Formula: Rafter length = √((width ÷ 2)² + ((width ÷ 2) × rise ÷ 12)²)

Formula ID: LUM-RAFTER-001 · Version 1.0.0 · Published · Last reviewed Aug 26, 2026.

Inputs

  • Building length: Ridge direction used for rafter spacing Default: 30.
  • Building width: Total horizontal building width Default: 20.
  • Pitch rise: Vertical rise for every 12 units of horizontal run Default: 6.
  • Rafter spacing: On-center spacing; verify design requirements Default: 24.
  • Waste factor: Allowance for cuts and selected stock lengths Default: 10.

How this calculator works

This calculator uses roof width, rise-per-12 pitch and stated spacing to produce a preliminary paired-rafter count and sloped rafter length.

  1. Measure building length and total horizontal building width.
  2. Enter roof rise per 12 and spacing specified by the project.
  3. Verify rafter size, birdsmouth, overhang, ridge detail, spans and connection requirements independently.

Worked example: Example: a 30 ft building length at 24 in spacing has 16 rafter pairs. A 20 ft building width at 6:12 creates a 11.18 ft run per rafter before waste allowance.

Assumptions and limitations

  • Rafter length uses one half of a symmetrical roof's building width and the stated rise-per-12 pitch.
  • Overhang, ridge-board deductions, birdsmouth, valley/hip geometry and stock-length splices are excluded.
  • This tool is not a rafter-sizing or structural-design calculator.

Common mistakes to avoid

  • Confirm the measurement basis and units before using the result.
  • Keep waste or allowance visible and adjust it for the actual job conditions.
  • Confirm supplier packaging, delivery increments, specifications, and final site requirements before ordering.

Calculator disclaimer

This planning calculator does not determine structural design, code compliance, installation requirements, or guaranteed pricing. Confirm final requirements with the appropriate responsible professional, authority, manufacturer, and supplier.

Formula review and sources

Internal QA complete · independent external review pending · 1 source reference.

Related calculators

Enable JavaScript to use the interactive calculator and save a project estimate.