Rafter length calculator
Common rafter length from span and pitch — line length, rise, overhang tail, and the stock length to cut it from. With the ridge-board deduction and the birds-mouth bearing most calculators leave out.
01 How the math works
A common rafter is the hypotenuse of a right triangle. The horizontal run and the vertical rise are the two legs; the rafter is the slope. For a symmetric gable, the run is half the building span — but before you multiply anything, you deduct half the ridge-board thickness from that run, because the rafter's plumb cut lands on the face of the ridge, not its centerline.
adjusted run = span ÷ 2 − (ridge thickness ÷ 2)
line length = adjusted run × pitch factor
total rise = adjusted run × (rise ÷ run)
overhang tail = overhang × pitch factor
Pitch is written rise-in-12: a 6/12 roof rises 6 inches for every 12 inches of run. That ratio is unitless, so the pitch factor is the same whether you work in feet or metres — only the span, overhang, and ridge thickness carry units. The overhang is a second, separate diagonal added at the same pitch factor, which is why a deep eave adds more rafter than its horizontal projection suggests.
02 Worked example
Take a 24 ft span gable at 6/12 pitch, cut from 2×8 stock, with a 12 in overhang over a nominal 2× ridge board (1.5 in thick). In metric that's a 7.32 m span, 305 mm overhang, 38 mm ridge.
Half the span is 12 ft. Deduct half the ridge thickness — 3/4 in (19 mm) — and the run is 11.9375 ft (3.64 m). The 6/12 pitch factor is 1.1180, so the rafter line length from ridge to birds-mouth is 13.35 ft (4.07 m), the total rise is 5.97 ft (1.82 m), and the 12 in overhang adds another 13.42 in (0.34 m) of tail.
Total rafter: 14.46 ft (4.41 m). That comes off a 16 ft stick, with enough waste at the ends to cut the plumb and tail angles. Skip the ridge deduction and the rafter comes out 0.84 in long — small, but at both plumb cuts it's the difference between the ridge closing tight and a gap you fill with caulk.
03 When this calculator is wrong
The line length above is measured along the rafter's top edge — the theoretical framing line. Real rafters carry cuts that this single number doesn't place for you, and a couple of them move material.
- The ridge deduction is per rafter, and it assumes a symmetric ridge. Each side loses half the ridge thickness. For a nominal 2× ridge (1.5 in / 38 mm), that's 3/4 in of run and about 0.84 in of rafter at 6/12. Frame with a 1-3/4 in LVL ridge instead and the deduction grows — measure the ridge you're actually using, not the nominal.
- The birds-mouth needs real bearing. The IRC calls for a minimum of 1.5 in (38 mm) of bearing on wood or metal, and 3 in (76 mm) on masonry or concrete (R802.6). The seat cut has to be at least that deep, and cutting it deeper to gain bearing removes rafter depth over the plate — the notch and the bearing trade against each other. Subject to local code.
- It gives the line length, not the shortened rafter face. The plumb cut at the ridge and the heel cut at the birds-mouth are measured off the framing line; the actual board is a hair longer end to end because the cuts sit at an angle. Cut to the line marks, not to the overall length.
- Pitch has to be exact. A rafter cut for 6/12 on a wall that was framed at 5.5/12 will not sit. Confirm the pitch on the actual structure before you cut a stack of rafters — the pitch factor is unforgiving, and a wrong pitch is wrong on every rafter at once.
04 What to do with the result
Cut one rafter to the line marks, set it in place, and check the ridge plumb cut and the birds-mouth seat against the real structure before you cut the rest. A test rafter costs one board; a miscut stack costs the whole order. Once it fits, use it as the pattern — mark and cut the rest from it rather than re-measuring each one.
Order rafters at the 16 ft stock length from the example, not the bare 14.46 ft — the extra foot-plus is the waste at the plumb and tail cuts, and buying to the exact length leaves nothing to cut the angles from. If the total rafter runs past 20 ft, there's no standard stick for it; that's a splice, an engineered ridge beam, or a special order, and it's worth a second look at the design before you buy.
05 Common questions
- How do you calculate rafter length from span and pitch?
- Take half the span as the run, deduct half the ridge-board thickness, then multiply by the pitch factor √(run² + rise²) ÷ run. At 6/12 the factor is 1.1180. Add the overhang tail — the overhang times the same factor — for the full board length.
- Do you subtract the ridge board from the rafter run?
- Yes. Deduct half the ridge thickness from the run on each side, because the rafter's plumb cut meets the face of the ridge, not its center. For a nominal 2× ridge that's 3/4 in (19 mm) of run — about 0.84 in of rafter at 6/12. Most online calculators skip this step.
- How much bearing does a rafter need at the birds-mouth?
- The IRC requires at least 1.5 in (38 mm) of bearing on wood or metal and 3 in (76 mm) on masonry or concrete (R802.6). The horizontal seat cut of the birds-mouth is what provides it. Subject to local code.
- What length of lumber do I need for a rafter?
- Round the total rafter length — line length plus overhang tail — up to the next standard mill length: 6, 8, 10, 12, 14, 16, 18, or 20 ft. The example's 14.46 ft rafter comes from a 16 ft stick, leaving stock for the angled end cuts.
- Does the overhang change the rafter length?
- It adds to it. The tail is a separate diagonal at the same pitch factor, so a 12 in horizontal overhang at 6/12 adds 13.42 in of rafter, not 12. A deeper eave adds proportionally more.