How to use the rafter length calculator
- Enter the span of the building from the outside of one wall to the outside of the other.
- Pick the pitch. Not sure? Measure it with the roof pitch calculator.
- Enter the overhang measured level from the wall.
- Enter the building length to count rafters, and set the spacing and ridge board under Adjust assumptions.
The rafter formulas
Run = span ÷ 2 − half the ridge thickness
Pitch factor = √(1 + (rise ÷ 12)²)
Line length = run × pitch factor
Tail = overhang × pitch factor
Plumb cut angle = arctan(rise ÷ 12); seat cut = 90° − plumb angle
Rafters per side = building length ÷ spacing + 1
Worked example
A 24 ft span, 6/12 roof, 1 ft overhang, 30 ft long at 24 in on center
- Run = 24 ÷ 2 = 12 ft. Pitch factor = √(1 + 0.5²) = 1.118.
- Line length = 12 × 1.118 = 13.42 ft. Tail = 1 × 1.118 = 1.12 ft.
- Total = 14.53 ft (about 14 ft 6 3/8 in), so buy 16 ft boards.
- Plumb cut 26.6°, seat cut 63.4°. Ridge is 6 ft above the walls.
- Rafters: 360 in ÷ 24 + 1 = 16 per side, 32 in total.
Pitch factors and angles
| Pitch | Angle | Pitch factor | Rafter per ft of run |
|---|---|---|---|
| 3/12 | 14.0° | 1.031 | 12.37 in |
| 4/12 | 18.4° | 1.054 | 12.65 in |
| 5/12 | 22.6° | 1.083 | 13.00 in |
| 6/12 | 26.6° | 1.118 | 13.42 in |
| 7/12 | 30.3° | 1.158 | 13.89 in |
| 8/12 | 33.7° | 1.202 | 14.42 in |
| 9/12 | 36.9° | 1.250 | 15.00 in |
| 10/12 | 39.8° | 1.302 | 15.62 in |
| 12/12 | 45.0° | 1.414 | 16.97 in |
Common mistakes to avoid
- Measuring the overhang along the slope. Enter it level; the calculator adds the slope.
- Forgetting the ridge board. Without the deduction each rafter is slightly long.
- Deep birdsmouth cuts. Keep the seat cut to about a third of the rafter depth.
- Cutting all rafters first. Cut one pattern, test it at both ends of the building, then copy it.
Frequently asked questions
How do I calculate rafter length?
Divide the span by two to get the run, multiply by the pitch factor (√(1 + (rise ÷ 12)²)) to get the line length, then add the overhang times the same factor. For a 24 ft span at 6/12 with a 1 ft overhang: 12 × 1.118 = 13.42 ft, plus 1.12 ft, so 14.53 ft.
What are the plumb cut and seat cut angles?
The plumb cut is the vertical cut at the ridge and tail, at the roof angle from the rafter edge: 26.6° for a 6/12 roof. The seat cut is the level cut of the birdsmouth that sits on the wall, at 90° minus that angle (63.4° for 6/12). With a speed square you can simply set the pitch number.
What length rafter boards should I buy?
The next standard lumber length that is at least a few inches longer than the total rafter length, so you can cut both ends square. A 14.53 ft rafter needs a 16 ft board.
Do I subtract the ridge board?
Yes, if there is a ridge board, each rafter is shortened by half its thickness measured level. For a 1 1/2 in ridge that is 3/4 in of run, which is slightly more along the slope. Enter the thickness under Adjust assumptions.
How many rafters do I need?
Divide the building length by the spacing and add one, for each side. A 30 ft building at 24 in on center needs 16 per side, 32 in total. Gable overhangs, barge rafters and openings add more.
Does this calculator tell me the rafter size?
No. Rafter depth and spacing depend on snow and wind loads, span, species and grade. Use the span tables in your local code or ask an engineer or truss supplier.