As an Amazon Associate I earn from qualifying purchases.
Halve the building width to get the run, multiply the run by the pitch ratio for the rise, then take the square root of run squared plus rise squared. A 24-foot span at 6/12 gives a 13.42-foot common rafter, before you add the overhang.
The Rafter Length Calculator gives you the numbers you actually cut to: the common rafter body length from the ridge to the wall plate, the overhang tail, the total board length, the run and rise, the plumb and seat cut angles, the maximum birdsmouth depth, and the diagonal hip rafter length for four-sided roofs. Enter the building span, the roof pitch, the overhang, the ridge board thickness and your rafter depth, and the tool applies the pitch multiplier — the square root of one plus rise over twelve squared — to the run to get the sloped length, then deducts half the ridge thickness. Rafter span is horizontal, not sloped, which is the single most common mistake in DIY framing. Add the roof length and spacing and you also get the rafter count and total lineal feet of lumber to order. Pair it with the Rafter Span Chart to confirm your lumber size carries the span, and with the Roof Truss Calculator if trusses are the better route.
Rafter length is the hypotenuse of the triangle formed by the half-span and the rise. Measure the building width, halve it, apply the pitch, and the rafter length falls out — then add the overhang.
| Building width | 4/12 | 6/12 | 8/12 | 10/12 | 12/12 |
|---|---|---|---|---|---|
| 20 ft | 10.5 | 11.2 | 12 | 13 | 14.1 |
| 24 ft | 12.6 | 13.4 | 14.4 | 15.6 | 17 |
| 28 ft | 14.8 | 15.7 | 16.8 | 18.2 | 19.8 |
| 32 ft | 16.9 | 17.9 | 19.2 | 20.8 | 22.6 |
| 36 ft | 19 | 20.1 | 21.6 | 23.4 | 25.5 |
| 40 ft | 21.1 | 22.4 | 24 | 26 | 28.3 |
Add the overhang to each figure: a 16-inch overhang adds 1.33 feet to the rafter, and a 24-inch overhang adds 2 feet. Add the same amount to both sides.
| Building width | 4/12 | 6/12 | 8/12 | 10/12 | 12/12 |
|---|---|---|---|---|---|
| 20 ft | 3.3 | 5 | 6.7 | 8.3 | 10 |
| 24 ft | 4 | 6 | 8 | 10 | 12 |
| 28 ft | 4.7 | 7 | 9.3 | 11.7 | 14 |
| 32 ft | 5.3 | 8 | 10.7 | 13.3 | 16 |
| 36 ft | 6 | 9 | 12 | 15 | 18 |
| 40 ft | 6.7 | 10 | 13.3 | 16.7 | 20 |
Set out one rafter, cut it, and offer it up before cutting the rest. A quarter-inch error at the seat cut becomes a visible sag along a 40-foot ridge once it is repeated twenty times. Use the first rafter as the pattern for every other common rafter, and mark it as the pattern so it does not get nailed in and lost.
Halve the building width to get the run, multiply by the pitch ratio for the rise, then take the square root of run squared plus rise squared. Add the overhang to that figure.
The common rafter length calculated from the span does not. Add the overhang separately — a 16-inch overhang adds 1.33 feet, a 24-inch overhang adds 2 feet.
The notch cut into the rafter where it sits on the wall plate, made of a level seat cut and a vertical heel cut. It sets the bearing and it is why the raw hypotenuse length is not the finished rafter.
Yes. Half the ridge board thickness comes off the top of each rafter, so a 1½ inch ridge takes ¾ inch off each side.
Spanning the ceiling below? See the ceiling joist span chart, from IRC Tables R802.5.1(1) and (2).
Framing the whole roof? The roof framing calculator counts every rafter pair and sizes the ridge board, collar ties and ceiling joists.
Tying the rafters together? The collar tie calculator gives the upper-third height, tie length and spacing from IRC R802.4.6.
Framing a hip roof? The hip rafter calculator gives the hip length, every jack rafter length and the side cuts.
Seating the rafter on the wall? The birdsmouth calculator gives the seat cut, heel cut and height above plate, and checks the one-third depth rule.
For a barn roof with a steep lower and shallow upper slope, the gambrel roof calculator adds both rafter segments for you.
Framing with rafters or ordering trusses? See truss vs rafter.
Need the pitch first? The roof pitch calculator shows how to measure it from the attic and gives the rafter multiplier for every pitch.
Need the whole roof at once? The free roofing calculator works out roof area, squares, shingle bundles, underlayment, drip edge, ridge cap and installed cost from one set of measurements.