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.
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.
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):
| Pitch | Per ft of run | Rafter length | Hip or valley |
|---|---|---|---|
| 3/12 | 12.37 in | 15 ft 5½ in | 21 ft 6½ in |
| 4/12 | 12.65 in | 15 ft 9¾ in | 21 ft 9½ in |
| 5/12 | 13.00 in | 16 ft 3 in | 22 ft 1⅜ in |
| 6/12 | 13.42 in | 16 ft 9¼ in | 22 ft 6 in |
| 7/12 | 13.89 in | 17 ft 4⅜ in | 22 ft 11⅜ in |
| 8/12 | 14.42 in | 18 ft 0⅜ in | 23 ft 5⅜ in |
| 9/12 | 15.00 in | 18 ft 9 in | 24 ft 0⅛ in |
| 10/12 | 15.62 in | 19 ft 6¼ in | 24 ft 7½ in |
| 12/12 | 16.97 in | 21 ft 2½ in | 25 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
- Swanson Tool: Roof pitch reference (rafter length per foot of run) (checked Nov 12, 2026)