BCTheBuildingCode

Rafter calculator — length, count & linear footage

Enter your building width, roof pitch, eave overhang, rafter spacing, and building length. The calculator gives you the total rafter cut length, the number of rafters you need, and total linear footage of rafter stock — in metric or imperial.

Rafter inputs
Total rafter cut length
4.416 m
= 14 ft 6 in
Common rafter
4.081 m
Overhang add
0.335 m
Total rafters
64
Total lin. m
282.6 m

6:12 pitch · slope factor 1.118 · 32 rafters per side (3.65 m run)

Slope factor = √(1 + (rise/12)²). Counts common rafter pairs for a gable roof — does not include ridge board, hip/valley rafters, or blocking. Add 10–15% for waste and cuts.

How the calculation works

Rafter length is found by multiplying the horizontal run (half the building width) by the slope factor:

slope factor = √(1 + (rise/12)²)

rafter length = run × slope factor + overhang × slope factor

  • rise = the "x" in your x:12 roof pitch
  • run = building width ÷ 2 (for a simple gable roof)
  • overhang = horizontal eave projection

A 6:12 pitch has a slope factor of √(1 + 0.25) = 1.118. Every foot of horizontal run becomes 1.118 feet of sloped rafter. For a 24-foot wide building with a 12-inch overhang: run = 12 ft, common rafter = 12 × 1.118 = 13.42 ft, overhang adds 1.118 ft, total cut length = 14.53 ft (14 ft 6 in).

Want the full step-by-step walk-through? Read the rafter length guide →

Reference & education only. Not professional, engineering, or code-compliance advice. Estimates are based on published model codes; local amendments and your Authority Having Jurisdiction (AHJ) govern. Always verify against the current adopted code and a licensed professional before doing work.

Last reviewed 2026-08.

More free tools

Other tools you might need

View all 56 free tools →All Structural tools & guides →