Rafter Length Calculator
Line length, ridge deduction, tail, birdsmouth and the ridge-board depth, from your span and pitch.
By Marko Visic, BSc Physics · Updated November 25, 2026
Measure the overhang level, from the outside of the wall to the outside of the rough fascia; enter 0 for no fascia.
per foot of run = √(144 + 6²) = 13.416408 in; slope factor √(144 + 6²) ÷ 12 = 1.118034
run (half the span) 24 ÷ 2 = 12 ft; theoretical = 12 × 13.416408 = 160.9969 in (13 ft 5 in); less half the ridge, (1.5 ÷ 2) × 1.118034 = 0.8385 in along the rafter, so 160.9969 − 0.8385 = 160.158 in
= (12 − 0) × 1.118034 = 13.416 in along the slope: the projection, the level overhang less the rough fascia, times the slope factor[1]
line length + tail = 160.158 + 13.416 = 173.574 in (plumb-cut tail)
plumb cut at the wall = 7.25 × 1.118034 = 8.106 in.[4] The seat is cut to the shallower of the plate, 5.5 × 6 ÷ 12 = 2.75 in, and the 2024 IRC's D/4 notch, 7.25 ÷ 4 × 1.118034 = 2.0264 in: seat depth 2.026 in, set by the 2024 IRC's D/4 notch limit (Figure R802.7.1.1).[2][4] Seat length (bearing) 2.0264 × 12 ÷ 6 = 4.05 in meets the 1 1/2 in bearing on wood (R802.6).[2] Height above the plate 8.1057 − 2.0264 = 6.079 in; notch square to the edge 2.0264 ÷ 1.118034 = 1.8125 in = D/4, the code limit.
the plumb cut must rest fully on the ridge: plumb 7.25 × 1.118034 = 8.106 in, so the smallest PS 20 board that covers it is a 2x10 (9.25 in deep)[4]
set the unit rise 6 on the tongue and 12 on the blade, then mark the plumb cut along the tongue and the seat cut along the blade[1]: the pitch angle is atan(6 ÷ 12) = 26.57°
The seat is cut to the 2024 IRC's D/4 notch limit at the bearing.[2] The tool models a wood plate; a seat on masonry or concrete needs 3 in of bearing (R802.6).[2] See minimum roof pitch for coverings by slope.
A rafter length calculator turns a span and pitch into a cut list. This one finds the line length along the rafter, subtracts half the ridge board, adds the sloped tail, and lays out the birdsmouth to the 2024 IRC's D/4 notch limit, with the smallest ridge board the plumb cut needs.[2] Every number shows its equation. It lays a rafter out; it does not size one.

Drawing: CalculateMyRoof · CC BY 4.0 · How to reuse
How the layout works
For a common rafter the unit run is always 12 in, so a foot of run carries a line length of √(144 + rise²) inches, the bridge measure.[1] The slope factor is the unit line length ÷ 12. The theoretical line length is the run in feet times the unit line length, measured from the outside edge of the wall plate to the center of the ridge; for a gable the run is half the span.[1] A shed rafter is laid out from the outside of the low wall to the outside of the high one; the Navy's total run for it, between its two bird's-mouths, is the span less the top plate on the higher wall, and the tool places the upper bird's-mouth there.[1] At the ridge, each rafter loses 1/2 the ridge thickness, taken level and then along the slope.[1] The tail is the projection, the level overhang less any rough fascia, times the slope factor.[1]
The birdsmouth: the plumb cut at the wall is the rafter depth times the slope factor. The lower the slope, the wider the seat cut, and the U.S. Navy's Builder Basic asks for at least 2 in of stock above it.[1] The 2024 IRC caps the notch at the bearing at D/4[2], measured square to the rafter edge (Figure R802.7.1.1; R802.7.1 sends rafter notches to R502.8.1, whose end-notch limit is D/4[3]), and requires a bearing of at least 1 1/2 in on wood or 3 in on masonry (R802.6)[2]. So the tool cuts the seat to the shallower of the plate width and the D/4 limit; where that leaves too little bearing, it names the smallest PS 20 size that meets both rules. The ridge board must be no shallower than the plumb cut.[2] PS 20 dressed depths (1 1/2 x 3 1/2 in, 1 1/2 x 5 1/2 in, 1 1/2 x 7 1/4 in, 1 1/2 x 9 1/4 in and 1 1/2 x 11 1/4 in) give the rafter depth and the ridge-board choice.[4]
Worked example
A gable at 24 ft span, 6:12, in 2x8 with a 1.5 in ridge and a 5.5 in plate,[4] overhang 12 in, no fascia: unit line length √(144 + 36) = 13.4164 in, slope factor √(144 + 36) ÷ 12 = 1.118034. Theoretical 12 × 13.4164 = 160.997 in; less the ridge deduction (1.5 ÷ 2) × 1.118034 = 0.8385 in, so 160.997 − 0.8385 = 160.158 in (13 ft 4 3/16 in). Tail 12 × 1.118034 = 13.416 in, so the overall plumb-cut length is 160.158 + 13.416 = 173.574 in (14 ft 5 9/16 in). Birdsmouth: plumb 7.25 × 1.118034 = 8.106 in[4]. The seat is the shallower of the plate, 5.5 × 6 ÷ 12 = 2.75 in, and the D/4 notch, 1.8125 × 1.118034 = 2.0264 in → seat depth 2.026 in, set by the D/4 limit.[2] Bearing 2.0264 × 12 ÷ 6 = 4.05 in, above the 1 1/2 in R802.6 minimum; notch 7.25 ÷ 4 = 1.8125 in = D/4[2][4]. The plumb cut is 7.25 × 1.118034 = 8.106 in, so the ridge board is a 2x10.[4]
Common questions
How do I calculate rafter length?
Multiply the run in feet by √(144 + rise²). At 6:12 over a 24 ft span, the run is 24 ÷ 2 = 12 ft and the line length is 12 × 13.4164 = 160.997 in, 13 ft 5 in before the ridge deduction.[1]
How do I lay out a birdsmouth?
Cut the seat to the 2024 IRC's D/4 notch limit at the bearing.[2] For the 2x8 above, plumb 8.106 in; the D/4 notch is 7.25 ÷ 4 = 1.8125 in square to the edge, a seat depth of 1.8125 × 1.118034 = 2.0264 in that gives 4.05 in of bearing, above the 1 1/2 in R802.6 minimum[2][4]. The notch leaves 7.25 − 1.8125 = 5.4375 in of the rafter above the seat, measured square to the edge, against the 2 in of stock the Navy asks for.[1][4]
Rafter length table (line length per foot of run)
The line length a foot of run carries at each pitch, √(144 + rise²) inches, calculated:
| Pitch | Line length per ft of run (calculated) |
|---|---|
| 3:12 | √(144 + 9) = 12.3693 in |
| 4:12 | √(144 + 16) = 12.6491 in |
| 5:12 | √(144 + 25) = 13 in |
| 6:12 | √(144 + 36) = 13.4164 in |
| 7:12 | √(144 + 49) = 13.8924 in |
| 8:12 | √(144 + 64) = 14.4222 in |
| 9:12 | √(144 + 81) = 15 in |
| 10:12 | √(144 + 100) = 15.6205 in |
| 11:12 | √(144 + 121) = 16.2788 in |
| 12:12 | √(144 + 144) = 16.9706 in |
Shed roof rafter calculator
A shed rafter has no ridge: it runs from the low wall to the high one, with a bird's-mouth on each. A 10 ft span at 3:12 in 2x6, overhang 12 in with a 1 1/2 in fascia: unit line length √(144 + 9) = 12.3693 in, slope factor √(144 + 9) ÷ 12 = 1.030776; line length 10 × 12.3693 = 123.693 in (10 ft 3 11/16 in), tail (12 − 1.5) × 1.030776 = 10.823 in (10 13/16 in), overall 123.693 + 10.823 = 134.516 in (11 ft 2 1/2 in), the high end flush with the outside of its wall. The upper bird's-mouth has its heel at the inner edge of the high wall's plate, the Navy's total run for a shed rafter: on 3.5 in plates, (10 × 12 − 3.5) ÷ 12 = 9.708333 ft of run and 9.708333 × 12.369317 = 120.085 in from the lower heel line.[1] The 3 1/2 in plate caps the seat shallower than the D/4 notch, so the seat is the full plate width.[2]
Ridge board, notched tails, and sizing
The 2024 IRC (R802.3) sets the ridge board's minimum size: at least 1 in nominal thick and no shallower than the cut end of the rafter, so the plumb cut rests fully on it.[2] A ridge board works only when ceiling joists or rafter ties hold the walls together; without them, the ridge must be a beam designed to accepted engineering practice and carried at each end by a wall or column.[2]
If you notch the rafter tail, the 2024 IRC (R802.7.1.1) allows it only when at least 3 1/2 in of the rafter remains and the overhang is no longer than 24 in.[2]
Sizing is a separate job. Rafters are sized from the 2024 IRC span tables R802.4.1(1) to (8), with spans measured along the horizontal projection, or from the AWC STJR for other grades, species and loads (R802.4.1). The rafter span calculator looks those spans up for your lumber, spacing and snow load.[2]
Methodology & sources
The layout follows the U.S. Navy's Builder Basic (NAVEDTRA 14043A, chapter 10), read on Nov 20, 2026, with the 2024 IRC's notch, bearing and ridge-board rules and PS 20 dressed sizes. On the framing square, set the unit rise on the tongue and 12 on the blade, then mark the plumb cut along the tongue and the seat cut along the blade.[1] Every build re-runs the engine against hand-worked vectors and the manual's own rafter examples, and a separate check compares each page's printed numbers with the facts before release.
Sources
- [1] U.S. Navy, Naval Education and Training Professional Development and Technology Center. Builder Basic, NAVEDTRA 14043A (October 2010), Chapter 10: Rough Carpentry. p. 10-51, p. 10-62, p. 10-65, p. 10-93, pp. 10-51 and 10-63, pp. 10-51 to 10-52 and 10-57, pp. 10-65 to 10-66. Retrieved Nov 20, 2026. media.defense.gov
- [2] International Code Council. 2024 International Residential Code, Chapter 8: Roof-Ceiling Construction (Oct 2026 version). Sections R802.3, R802.4.1, R802.6, R802.7.1.1. Retrieved Oct 28, 2026. codes.iccsafe.org
- [3] International Code Council. 2024 International Residential Code, Chapter 5: Floors (Oct 2026 version). Sections R502.8.1, R802.7.1. Retrieved Oct 28, 2026. codes.iccsafe.org
- [4] U.S. Department of Commerce, NIST. Voluntary Product Standard PS 20-25, American Softwood Lumber Standard (January 2025). Table 3. Retrieved Oct 28, 2026. nist.gov
Change log: first published November 25, 2026.
Related
- Rafter span calculator
- Roof pitch calculator
- Roof area calculator
- Valley rafter calculator
- Minimum roof pitch
- Trusses vs rafters
- Roof sheathing calculator
By Marko Visic, BSc Physics. Updated November 25, 2026.