Rafter Length Calculator
Rafter length is a hypotenuse, not a subtraction. Enter your span and pitch to get the true slant length, how many rafters you need at 16 inches on center, the ridge board length, and the birdsmouth cuts.
Quick answer
Rafter length is a hypotenuse, not a subtraction: use the square root of (half-span² + rise²).
Half-span is the horizontal run to the ridge. The calculator gives true slant length and rafter count.
Results
Enter your measurements above and press Calculate.
Buy the materials this project needs
WoodCalc gives you the shopping list. Pick the items below to source decking boards, framing lumber, fasteners, and finishes at current prices.
Prices and availability change; we may earn a commission on purchases made through these links.
How this is calculated
- Half span = building span / 2, the horizontal run out to the ridge
- Rise = half span x pitch / 12
- Rafter length = square root of (half span squared + rise squared)
- Cut length = rafter length + overhang / cos(roof angle), because the tail runs down the slope
- Count = span in inches / on-center spacing + 1, for the far end rafter
The overhang is where people lose inches. A 2 ft horizontal tail is 2.24 ft of rafter at 6:12, not 2.00. The steeper the roof, the wider that gap: at 12:12 the same 2 ft tail needs 2.83 ft of stock.
Why the overhang is measured along the slope rather than the horizontal run is explained on how we calculate.
Step by step
- Measure the building span. Measure the outside-to-outside span across the top plates.
- Confirm the roof pitch. Establish the rise per foot of run from the roof surface rather than from a ceiling below.
- Calculate rafter length. Work out the rafter length from the half span, the pitch and the ridge deduction.
- Lay out the plumb and seat cuts. Mark the ridge plumb cut, the birdsmouth seat cut and the tail overhang on the stock.
- Cut one and test fit it. Cut a single rafter, set it in place, and use it as the pattern for the rest before cutting the whole set.
Worked example
A 16 ft span at 6:12 with a 2 ft overhang:
- Half span = 8 ft, rise = 8 x 6 / 12 = 4 ft
- Rafter = square root of (64 + 16) = 8.94 ft
- Tail on the slope = 2 / cos(26.57°) = 2.24 ft
- Cut length = 11.18 ft, so it comes out of 12 ft stock
- Rafters at 16" on center = 192 / 16 + 1 = 13 pieces
- Ridge board = building span = 16 ft
Thirteen pieces at 11.18 ft leaves about 10 inches of waste per rafter from 12 ft stock. Dropping to 10 ft stock would force a splice, which is not allowed on a rafter without an engineered detail, so 12 ft it is.
Where the numbers come from
Rafter length is a hypotenuse, and that is the whole trick. The common error is subtracting rather than triangulating: people take half the span, add the rise, and call it a rafter. That answer is too short by a wide margin on any normal pitch.
The birdsmouth notch does not change the length. It removes material from the underside where the rafter sits on the wall plate, so the measurement stays on the top edge, which is the line that has to line up with the ridge.
The notch depth has a limit, though. Cutting more than a quarter of the rafter depth out of the top edge weakens it exactly where the bending load peaks. On a 2x6 that caps the seat cut at about 1-1/2 inches, which in turn caps how far the rafter can sit down over the plate.
Ridge thickness matters more than it looks. On a 2x ridge the rafters meet on 3/4 inch faces, so each one loses 3/8 inch of run at the top. Skip that adjustment and every rafter comes out slightly long and the ridge sits slightly high.
Common mistakes
- Adding the overhang as if it were horizontal. It follows the slope, so it needs dividing by the cosine of the roof angle.
- Measuring the span to the outside of the walls. Span is wall to wall, and on a gable roof the ridge sits at the midpoint of that distance.
- Cutting every rafter before the first one fits. Cut one, test it against the ridge and the plate, then use it as the pattern.
- Forgetting the ridge board thickness. Half the ridge thickness comes off the run on each side, which shifts the birdsmouth slightly.
- Ignoring the rafter count at the ends. The plus one matters: without it you have a gap at one gable end.
- Buying stock exactly at the cut length. Saw kerf and a squared end eat about two inches. Step up a size whenever the cut length lands within an inch of the stock.
Related reading: roof pitch and rafter basics, roof pitch calculator, and rafter length calculator.
Pro shop tips
- Cut one rafter, test it, then use it as the pattern for the rest. A trial rafter that seats correctly on the ridge and plate is worth more than any calculated number.
- Check your seat cut against the actual wall. Framing lumber is not perfectly straight, and a top plate that bows changes the bearing line more than the math suggests.
- Watch the ridge thickness when you shorten rafters. A 1.5 inch ridge board and a 3/4 inch ridge board deduct different amounts, and mixing them up shortens every rafter.
- Keep the birdsmouth seat level and no deeper than needed. Cutting away more of the rafter to make it sit flat weakens it at exactly the point carrying the load.
- Measure the actual span at several points. The ridge rarely runs perfectly parallel to the plate, and rafters cut to one measurement rarely fit the whole run.
Questions people ask
How do I calculate rafter length?
Rafter length = the hypotenuse of half the span and the rise. Rise = half span × pitch ÷ 12. For a 16 foot span at 6:12, half span is 8 feet, rise is 4 feet, so the rafter is 8.94 feet.
What is a birdsmouth cut?
It is the L-shaped notch where the rafter sits on the wall plate. The vertical leg is the seat cut, the diagonal leg is the plumb bevel. The classic 47.5 degree rule is a memory aid, not a formula — angle the saw to half the roof pitch.
How many rafters do I need?
At 16 inches on center, one rafter every 16 inches plus one at each end. For a 16 foot span that is 26 rafters (both slopes). They go on both slopes, so double it, then add the ridge board separately.
How long should the tail overhang be?
Between 6 and 12 inches is typical for a shingle roof; up to 24 inches for exposed or high-wind areas. Longer overhangs look good but need a stronger rafter tail to resist droop.
Related tools
Before you cut or order
These are planning figures, not a stamped design. The numbers above come from standard nominal lumber sizes and typical loading assumptions, so treat them as a starting point for layout and budgeting. Actual performance depends on species and grade, moisture content, fastener type and spacing, bearing conditions and how the assembly is built on site. Verify every structural number against your local building code and against the span or load table published by the manufacturer of the specific product you are buying, because engineered products vary more than the generic tables suggest. Where loads, spans or attachments fall outside the common cases shown here, have a licensed engineer or your local building department review the design before you build.
WoodCalc is a free independent tool. We may earn a commission when you buy through links on this page. Our recommendations are not influenced by any manufacturer or retailer. See our affiliate disclosure.