Rafter Length Calculator

A 12-foot horizontal run at 6-in-12 pitch has a 6-foot rise and a theoretical 13.416-foot sloping length, at 26.565 degrees. This reaches the ridge centerline. An actual ridge-board deduction is a horizontal half-thickness projected along the slope; subtracting that thickness directly from the sloping length is incorrect.

Overhang and joinery require separate layout.

Rafter Length Calculator: inputs

Calculated result
Rafter length (feet)13.4
Roof angle (degrees)26.6

Horizontal run and rafter length (feet)

Rafter Length Calculator: Horizontal run and Rafter length (feet)5 calculations vary the “Horizontal run” input while holding the other entered inputs constant.1011.21112.31213.41314.51415.7

Enter the horizontal run of the rafter, half the building width for a common gable roof, in feet, and the roof pitch as rise per 12 inches of run. The rafter length is the square root of the run squared plus the rise squared, where the rise is the run times the pitch over 12. Measure the run from the outside of the wall to the ridge center, and add the overhang separately.

The tool also gives the roof angle.

Framing details such as birdsmouth cuts, ridge boards and hips and valleys change lengths. Real buildings may be out of square, so measure the actual span. Rafter size and spacing must meet the span tables and snow loads.

Roof framing is hazardous work and requires proper safety measures.

Rafter length (feet) from horizontal run

Horizontal run12
Roof pitch (rise per 12)6
Rafter length (feet)13.4
Roof angle (degrees)26.6

Common error: Using the run as the length. The rafter follows the slope, and on a steep roof the difference is large.

Rafter Length: formula

Rafter length = √(run² + (run × pitch ÷ 12)²)

American Wood Council: Span Options Calculator

Rafter Length: changing Horizontal run

Rafter length (feet): assumed Horizontal run scenarios.
Horizontal runRafter length (feet)Roof angle (degrees)
1011.226.6
1112.326.6
12 (example)13.426.6
1314.526.6
1415.726.6

Rafter Length: compare input ranges

Rafter Length Calculator: Rafter length (feet) with each input moved on its own, every other input held at the worked-example value.
InputTested fromToRafter length (feet): low inputRafter length (feet): high inputSwing
Horizontal run111312.314.52.2 (17%)
Roof pitch (rise per 12)4812.614.41.8 (13%)

Rafter Length: individual input comparisons

Rafter Length Calculator: change one input at a time; other values remain at the stated example.
InputValueRafter length (feet)Roof angle (degrees)
Horizontal run1011.226.6
1112.326.6
1213.426.6
1314.526.6
1415.726.6
Roof pitch (rise per 12)212.29.5
412.618.4
613.426.6
814.433.7
1015.639.8

Rafter length (feet): Horizontal run against Roof pitch (rise per 12)

Rafter Length: Rafter length (feet) at combined Horizontal run and Roof pitch (rise per 12) settings.
Horizontal run / Roof pitch (rise per 12)2610
1010.111.213
1111.212.314.3
1212.213.415.6
1313.214.516.9
1414.215.718.2

Rafter Length: values and definitions

Worked-example inputs and the results they produce for the Rafter Length Calculator.
Quantity and definitionValue used
Horizontal run — Horizontal distance from the wall plate to the ridge, in feet.12
Roof pitch (rise per 12) — Roof pitch, in inches of rise per 12 inches of run.6
Rafter length (feet)13.4
Roof angle (degrees)26.6

Horizontal run: half and double

Rafter Length scale comparison; assumed inputs.
Horizontal runRafter length (feet)
66.7
1213.4
2426.8

A rafter runs along the slope of the roof, so it is longer than the horizontal run it covers. For a run of 12 feet at a 6 in 12 pitch, the rise is 6 feet and the length is about 13.4 feet, at an angle of about 26.6 degrees. The result is the length along the roof line, from the ridge to the outer wall, before you add the overhang and subtract for the ridge board.

A steeper pitch lengthens the rafter for the same run.

Add the overhang and account for the ridge and the birdsmouth cut, and cut a test rafter before you cut them all. Lumber comes in fixed lengths.

Convert pitch to angle on the roof pitch and angle calculator, estimate roofing on the roofing calculator, and see the geometry on the right triangle and Pythagorean theorem pages. The stair stringer page uses similar rise and run math, and the board feet calculator prices lumber.

How do I calculate rafter length?

Take the square root of the run squared plus the rise squared, where rise equals run times the pitch divided by 12.

What is a 6-in-12 pitch?

A roof that rises 6 inches for every 12 inches of horizontal run, an angle of about 26.6 degrees.