Rafter Calculator

v2.0

Find rafter length and cut angle from the horizontal run and roof pitch.

Enter your measurements

Horizontal distance from wall plate to ridge centerline

A 6/12 pitch means 6 inches of rise per 12 inches of run

Note: Structural work, confirm against local code before building.

Results

Rafter length —
Cut angle —
Total rise —
Copied!
Copied!

How to use this calculator

  1. Measure the run, the horizontal distance from the outside of the wall to the center of the ridge.
  2. Find your roof pitch, usually expressed like 6/12 or 8/12. Enter the first number, the rise per 12 inches.
  3. Add an overhang length if your rafters extend past the wall line.
  4. Use the rafter length as your starting board length, then verify the cut angle on site before cutting.

How the calculation works

The rafter forms the hypotenuse of a right triangle, with run as one side and total rise as the other. Total rise equals run times the pitch ratio. Rafter length comes from the Pythagorean theorem, with the overhang added afterward. The cut angle is the arctangent of the pitch ratio.

Common pitchAngle
4/1218.4°
6/1226.6°
8/1233.7°
12/1245.0°

Worked example: a 12 ft run at a 6/12 pitch gives a total rise of 6 ft, for a rafter length around 13.42 ft (161 in) before overhang, at a 26.6° cut angle.

What to measure and common mistakes

Run is half the span, not the rafter length. Run is the level distance from the outer face of the wall to a point directly below the center of the ridge. On a symmetric gable roof it is half of the building width, so a building 24 ft wide has a 12 ft run.

Enter the overhang along the rafter. The overhang field is added straight onto the sloped length, so measure it along the rafter. If your plans give the horizontal overhang, multiply it by the pitch factor first. A 12 inch horizontal overhang at 6/12 is 12 times 1.118, or about 13.4 inches along the rafter.

Use rise per 12, not an angle. The pitch field wants the rise for each 12 inches of run, such as 6 for a 6/12 roof. If you only know the angle, the rise per 12 is 12 times the tangent of the angle, which gives about 6 for 26.6 degrees.

Buy longer than the result. The number is the theoretical length along the top edge from the wall line to the ridge center, plus overhang. The plumb cut at the ridge, the birdsmouth and the ridge board thickness all change the real cut length, so buy rafters longer than the number and cut to your layout.

Rafters, trusses and what this number is for

A rafter roof is framed piece by piece on site. Many newer houses use factory trusses instead, which come sized by the truss maker. This calculator suits stick-framed roofs, sheds, porches and checking a plan. If you are weighing the two approaches, read our guide to rafter vs truss. Either way, member size, spacing and span come from your local code, an engineer or a span table, and not from a length calculator.

Formula and assumptions

Total rise is the run times the rise per 12, divided by 12. The rafter length is the diagonal of the right triangle made by the run and the total rise, with the overhang added afterward. The cut angle is the arctangent of the rise per 12 divided by 12.

The result is for one rafter on one slope. In metric mode, the run is converted from meters and the overhang from centimeters. The cost field multiplies the length in feet by your price per linear foot.

Frequently asked questions

What does roof pitch mean?

Pitch is written as rise over 12, like 6/12, meaning the roof rises 6 inches for every 12 inches of horizontal run. A steeper pitch has a higher first number.

Does this calculator account for the ridge board thickness?

No. This gives the theoretical rafter length from the outside wall line to the ridge centerline. Subtract half the ridge board thickness for an exact cut length, and always confirm with a physical measurement before cutting.

Is this safe to use for a real roof framing job?

Use it for planning and material estimates. Roof framing is structural work, so verify rafter size, spacing, and span against your local building code or a licensed contractor before construction.

Last updated November 30, 2026.