Roofing & Gutters
Rafter Length Calculator
Enter the building span, the roof pitch, the level overhang past the wall and the thickness of the ridge board. You get the rafter line length, the length with the tail, the angle, the rise at the ridge and the stock length to buy.
Worked example
- Run = half the span minus half the ridge board = 144 - 0.75 = 143.25 in.
- Slope factor for 6/12 = 1.1180; rafter line = 143.25 x 1.1180 = 160.16 in (13 ft 4 3/16 in).
- Overhang 12 in level adds 13.42 in along the slope: 14 ft 5 9/16 in. Lumber comes in even lengths: 16 ft.
Common sizes at a glance
| Size | Rafter length (ridge to wall) | With overhang | Angle |
|---|---|---|---|
| 12 ft span, 4/12 | 6 ft 3 1/8 in | 7 ft 3 3/4 in | 18.4 degrees |
| 20 ft span, 5/12 | 10 ft 9 3/16 in | 11 ft 10 3/16 in | 22.6 degrees |
| 24 ft span, 6/12 | 13 ft 4 3/16 in | 14 ft 5 9/16 in | 26.6 degrees |
| 28 ft span, 6/12 | 15 ft 7 in | 16 ft 8 7/16 in | 26.6 degrees |
| 30 ft span, 8/12 | 17 ft 11 7/16 in | 19 ft 1 7/8 in | 33.7 degrees |
| 32 ft span, 10/12 | 20 ft 8 15/16 in | 22 ft 0 9/16 in | 39.8 degrees |
What the measurements mean
Span is the full width of the building, outside of wall to outside of wall, across the direction the rafters run. Each common rafter covers half of it. The ridge board sits in the middle, so half its thickness comes off the run on each side.
Overhang is measured level, from the face of the wall out to where the tail will be cut. The tool converts that level distance to a length along the slope.
Why the answer comes in sixteenths
Framers lay out rafters with a tape and a square, so the result is in feet, inches and sixteenths. In the example, a 24 ft span at 6 in 12 gives 13 ft 4 3/16 in from the ridge to the wall line, and 14 ft 5 9/16 in with a 12 in overhang.
Cut one rafter, test it in place at both ends, and use it as the pattern for the rest. Small errors in the first one repeat on every copy.
Buying the right stock length
Dimensional lumber is sold in 2 ft steps, so the tool rounds up to the next even length. Allow for the plumb cut at the ridge and the tail cut, which eat a few inches. A 14 ft 5 in rafter needs a 16 ft board.
For the full framing order, the lumber calculator counts boards by length, and the board foot calculator helps if your yard prices by the board foot.
- Long spans and steep pitches can push you past common stock lengths
- Crowned boards go crown up
- Order a few extra for split ends and twisted pieces
Length is geometry, size is engineering
This page measures the length of a rafter. It does not pick the board size, spacing or grade, which depend on snow load, roof weight and span. Those come from span tables in the local building code, and the local building code and a licensed professional have the final word on any roof framing.
To check the angle or area factor on its own, use the roof pitch calculator.
Questions
How long is a rafter for a 28 ft wide house at 6/12?
With a 1.5 in ridge board, about 15 ft 7 in from ridge to wall, and 16 ft 8 7/16 in with a 12 in overhang, per the common sizes table.
Does the length include the bird's mouth?
The ridge-to-wall length runs to the outside wall line, where the seat cut sits. The bird's mouth is laid out at that point, not added to the length.
Can I use this for a shed roof?
For a single slope, enter twice the actual span and leave the ridge board at zero, since the rafter runs the whole width.
How this works: formulas and typical values are listed on our method page; every data source and its license is on sources.
Last reviewed November 2026.