Offline — the draft stays saved on this device.
Rafter calculator

Rafter calculator

Building width and length, roof pitch, overhang and spacing: you get each rafter's length, how many go on both sides and the ridge rise.

Deterministic calculation in your browser. No signup to see the result.

Purchase quantity

36 unit

Net measurement: 36 unit · Waste 10 %

  • Rafters (both sides)36 unit
  • Length of each rafter17.06 ft
  • Rafter linear length675.098 ft
  • Ridge board32.808 ft
  • Ridge rise above wall plate7.579 ft

Your prices per language/currency. Used when you enable “Use my prices” in calculators. My prices →

Calculate labor, margin & tax

How it's calculated (visible formula)

rafter = (width ÷ 2 + overhang) ÷ cos(pitch); rafters = 2 × (ceil(length ÷ spacing) + 1)

See methodology and formula versions

How to calculate it, step by step

  1. Measure building width between bearing walls and the roof length.
  2. Set the pitch (degrees, or rise/run converted) and horizontal overhang.
  3. Rafter length = (half the width + overhang) ÷ cos(pitch).
  4. Count rafters per side from spacing and double for both sides.
  5. Add ridge board, plates and waste to the order.

Worked example: 26 × 33 ft house, 30° (7/12), 20 in overhang, 24 in OC

  1. (13 ft + 1.67 ft) ÷ cos 30° ≈ 16.9 ft
  2. 33 ft ÷ 2 ft = 17 + 1 = 18 per side
  3. 36 rafters

→ 36 rafters, order 18 ft stock; ridge rise about 7.5 ft.

Common mistakes

Pro tips

From calculation to quote

Add labor, overhead and your margin, and generate the professional PDF.

FAQs

How do I calculate rafter length?
Horizontal run (half the width plus overhang) divided by the cosine of the pitch.
How far apart are rafters?
16 or 24 in on center, depending on sheathing and loads.
How do I convert pitch to degrees?
Degrees = arctan(rise ÷ 12). 6/12 is 26.6°, 12/12 is 45°.
What is a rafter tail?
The part of the rafter beyond the wall that forms the overhang.
What is a birdsmouth cut?
The notch where the rafter sits on the top plate.
Rafters or trusses?
Rafters leave usable attic space; trusses span farther with lighter members.

Sources and standards

Maintained by · Formula v1.0.0 · Verified 2026-09-10 · Updated 2026-09-10 · Limits: quantity estimation, not structural design or site supervision.