Rafter Length Calculator

Enter the building width, pitch and overhang. You get the common rafter length, the cut length after the ridge deduction, how many rafters you need and the board length to buy.

Units

Type 6 or 6/12. Rise in inches for every 12 inches of run.

Rafter spacing, on center

Common rafter length

16 ft 8⅜ in per rafter

16.70 ft cut length · 26.6° · 62 rafters at 16 in

Each common rafter cuts to 16 ft 8⅜ in; you need 62 for both sides. Buy 18-ft boards.

  • Theoretical length, ridge centerline to tail16 ft 9¼ in
  • Run (including overhang)15 ft 0 in
  • Ridge height above the plate7 ft 0 in
  • Pitch angle (plumb cut)26.57°
  • Rafters needed, both sides62
  • Board length to buy18 ft (5.49 m)
  • Hip or valley rafter, same run22 ft 6 in

Lengths are measured along the top edge. Cut length takes off half the ridge board, measured along the slope. Check the span and size against your span tables or an engineer; this tool does not size lumber.

Planning estimate, not a quote. Disclaimer

How the rafter length is calculated

A common rafter runs from the ridge to the wall plate and out over the overhang. Its horizontal run is half the building width plus the overhang. The length along the slope is the run times the pitch multiplier. A ridge board takes up room, so the cut length is shorter by half the ridge thickness, measured along the slope.

Run = width ÷ 2 + overhang
Theoretical length = run × √(12² + rise²) ÷ 12
Cut length = theoretical length − (ridge thickness ÷ 2) × multiplier
Rafters = (building length ÷ spacing, rounded up + 1) × 2

Example: a 28-ft-wide building with a 6/12 roof and a 12-inch overhang has a run of 15 ft. The theoretical length is 15 × 1.1180 = 16 ft 9¼ in. With a 1½-inch ridge board the cut length is 16 ft 8⅜ in, which fits in an 18-ft board.

Common rafter length by pitch

For a 28-ft-wide building (14 ft of run plus a 1-ft overhang, 15 ft in total):

Theoretical common rafter length for a 15 ft run
PitchPer ft of runRafter lengthHip or valley
3/1212.37 in15 ft 5½ in21 ft 6½ in
4/1212.65 in15 ft 9¾ in21 ft 9½ in
5/1213.00 in16 ft 3 in22 ft 1⅜ in
6/1213.42 in16 ft 9¼ in22 ft 6 in
7/1213.89 in17 ft 4⅜ in22 ft 11⅜ in
8/1214.42 in18 ft 0⅜ in23 ft 5⅜ in
9/1215.00 in18 ft 9 in24 ft 0⅛ in
10/1215.62 in19 ft 6¼ in24 ft 7½ in
12/1216.97 in21 ft 2½ in25 ft 11¾ in

The per-foot figures match the rafter tables printed on framing squares. For a hip or valley rafter the same run is multiplied by the hip/valley factor, √(2 × 144 + rise²) ÷ 12.

What this does not do

It does not size lumber or check spans. Rafter size, grade, spacing and ceiling or collar ties depend on your snow and wind loads and local code. Use your code's span tables or an engineer. Always check lengths against your plans before cutting.

Frequently asked questions

How do you calculate rafter length?

Take half the building width plus the overhang as the run, then multiply by the pitch multiplier. A 15 ft run at 6/12 is 15 × 1.1180 = 16 ft 9¼ in.

Do I subtract for the ridge board?

Yes. Take off half the ridge board thickness, measured along the slope (half the thickness times the multiplier). The calculator does this for you; set the thickness to 0 to skip it.

How many rafters do I need?

Divide the building length by the spacing, round up, add one, and double it for both sides. A 40-ft building at 16 inches on center needs 31 per side, 62 in all.

What size lumber is a rafter?

That depends on the span, load, species and grade. Look it up in your code span tables or ask an engineer. This calculator only finds the length.

How do I find a hip or valley rafter length?

Multiply the common run by the hip/valley factor. At 6/12 the factor is 1.5000, so a 15 ft run gives 22 ft 6 in.

Related

Other roofing calculators

Sources