Enter the building span, roof pitch, overhang and ridge board thickness to get the common rafter length, the roof rise, the cut angle and the stock lumber length to buy.
How to use the rafter length calculator
- Enter the span: the width of the building from the outside of one wall’s top plate to the outside of the opposite wall.
- Enter the pitch in inches of rise per 12 in of run. The roof pitch calculator converts from degrees.
- Enter the overhang as a level distance from the wall, and the thickness of the ridge board.
- Read the total rafter length, then the stock length to buy. Rafter size and spacing come from span tables, not from this calculator.
Rafter length formulas
Run = span ÷ 2 − ridge thickness ÷ 2 Rafter factor = √(1 + (pitch ÷ 12)²) Line length (ridge to wall) = run × rafter factor Tail length = overhang × rafter factor Total rafter length = line length + tail length Roof rise = (span ÷ 2) × pitch ÷ 12 Plumb cut angle = arctan(pitch ÷ 12)
The line length runs along the rafter from the ridge to the outside of the wall, where the seat cut (birdsmouth) sits. Half the ridge board
thickness is taken off the run because each rafter stops at the face of the ridge board, not at its center.
Worked example: a 24 ft span at 6:12 with a 12 in overhang
- Run: 24 ÷ 2 − 1.5 in ÷ 2 = 12 ft − 0.75 in = 11.9375 ft.
- Rafter factor at 6:12: √(1 + 0.5²) = 1.118.
- Line length: 11.9375 × 1.118 = 13.347 ft (13′ 4 3/16″).
- Tail: 1 ft × 1.118 = 1.118 ft (1′ 1 7/16″).
- Total: 14′ 5 9/16″, so buy 16 ft lumber. Roof rise: 6 ft.
Rafter lengths for common spans
Total length with a 12 in overhang and a 1½ in ridge board:
| Span | 4:12 | 6:12 | 8:12 | 12:12 |
|---|---|---|---|---|
| 16 ft | 9′ 5 1/16″ | 9′ 11 15/16″ | 10′ 8 7/8″ | 12′ 7 11/16″ |
| 20 ft | 11′ 6 3/8″ | 12′ 2 3/4″ | 13′ 1 3/4″ | 15′ 5 5/8″ |
| 24 ft | 13′ 7 5/8″ | 14′ 5 9/16″ | 15′ 6 9/16″ | 18′ 3 9/16″ |
| 28 ft | 15′ 8 15/16″ | 16′ 8 7/16″ | 17′ 11 7/16″ | 21′ 1 1/2″ |
| 32 ft | 17′ 10 1/4″ | 18′ 11 1/4″ | 20′ 4 1/4″ | 23′ 11 7/16″ |
What this calculator doesn’t do
It gives lengths, not sizes. Whether a rafter should be a 2 × 6, 2 × 8 or larger depends on the species and grade of lumber, the spacing, the
span and the roof’s snow and dead loads. The American Wood Council’s span tables for joists and rafters organize allowable spans by those
factors, and your local code adopts its own tables. Hip, valley and jack rafters also need their own calculations.
Tips for cutting rafters
- Cut a pattern rafter first. Test it at both ends of the building before cutting the rest; walls are rarely perfectly parallel.
- Mark the plumb cut with a speed square set to the pitch, which is the same as the angle shown above.
- Mind the seat cut. Keep enough wood above the birdsmouth for strength; your plans or local code set limits.
- Choosing shingles? Check the pitch against the shingle slope rules on the roof pitch calculator.
Questions
How do I calculate rafter length?
Multiply the run (half the span, less half the ridge thickness) by the rafter factor for your pitch, then add the overhang times the same factor.
How long is a rafter for a 24 ft span at 6:12?
About 13′ 4 3/16″ from ridge to wall, or 14′ 5 9/16″ with a 12 in overhang.
Does the span include the overhang?
No. Span is wall to wall; enter the overhang separately so it’s multiplied by the rafter factor too.
What is the rafter factor for a 4:12 pitch?
1.0541: every foot of level run needs 12.65 in of rafter.
Sources
- Span Tables for Joists and Rafters, 2024 edition, American Wood Council, Nov 2023.
Used for: Rafter size depends on species, grade, spacing and roof loads, not on length alone. - Asphalt Shingles (R905.2), City of Hopkins, Minnesota.
Used for: Asphalt shingles only on 2:12 or steeper; double underlayment from 2:12 to 4:12.