Rafter Calculator
Enter the span and pitch. You get the rafter length.
That number is too big. Check what you typed.
Sizes must be greater than zero, and the overhang and ridge zero or more.
Pick a pitch from 1/12 to 24/12.
The price must be from $0 to $10,000 a board.
The ridge board is thicker than half the span.
Too large: span up to 100 ft, overhang up to 48 in, ridge up to 12 in, length up to 1,000 ft.
How to calculate rafter length
Each rafter runs level from the ridge to the wall: half the span. Take off half the ridge board, add the overhang, and multiply by the pitch multiplier, √(1 + (rise ÷ 12)²), to get the length along the slope.
A 24 ft span at 6/12 has a multiplier of 1.118. With a 1 1/2 in ridge board, the rafter runs (12 − 0.0625) × 1.118 = 13.35 ft, 13 ft 4 1/8 in, from the ridge to the seat cut. With a 12 in overhang: (12 − 0.0625 + 1) × 1.118 = 14.46 ft, 14 ft 5 5/8 in.
The board must also hold the plumb cuts: the two of them take, together, the board depth times the rise over 12 (3 5/8 in for a 2×8 at 6/12, 5 5/8 in for a 2×12), plus 2 in to square the ends: 14.93 ft for 2×8s, so buy 16 ft boards.
Count: 40 ft of building at 16 in on center is 480 ÷ 16 = 30 spaces, 31 rafters per side, 62 in all. At 24 in, 21 per side; at 12 in, for heavy snow, 41.
Rafter length by span and pitch
With a 1 1/2 in ridge board and a 12 in overhang, the calculator's defaults: the rafter length, then the 2×8 board to buy. LVL: longer than 24 ft of board.
| Span | 4/12 | 6/12 | 8/12 | 10/12 | 12/12 |
|---|---|---|---|---|---|
| 12 ft | 7 ft 3 3/4 in, 8 ft | 7 ft 9 1/8 in, 10 ft | 8 ft 4 in, 10 ft | 9 ft 3/8 in, 10 ft | 9 ft 9 3/4 in, 12 ft |
| 16 ft | 9 ft 5 in, 10 ft | 9 ft 11 7/8 in, 12 ft | 10 ft 8 7/8 in, 12 ft | 11 ft 7 5/8 in, 14 ft | 12 ft 7 5/8 in, 14 ft |
| 20 ft | 11 ft 6 3/8 in, 12 ft | 12 ft 2 3/4 in, 14 ft | 13 ft 1 3/4 in, 14 ft | 14 ft 2 7/8 in, 16 ft | 15 ft 5 5/8 in, 18 ft |
| 24 ft | 13 ft 7 5/8 in, 16 ft | 14 ft 5 5/8 in, 16 ft | 15 ft 6 5/8 in, 18 ft | 16 ft 10 1/8 in, 18 ft | 18 ft 3 1/2 in, 20 ft |
| 28 ft | 15 ft 9 in, 18 ft | 16 ft 8 3/8 in, 18 ft | 17 ft 11 3/8 in, 20 ft | 19 ft 5 3/8 in, 22 ft | 21 ft 1 1/2 in, 22 ft |
| 32 ft | 17 ft 10 1/4 in, 20 ft | 18 ft 11 1/4 in, 20 ft | 20 ft 4 1/4 in, 22 ft | 22 ft 5/8 in, 24 ft | 23 ft 11 1/2 in, LVL |
US measurements
The pitch is the rise in inches for 12 in of run: 4/12, 6/12, 8/12. Pick yours in the list. Span is wall to wall, outside of the top plates. Overhang is measured level, past the wall.
The rise to the ridge is measured on the building line: from the outside top of the wall plate up to the ridge center line, 6 ft for a 24 ft span at 6/12. The top of the ridge board sits higher, by the rafter depth above the seat cut.
Rafters are 2×6, 2×8, 2×10 or 2×12 (actual 1 1/2 in thick, 5 1/2 to 11 1/4 in deep), or 2×4 on a small shed, sold in 2 ft steps from 8 to 24 ft. The calculator holds each size to the span table of the US residential code (IRC R802.4.1(1), #2 grade, shortest species), which assumes a 20 psf roof load with no snow above it, light roofing and no ceiling fixed to the rafters. At 16 in on center, a rafter runs level at most 9 ft in 2×4, 13 ft 6 in in 2×6, 17 ft 1 in in 2×8, 20 ft 3 in in 2×10 and 23 ft 10 in in 2×12. Past that, it asks for a deeper board.
Cuts: plumb, seat and tail
Set a speed square on the pitch, or on the angle (26.57° at 6/12): that marks the plumb cut at the ridge. The bird's mouth sits on the wall plate: a seat cut 3 1/2 in long for a 2×4 wall, never deeper than a third of the rafter. The tail is cut plumb or square for the fascia.
Cut one rafter as a pattern, test it at both ends of the ridge, then copy it.
Common mistakes
Using the full span as the run: each rafter covers half of it.
Measuring the overhang along the slope: type it level, past the wall.
Forgetting the ridge board: a 1 1/2 in ridge shortens each rafter by 3/4 in of run.
Counting one side only: a gable roof has two.
Choosing rafter size by length alone: the span table of the code sets it, with the snow load. Check the snow load calculator.
From rafters to the roof
Need the pitch from a rise and run, or the roof area? Use the roof pitch calculator. Sheathing comes next: the plywood calculator. Then the covering: shingles with the roofing calculator, or panels with the metal roofing calculator, and the gutter calculator for the eaves. Walls first? The stud calculator.
FAQ
How long is a rafter for a 24 foot span?
At 6/12 with a 1 1/2 in ridge board: 13 ft 4 1/8 in from the ridge to the seat cut, 14 ft 5 5/8 in with a 12 in overhang. Buy 16 ft boards.
How do you calculate rafter length?
Half the span, minus half the ridge board, plus the overhang, times the pitch multiplier √(1 + (rise ÷ 12)²).
How many rafters do I need?
The building length in inches divided by the spacing, plus one, for each side. 40 ft at 16 in on center: 31 per side, 62 in all.
What is standard rafter spacing?
16 in on center on most houses, 24 in on center with trusses or lighter roofs, and 12 in under heavy snow loads.
How high is the ridge of a 24 foot span at 6/12?
6 ft above the top of the walls: half the span, 12 ft, times 6 ÷ 12. The top of the ridge board sits higher by the rafter depth above the seat cut.
What angle is a 6/12 rafter cut?
26.57°: set a speed square on 6 or on 26.57 for the plumb cut.
Guides
Related tools
Add this calculator to your site
Free for any website. Paste this code into an HTML block where the calculator should appear.