Cut one rafter wrong and you cut them all wrong. Enter your building width, roof pitch and overhang and this calculator gives you the common rafter length to the tail, the length without overhang, the plumb-cut angle and the number of rafters the roof needs.

Rafter Length Calculator

Common rafter length (with overhang), the plumb-cut angle, and how many rafters the roof needs.

0 rafter length, incl. overhang
0
Rafter length without overhang
0
Rafters needed (both sides, gable)
0°
Plumb cut angle
0
Ridge board length

The length shown is the rafter’s line length from the ridge to the tail, measured along the slope. It does not deduct the ridge board thickness — for a 1.5-inch ridge, each rafter is shortened by half the ridge thickness measured along the slope (about 0.84 in at 6/12) when you lay out the plumb cut. Always lay out and test-cut one rafter, then use it as the pattern for the rest.

How Rafter Length Is Figured

A common rafter only covers half the building: its run is half the span. Multiply that run by the pitch’s length factor and you get the rafter’s line length. The factors come straight from the Pythagorean theorem — for a 6/12 pitch, each 12 inches of run needs √(12² + 6²) = 13.42 inches of rafter. The overhang is added to the run before the same multiplication, because the tail follows the same slope.

The Formulas

Run = Span ÷ 2. Rafter length (no overhang) = Run × √(1 + (Pitch ÷ 12)²). Rafter length (with overhang) = (Run + Overhang) × √(1 + (Pitch ÷ 12)²). Plumb-cut angle = arctan(Pitch ÷ 12). Rafters per side = (Roof length in inches ÷ Spacing) rounded up, plus 1 — doubled for both sides of a gable roof.

Rafter Length Chart (per foot of run)

PitchRafter length per 12 in runPlumb cut angle
3/1212.37 in14.0°
4/1212.65 in18.4°
5/1213.00 in22.6°
6/1213.42 in26.6°
8/1214.42 in33.7°
10/1215.62 in39.8°
12/1216.97 in45.0°

Worked Example: A 24-Foot-Wide Building at 6/12

Half the span is a 12-foot run (144 inches). At 6/12 the factor is 1.118, so the rafter to the wall line is 144 × 1.118 = 161 inches — 13 ft 5 in. Add a 12-inch overhang on the same slope: (144 + 12) × 1.118 = 174.4 inches — 14 ft 6.4 in of rafter from ridge to tail. At 16 inches on center along a 40-foot building, each side needs 31 rafters, 62 in total.

Layout Notes From the Framing Square

Two things the bare length does not include: the ridge deduction (each rafter stops half a ridge-thickness short of the centerline) and the birdsmouth, the notch that sits on the wall plate — the seat cut is usually the wall’s full thickness, 3.5 inches for a 2×4 wall. Neither changes the line length you order lumber by, but both change where the cuts land. Cut one rafter, test it at both ends of the building, and only then gang-cut the rest from it as a pattern.

Frequently Asked Questions

How long is a rafter for a 6/12 pitch?

13.42 inches for every 12 inches of horizontal run — so a rafter with a 12-foot run measures 13 ft 5 in to the wall line, plus whatever overhang you add on the same slope (a 12-inch overhang makes it 14 ft 6.4 in).

Does rafter length include the overhang?

It can, and this calculator shows both numbers: the length to the wall line (no overhang) and the full length to the tail with your overhang included. Order lumber by the full length, rounded up to the next even foot — a 14 ft 6 in rafter comes out of a 16-foot board.

What size lumber do I need for my rafters?

Length is only half the question — the rafter’s depth (2×6, 2×8, 2×10…) is set by span tables in the building code, based on species, grade, spacing and snow load. This calculator gives the cut length; check the span table for your area before choosing the depth, and when in doubt go one size up.

How many rafters do I need?

Divide the building length by the spacing and add one for the starting end, per side. A 40-foot building at 16 inches on center: 480 ÷ 16 = 30 spaces, +1 = 31 rafters per side, 62 for a gable roof. Gable-end (fly) rafters and barge rafters are extra.

What is the ridge deduction?

Rafters meet the ridge board, not the centerline — so each rafter is shortened by half the ridge board’s thickness, measured along the slope. For a standard 1.5-inch ridge at 6/12 pitch, that is about 0.84 inches off the plumb cut. Small, but if you skip it the roof plane waves at the peak.

Related Calculators

Pitch first: the Roof Pitch Calculator finds it from any rise and run. Lumber for the whole job: the Board Foot Calculator totals it, and all framing tools live on the Framing & Lumber calculators page.