
Home / Rafter length
Rafter length calculator
Enter the span of the building, the pitch, the overhang and the thickness of the ridge board. The calculator gives the length of a common rafter along its top edge, in feet and inches to the nearest eighth, and the shortest standard board it fits in.
Nothing you type leaves your browser. The numbers are kept on this device so they are still there next time.
The geometry of a common rafter
A common rafter runs from the wall plate up to the ridge at a right angle to both. Its run is half the span, less half the ridge board, because the rafter stops against the face of the ridge. The length is the run multiplied by the slope factor of the pitch, the same factor as on the pitch calculator. The overhang is added the same way: its flat width times the slope factor.
run = 24 ft × 12 / 2 − 1.5 / 2 = 11 ft 11 1/4 in
11 ft 11 1/4 in × 1.1180 = 13 ft 4 1/8 in
12 in × 1.1180 = 1 ft 1 3/8 in
13 ft 4 1/8 in + 1 ft 1 3/8 in = 14 ft 5 5/8 in
The result is measured along the top edge, from the plumb cut at the ridge to the end of the tail, before the seat cut (the bird's mouth) and the tail cut are laid out. Framers then mark those cuts with a framing square or a speed square set to the pitch.
Rafter length by span and pitch
Total length along the top edge, with a 12 inch overhang and a ridge board 1 1/2 inches thick:
| Span | 4 in 12 | 6 in 12 | 8 in 12 | 12 in 12 |
|---|---|---|---|---|
| 12 ft | 7 ft 3 3/4 in | 7 ft 9 1/8 in | 8 ft 4 in | 9 ft 9 3/4 in |
| 16 ft | 9 ft 5 in | 9 ft 11 7/8 in | 10 ft 8 7/8 in | 12 ft 7 5/8 in |
| 20 ft | 11 ft 6 3/8 in | 12 ft 2 3/4 in | 13 ft 1 3/4 in | 15 ft 5 5/8 in |
| 24 ft | 13 ft 7 5/8 in | 14 ft 5 5/8 in | 15 ft 6 5/8 in | 18 ft 3 1/2 in |
| 28 ft | 15 ft 9 in | 16 ft 8 3/8 in | 17 ft 11 3/8 in | 21 ft 1 1/2 in |
| 32 ft | 17 ft 10 1/4 in | 18 ft 11 1/4 in | 20 ft 4 1/4 in | 23 ft 11 1/2 in |
Choosing the board length
Lumber is stocked in lengths that step by 2 feet. The calculator names the shortest length from 8 to 24 feet that holds the rafter, before any allowance for a damaged end. For longer rafters, ask a lumber yard about longer stock or engineered lumber.
Not a structural size
This page gives a length only. Whether a rafter should be a 2 by 6, a 2 by 8 or something else, how far apart rafters go and how they are tied together depend on the span, the snow and wind loads of the area, the wood species and grade, and the span tables of the building code. Those questions belong to the code that applies where you live and to a designer or engineer. Hip, valley and jack rafters follow other rules and are not covered here.
Questions
Is the span measured to the outside of the walls?
Yes, from the outside of one wall plate to the outside of the other, the way the rafters bear on them.
What if there is no ridge board?
Type 0. The rafters then meet at the center line, as with some ridge beams or trusses.
Why is my rafter longer than the table?
The overhang adds length. Type 0 for the overhang to see the rafter to the wall only.
Does it work for a shed roof?
Yes: type twice the horizontal distance the rafter covers as the span and 0 for the ridge.
Other calculators
Sources
- NIST Handbook 44 (2026), Appendix C: General Tables of Units of Measurement
- USDA Forest Products Laboratory, Wood Handbook: Wood as an Engineering Material (FPL-GTR-282)
Figures checked on 2026-12-03. Page updated 2026-12-03.