Rafter Length Calculator & Roof Framing Guide

Find the exact rafter length from your run and roof pitch, add the eave overhang, count rafters for both sides, and estimate the board feet of lumber you need.

📋 What's on this page: Use the free calculator above to get the rafter line length, the total length with overhang, the total rise, the rafter count, and the lumber volume. Then scroll down for the full guide, the rafter triangle explained, a pitch multiplier chart, a worked example, birdsmouth cut rules, span-by-size tables, and 7 rafter mistakes that cost you time and wood.

Rafter Length Calculator

Enter run, pitch, overhang and roof length to find length, rise, count & lumber

Inputs

Half the building width for a gable roof.

Rise in inches per 12 inches of run.

Horizontal distance the roof extends past the wall.

Length along the ridge, for counting rafters.

Results

13.42 ft
Rafter Length (ridge to wall)
14.53 ft
Total Length (with overhang)
6 ft
Total Rise
62
Rafters Needed (both sides)
901 bd ft
Lumber Required

How to Use This Rafter Length Calculator

Enter the rafter run in feet (half the building width for a simple gable roof), the roof pitch as rise over 12, the eave overhang in inches, and the roof length along the ridge. Pick the rafter spacing and lumber size, and the calculator returns the rafter line length from ridge to wall, the total length including the overhang tail, the total rise, the number of rafters for both sides of the roof, and the board feet of lumber to order.

The math behind each result, where run is R, pitch is P, and overhang is O in feet:

  • Pitch multiplier = √(P² + 12²) ÷ 12
  • Rafter length = R × multiplier
  • Total length = (R + O) × multiplier
  • Total rise = R × P ÷ 12
  • Rafters per side = roof length in inches ÷ spacing, rounded up, plus 1
  • Board feet = rafter count × total length × (thickness × width ÷ 12)

The Rafter Triangle: Run, Rise, and Length

Every rafter is the hypotenuse of a right triangle. The run is the horizontal distance from the outside face of the wall to the centerline of the ridge. The rise is the vertical distance the roof climbs over that run. The rafter length is the third side, always the longest, and it comes straight from the Pythagorean theorem: rafter length = √(run² + rise²).

Builders work from the pitch instead of the rise, because the pitch states the rise for a fixed 12-inch run. A 6/12 roof rises 6 inches for every 12 inches of run. From the pitch you can compute the rise for any run: rise = run × pitch ÷ 12. For a 12-foot run at 6/12, the rise is 6 feet, and the rafter length is √(144 + 36) = √180 = 13.42 feet. The calculator does this conversion internally, so you never have to square anything by hand.

Pitch Multiplier Chart

The pitch multiplier is the factor that converts horizontal run into sloped rafter length in one step. It equals √(pitch² + 144) ÷ 12 and it is fixed for every pitch, which is why the same number appears on rafter tables and speed squares across the country.

PitchMultiplierPitchMultiplier
2/121.0148/121.202
3/121.0319/121.250
4/121.05410/121.302
5/121.08311/121.357
6/121.11812/121.414
7/121.158

Notice how the multiplier accelerates on steep pitches. From 6/12 to 8/12 the rafter grows about 7 percent, but from 10/12 to 12/12 it grows another 9 percent. That is why steep roofs use noticeably more framing lumber and sheathing for the same footprint, and why the rafter length should always be computed, never eyeballed.

Worked Example: A 24-Foot Gable Roof

Take a 24-foot-wide gable roof with a 6/12 pitch, a 40-foot ridge, and a 12-inch eave overhang. The run is 12 feet, half of 24. The multiplier for 6/12 is 1.118. The rafter line length is 12 × 1.118 = 13.42 feet from ridge to wall. The overhang is 1 foot horizontally, so the tail adds 1 × 1.118 = 1.12 feet, and the total board length is 14.53 feet.

You order that rafter from a 16-foot board, which gives you a little extra for the plumb cut at the ridge and the fascia cut at the tail. The rise over the full run is 12 × 6 ÷ 12 = 6 feet, which is what you need to know when you set the height of the ridge. For the rafter count, 40 feet at 16-inch spacing is 480 inches divided by 16, or 30 intervals, so 31 rafters per side and 62 total. At about 14.5 feet of board per rafter, that is 62 × 14.53 = 901 board feet for a 2x6, which the calculator reports as the lumber volume.

For a roof that needs more lumber, or a shingle estimate that follows the same slope math, the roof pitch calculator converts the pitch to surface area and the roofing calculator turns that area into squares and bundles.

Adding the Eave Overhang and Tail

The rafter line length from the calculator stops at the outside face of the wall. The roof continues past that line to form the eave, and the horizontal overhang is usually 12 to 24 inches. Because the tail slopes at the same pitch, its length is the horizontal overhang times the multiplier, not the overhang alone. A 24-inch overhang at 6/12 adds 24 × 1.118 ÷ 12 = 2.24 feet of board, so a 13.42-foot line rafter becomes a 15.66-foot board.

The ridge end gets a plumb cut at the pitch angle that seats against the face of the ridge board. If the ridge is a standard 1.5-inch board, the run used for cutting is actually half the ridge thickness short of the centerline. For most residential work the difference is less than an inch and the extra length from rounding up to stock lumber covers it, but it matters on tight, engineered roofs where every fraction of an inch is accounted for.

The Birdsmouth Cut: Depth and Seat

The birdsmouth is the notch cut into the underside of the rafter where it seats on the top plate. It has two parts: the seat cut, which rests flat on the plate, and the heel cut, which is vertical against the outside of the plate. The bearing must be at least 1.5 inches on the top plate, the code minimum for rafter bearing.

The total depth of the notch must not exceed one-third of the rafter's depth. A 2x6 rafter measures 5.5 inches deep, so the birdsmouth can be no deeper than about 1-7/8 inches. Cutting deeper removes too much wood from the rafter at the exact point where the load concentrates over the wall, and it is the classic rafter mistake that turns a sound roof into a structural risk. If the geometry forces a deeper cut, the fix is a larger rafter or a different framing detail, never a deeper notch.

Mark the birdsmouth by holding a framing square at the pitch angle where the rafter crosses the plate, then measure down for the seat cut. The plumb cut at the ridge uses the same angle, which is why a speed square with the pitch scale marked on it can lay out both ends and the birdsmouth without any trigonometry on the roof.

Choosing Rafter Lumber: Span and Spacing

Rafter size is chosen from the horizontal span, not the total rafter length. The load path runs straight down through the rafter to the wall, so the horizontal distance between supports is what stresses the member. The table below lists typical maximum spans for #2 Douglas fir or Southern pine at common spacings, using a 30 psf live load and 20 psf dead load, which is the standard residential combination.

Lumber SizeMax Span @ 16" OCMax Span @ 24" OC
2x610 ft 9 in9 ft 4 in
2x814 ft 2 in12 ft 4 in
2x1017 ft 8 in15 ft 5 in
2x1221 ft 0 in18 ft 3 in

Wider spacing shortens the span the same lumber can cover, because each rafter carries a wider strip of roof. Snow load cuts these numbers further, a roof in a heavy snow region needs a larger member or tighter spacing than the same roof in a mild climate. These tables are a starting point for estimating, always verify against the local building code and the actual grade and species you buy, and have an engineer check any run that lands close to the limit.

How to Count and Order Rafters

For a gable roof, count one side and double it. Rafters sit at 16 or 24 inches on center along the ridge, so divide the roof length in inches by the spacing, round up, and add one for the end rafter. A 40-foot ridge at 16-inch spacing gives 31 rafters per side, 62 total. Add two or three spares for cut errors and for the doubled rafters that frame a gable-end wall, then multiply the count by the total length in feet to get the linear feet of lumber.

The board feet number from the calculator applies the lumber size factor, 1 board foot per foot for a 2x6, 1.33 for a 2x8, and 2 for a 2x12. That is the number the lumberyard prices, so 62 rafters at 14.5 feet of 2x6 is about 901 board feet, and the same roof in 2x8 runs about 1,200 board feet. The framing calculator handles the wall studs and plates below the rafters, and the decking calculator covers the roof sheathing on top.

7 Rafter Mistakes That Cost You

  1. Measuring the run from the wrong point. The run starts at the outside face of the wall, not at the inside of the plate or the center of the building for a single side. Measuring wall-to-wall and using it as the run doubles the rafter length and wastes a full board per rafter. Run is half the span.
  2. Cutting the birdsmouth deeper than one-third the rafter depth. A deep notch removes the wood that carries the roof load right over the wall. Keep the seat cut within one-third of the rafter depth, about 1-7/8 inches for a 2x6, and move the plate or use a bigger rafter if the geometry will not fit.
  3. Ordering lumber by line length and ignoring the overhang. The line length stops at the wall, but the board continues to the eave. Forgetting the tail leaves you a rafter short of the fascia, which is why the total length including the overhang is the number to order.
  4. Mixing up pitch, angle, and slope. A 6/12 pitch is a 26.6-degree angle and a 50 percent slope, three different numbers for the same incline. Entering the angle in degrees where the calculator expects pitch, or reading the wrong scale on a speed square, frames the wrong roof.
  5. Ignoring the ridge board thickness on tight runs. The plumb cut seats against the face of the ridge board, so the actual run is half the ridge thickness shorter than the centerline run. On most houses rounding up to stock lumber covers it, on engineered roofs it does not.
  6. Using span tables for the wrong load. The 30/20 load combination is standard for residential, but snow regions use higher live loads and reduce the spans. Sizing against the wrong table is how a roof sags after the first heavy winter.
  7. Cutting one rafter and copying it without a final check. Pitch and run drift across a real roof, and an error compounds across dozens of copies. Cut the first rafter, test it against the ridge and plate, then use it as the pattern only after it fits.

You Might Also Need

Pair the rafter with the rest of the roof: