A roof engineering monograph
Essay · 6 min read

How to Calculate Rafter Length, Step by Step

Calculate common rafter length from run, rise, and overhang, see a full worked example, and learn how to round up to stock lumber sizes.

RoofHelm Content Team ·
A carpenter wearing protective gear uses a circular saw to cut a length of lumber.
Photo by A D on Pexels
Key takeaways
  • Rafter length equals (run + overhang) multiplied by the roof factor, where roof factor = sqrt(1 + (rise/12)^2).
  • A 12-ft run, a 6:12 pitch, and a 12-inch overhang need a 14.53-ft rafter, which rounds up to a 16-ft stock board.
  • The roof-factor method and the Pythagorean theorem give the identical answer; the roof factor is just a shortcut that bakes the geometry into one multiplier.
  • Real framing also subtracts for the ridge board's thickness and adds a birdsmouth notch at the wall plate, both trimmed from the calculated length.
  • Lumber ships in fixed stock lengths, so a calculated rafter length almost always rounds up, and the leftover gets trimmed on site.

Order a rafter too short and the whole cut list is wrong; order it needlessly long and you are paying for wasted lumber on every board. The fix is a short formula that converts a horizontal floor-plan measurement into the true, sloped length of the board you need to buy. This guide walks through that formula with a full worked example that matches the rafter length calculator exactly, covers the ridge and birdsmouth deductions a framer applies on site, and gives a stock-lumber table so you know which board to actually order.

The Rafter Length Formula (Roof Factor Method)

A common rafter runs from the top plate of an exterior wall up to the ridge, usually with some overhang past the wall. Three inputs drive the length: run, the horizontal distance in feet from the wall to the center of the ridge; rise, the pitch expressed as inches of vertical rise per 12 inches of run; and overhang, the horizontal distance in inches the rafter extends past the wall to form the eave.

The roof factor converts a flat horizontal distance into the true sloped length: roof factor = sqrt(1 + (rise/12)^2). Multiply the total horizontal distance, run plus overhang converted to feet, by that roof factor, and you get the rafter's actual length along its top edge: rafter length (ft) = (run + overhang in ft) x roof factor.

The Pythagorean Theorem Method (Same Answer, Different Route)

If you learned rafter framing from an older carpentry text, you may know this as a right-triangle problem instead. The horizontal run (plus overhang) forms one leg of a right triangle, the vertical rise over that same distance forms the other leg, and the rafter itself is the hypotenuse. The Pythagorean theorem says hypotenuse = sqrt(horizontal² + vertical²), which produces the exact same result as the roof factor method once you work through the algebra, because the roof factor is really just sqrt(horizontal² + vertical²) divided by the horizontal distance, precomputed as a single multiplier. Framers favor the roof factor shortcut because it turns a two-step triangle calculation into one multiplication.

Worked Example, Step by Step

Take a run of 12 ft, a 6:12 pitch, and a 12-inch overhang. First, find the roof factor: rise/12 = 6/12 = 0.5, so roof factor = sqrt(1 + 0.5²) = sqrt(1.25) = 1.118.

Next, convert the overhang to feet: 12 inches = 1 ft. Add that to the run: 12 ft + 1 ft = 13 ft of total horizontal distance.

Finally, multiply by the roof factor: 13 ft x 1.118 = 14.53 ft. That is the true, sloped length of the rafter from the ridge cut to the tip of the overhang, measured along the top edge of the board. Since lumber does not come in a 14.53-ft stock length, this rounds up to a 16-ft board, the next size up in the standard lumber-yard lineup.

Ridge Board Deduction and the Birdsmouth Cut

The formula above measures from the theoretical center point of the ridge, but in real framing the rafter stops short of that point by half the ridge board's actual thickness, since the rafter butts against the side of the ridge board rather than passing through its centerline. On a 1.5-inch-thick ridge board, that is a 0.75-inch deduction at the top cut, small but worth accounting for before you make the first cut on an expensive board.

At the bottom end, most rafters get a birdsmouth cut, a notch removed where the rafter crosses the top plate of the wall, so the rafter sits flush and level on the plate instead of just resting on its point. The birdsmouth does not change the calculated rafter length itself, since it is cut into the board rather than added past its end, but it does reduce the rafter's effective structural depth at that point, which is one reason framers keep birdsmouth notches shallow, generally no more than a third of the rafter's depth.

Rounding Up to Stock Lumber Lengths

Dimensional lumber ships in standard lengths, and a calculated rafter length almost never lands exactly on one of them. The practical rule is simple: always round up to the next stock length, never down, and plan to trim the excess on site once the rafter is test-fit. The table below shows the standard stock lengths and roughly how much gets trimmed off when a calculated length falls just under each one.

Do You Measure Rafter Length Along the Top or the Bottom?

Along the top edge. The calculated rafter length in this guide, and in the calculator, measures the top (or 'plumb') edge of the board from the ridge cut to the tip of the tail, which is the standard reference line framers use for layout and for ordering material. The bottom edge of the same board is technically a hair shorter once the seat cut for the birdsmouth is factored in, but that difference is handled during the on-site cut, not during the material takeoff.

How Much Overhang Should a Rafter Have?

Most residential eaves run 12 to 24 inches of overhang, chosen for a mix of rain protection at the wall, shade control, and architectural style. Homes in wet climates often push toward the longer end to keep water off siding and foundations; homes in wildfire-prone regions sometimes shorten overhangs or box them in to reduce ember exposure. Whatever value you pick, plug it into the rafter length calculator in inches along with your run and pitch to see the exact effect on total board length.

A longer overhang also changes the rafter's structural behavior slightly, since it extends the board past its support point at the wall plate. Most residential overhangs are short enough that this cantilever effect is negligible for standard lumber sizes, but an unusually long overhang, well past 24 inches, is worth checking against a span table or an engineer's input rather than assuming a standard rafter size will carry it without added support.

Accounting for Waste and a Cutting Buffer

The stock-length table above assumes a clean cut with no defects, but real lumber has crowns, knots, and the occasional warped board that will not yield a full-length usable rafter. Most framers order a small buffer, commonly 5 to 10 percent extra boards, on top of the exact count needed, specifically to cover culled boards and mistakes without a mid-job supply run.

It is also worth ordering the next stock size up rather than cutting it unusually close. A calculated length of 15.9 ft technically fits under the 16-ft stock board with only 0.1 ft to spare, which leaves almost no room for a crowned or slightly warped board to still yield a clean, square-cut rafter. Framers commonly treat anything within an inch or two of a stock length as a signal to size up, both for cutting room and because lumber lengths themselves carry a small manufacturing tolerance.

Once you have your rafter lengths, the next decision on many projects is whether to stick-frame with cut rafters at all or switch to prefabricated trusses. See rafter vs truss for a full comparison on cost, lead time, and attic space, or head to the roof truss calculator if you have already decided trusses are the better fit.

If Your Calculated Length Is...Order This Stock LengthApprox. Waste to Trim
Up to 8.0 ft8 ftUnder 1 ft
8.01-10.0 ft10 ftUnder 2 ft
10.01-12.0 ft12 ftUnder 2 ft
12.01-14.0 ft14 ftUnder 2 ft
14.01-16.0 ft16 ftUnder 2 ft
16.01-18.0 ft18 ftUnder 2 ft
18.01-20.0 ft20 ftUnder 2 ft
20.01-24.0 ft24 ftUnder 4 ft
Stock lumber lengths and typical waste when rounding up a calculated rafter length
Run the numbers

Get your design roof snow load in seconds with the free ASCE 7-22 calculator.

Open the calculator

Frequently asked

01Why not just order the exact 14.53-ft length?+

Lumber mills cut and ship dimensional boards in fixed standard lengths, typically 8, 10, 12, 14, 16, 18, 20, and 24 ft. A calculated length that falls between two stock sizes has to round up to the next available board, with the extra trimmed off on site.

02Does rafter length change on a hip roof instead of a gable?+

Yes. The common rafter formula in this guide covers the simplest case: a rafter running square to the wall on a gable roof. Hip and valley rafters run at a diagonal and use a different, longer geometry, since they span the corner of the building rather than the flat run.

03What if my ridge beam is thicker than a standard ridge board?+

Subtract half the ridge beam's actual thickness from your calculated rafter length at the top cut. A thicker engineered ridge beam, common on open-concept designs without interior load-bearing walls, takes a bigger bite out of the rafter length than a standard 1.5-inch ridge board.

Sources

  1. 1. APA: The Engineered Wood Association
  2. 2. National Association of Home Builders (NAHB)
  3. 3. International Code Council (ICC)

Related