Free tool
Rafter length calculator
Short answer
- Rafter length = run × √(1 + (pitch ÷ 12)²). The run is half the span.
- Example: 24 ft span, 6/12 pitch, 12 in overhang, 1 1/2 in ridge board. The rafter is 14' 5 9/16" long. Buy 16 ft boards.
- The plumb cut for 6/12 is 26.6°.
Outside of wall to outside of wall. A plain number is feet.
Inches of rise per 12 inches of run.
Measured level, wall to tail. 0 for none.
1 1/2 for a 2× board, 3/4 for a 1×, 0 for none.
3 1/2 sits fully on a 2×4 wall.
For the number of rafters.
- Rafter length
- 14' 5 9/16"
- Board to buy
- 16 ft
- Ridge to wall
- 13' 4 3/16"
- Overhang along slope
- 1' 1 7/16"
- Plumb cut angle
- 26.6°
- Rise
- 5' 11 5/8"
- Birdsmouth heel cut
- 1 3/4"
- Height above plate
- 6 3/8"
Hip rafter with the same pitch on both sides: 18' 0" from the ridge center to the wall corner, 19' 6" with the overhang. Plumb cut 19.5°. You still have to shorten it at the ridge.
Lengths run along the top edge of the rafter, plumb cut to plumb cut, rounded to 1/16 inch. This is geometry only: lumber size, span and connections have to follow your building code.
Next step: work out the roof area and shingles.
How to calculate rafter length by hand
- Take the span (outside of wall to outside of wall), subtract the ridge board thickness and divide by 2. That is the run: (288 − 1.5) ÷ 2 = 143.25 in.
- Find the factor for your pitch: √(1 + (6 ÷ 12)²) = 1.118.
- Multiply: 143.25 × 1.118 = 160.16 in from the ridge board to the wall.
- Do the same with the overhang: 12 × 1.118 = 13.42 in. Add both: 173.57 in, or 14' 5 9/16".
The board has to be longer than that, because the plumb cuts are slanted. For a 2×6 at 6/12 add 2.75 in (depth × pitch ÷ 12).
Rafter length chart
From the center of the ridge to the outside of the wall, with no overhang and no ridge board.
| Span | 4/12 | 6/12 | 8/12 | 10/12 | 12/12 |
|---|---|---|---|---|---|
| 12 ft | 6' 3 7/8" | 6' 8 1/2" | 7' 2 9/16" | 7' 9 3/4" | 8' 5 13/16" |
| 16 ft | 8' 5 3/16" | 8' 11 5/16" | 9' 7 3/8" | 10' 4 15/16" | 11' 3 3/4" |
| 20 ft | 10' 6 1/2" | 11' 2 3/16" | 12' 0 1/4" | 13' 0 3/16" | 14' 1 11/16" |
| 24 ft | 12' 7 13/16" | 13' 5" | 14' 5 1/16" | 15' 7 7/16" | 16' 11 5/8" |
| 28 ft | 14' 9 1/16" | 15' 7 13/16" | 16' 9 15/16" | 18' 2 11/16" | 19' 9 9/16" |
| 32 ft | 16' 10 3/8" | 17' 10 11/16" | 19' 2 3/4" | 20' 9 15/16" | 22' 7 1/2" |
| 36 ft | 18' 11 11/16" | 20' 1 1/2" | 21' 7 5/8" | 23' 5 3/16" | 25' 5 1/2" |
| 40 ft | 21' 1" | 22' 4 5/16" | 24' 0 7/16" | 26' 0 7/16" | 28' 3 7/16" |
Rafter length per foot of run
You find these numbers on many framing squares. Multiply by the run in feet to get the length in inches.
| Pitch | Common rafter | Hip or valley rafter | Plumb cut |
|---|---|---|---|
| 2/12 | 12.17 in | 17.09 in | 9.5° |
| 3/12 | 12.37 in | 17.23 in | 14.0° |
| 4/12 | 12.65 in | 17.44 in | 18.4° |
| 5/12 | 13.00 in | 17.69 in | 22.6° |
| 6/12 | 13.42 in | 18.00 in | 26.6° |
| 7/12 | 13.89 in | 18.36 in | 30.3° |
| 8/12 | 14.42 in | 18.76 in | 33.7° |
| 9/12 | 15.00 in | 19.21 in | 36.9° |
| 10/12 | 15.62 in | 19.70 in | 39.8° |
| 11/12 | 16.28 in | 20.22 in | 42.5° |
| 12/12 | 16.97 in | 20.78 in | 45.0° |
| 14/12 | 18.44 in | 22.00 in | 49.4° |
| 16/12 | 20.00 in | 23.32 in | 53.1° |
| 18/12 | 21.63 in | 24.74 in | 56.3° |
The plumb cut angle is for the common rafter.
What the cuts mean
- Plumb cut: the vertical cut at the ridge and at the tail. Set your saw or speed square to the plumb cut angle.
- Birdsmouth: the notch where the rafter sits on the wall. It has a level seat cut and a vertical heel cut.
- Height above plate: how much wood is left above the wall plate, measured straight up. Keep it the same on every rafter, or the roof gets bumps.
- Hip rafter: runs diagonally to the corner, so it is longer and its plumb cut is flatter than that of a common rafter.
Don't know the pitch? Measure it with the roof pitch calculator. Building with metal panels? The metal roofing calculator gives panel lengths and counts.
Frequently asked questions
What is the formula for rafter length?
Rafter length = run × √(1 + (pitch ÷ 12)²). The run is half the span minus half the ridge board. Add the overhang to the run if you want the length to the tail.
How long is a rafter for a 24 foot span?
At 6/12 it is 13' 5" from the center of the ridge to the outside of the wall, without overhang and without a ridge board. With a 12 inch overhang and a 1 1/2 inch ridge board it is 14' 5 9/16".
Do I measure the rafter along the top or the middle?
Along the top edge here. The plumb cuts are parallel, so any line along the rafter from plumb cut to plumb cut has the same length.
Does the length include the ridge board?
No, half of its thickness is taken off each rafter. Set the ridge board to 0 if your rafters meet without one.
Can I use it for a shed roof?
Yes, with a small trick: enter twice the level distance between the two walls as the span and set the ridge board to 0. The result from ridge to wall is then your rafter between the walls.
Does it check whether my rafter is strong enough?
No. Use the span tables in your building code or ask an engineer. They depend on wood species, grade, spacing and snow load.
Quoting the roof too?
Make a clean estimate with line items, tax and deposit. Free, no signup, PDF in minutes.
Open the estimate maker