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.
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 →
How it's calculated (visible formula)
rafter = (width ÷ 2 + overhang) ÷ cos(pitch); rafters = 2 × (ceil(length ÷ spacing) + 1)
- Net geometric measurement, no waste.
- Adjustable waste % for cuts and breakage.
- Purchase rounded up to sellable units (boxes, bags, buckets, boards).
How to calculate it, step by step
- Measure building width between bearing walls and the roof length.
- Set the pitch (degrees, or rise/run converted) and horizontal overhang.
- Rafter length = (half the width + overhang) ÷ cos(pitch).
- Count rafters per side from spacing and double for both sides.
- Add ridge board, plates and waste to the order.
Worked example: 26 × 33 ft house, 30° (7/12), 20 in overhang, 24 in OC
- (13 ft + 1.67 ft) ÷ cos 30° ≈ 16.9 ft
- 33 ft ÷ 2 ft = 17 + 1 = 18 per side
- 36 rafters
→ 36 rafters, order 18 ft stock; ridge rise about 7.5 ft.
Common mistakes
- Measuring overhang along the slope and dividing by cosine again.
- Forgetting the birdsmouth cut at the plate.
- Using the same size in heavy snow areas.
Pro tips
- Mark the birdsmouth with a template so every rafter bears the same.
- Tie rafters to plates with hurricane ties.
- Use ceiling joists or rafter ties so thrust doesn't push walls out.
- Ventilate the attic to prevent condensation.
From calculation to quote
Add labour, 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 Srikanta M · Formula v1.0.0 · Verified 2026-09-10 · Updated 2026-09-10 · Limits: quantity estimation, not structural design or site supervision.