This page is running inside a frame that blocks outside connections. Open aerialquote.com directly.
Get a price Design a deck Calculators Animations Our dataset Guides For pros

Rafter length calculator

Find the length of a common rafter from the width of the building and the roof pitch. You also get the plumb and seat cut angles, the rise at the ridge and the roof area, and the roof redraws as you change the pitch.

Your roof

Units

Width is measured from the outside of one wall to the outside of the other. Length is measured along the top edge of the rafter, from the center of the ridge to the plumb cut at the tail.

A bare number means feet (the tail: inches). A typed unit always wins: 24'6", 24 ft 6 in, 12 in, 7.2 m and 300 mm also work.

Cut list

0rafter length to cut (top edge, ridge to tail)
0feet, decimal
0before ridge deduction
0ridge deduction, along the rafter
0roof angle
0pitch factor
0rise above the wall plate
0plumb cut, saw angle from square
0seat cut, saw angle from square
0sq ft of roof, both slopes
0roofing squares before waste
Drag the pitch slider and the roof redraws. The orange part of the rafter is the tail past the wall. Dashed lines mark the plumb cuts and the seat cut.
Drawn to scale in a level view. Every line marked "plumb" is vertical on the roof and every line marked "level" is horizontal.

How to use the rafter length calculator

Enter the outside width of the building, the pitch as rise per 12 inches, how far the tail reaches past the wall and the thickness of the ridge board. The calculator gives the length to cut for each common rafter, the angles for your saw, the height of the ridge above the wall plate and the roof area. Move the pitch slider to see how a steeper roof gets longer rafters and a taller ridge.

The math: a right triangle

A common rafter runs from the ridge down to the wall in a straight line. Together with the level run and the vertical rise, it forms a right triangle, so the Pythagorean theorem finds its length. The run is half the building width, plus the tail. The rise is the run times the pitch divided by 12.

rafter = run × √(1 + (pitch ÷ 12)²)

The square root part is the pitch factor, which depends only on the pitch. A 6 in 12 roof has a factor of √1.25 = 1.1180, so every foot of run adds 1.118 feet of rafter.

Here is a full example. A building 24 ft wide has a run of 12 ft. With a 1 ft tail the run to the end of the tail is 13 ft, and 13 × 1.1180 = 14.534 ft, which is 14 ft 6 7/16 in. A 1½ inch ridge board takes up 3/4 inch on each side of the center line. Along the slope that is 0.75 × 1.118 = 0.84 inch, so the length to cut is 14 ft 5 9/16 in.

PitchRoof anglePitch factor
4 in 1218.43°1.054
6 in 1226.57°1.118
8 in 1233.69°1.202
9 in 1236.87°1.250
12 in 1245.00°1.414

To check the calculator by hand, multiply the run by the factor in the table. A 12 ft run at 8 in 12 is 12 × 1.202 = 14.42 ft. If your result is much shorter than that, look at the width units or at whether you entered the full width where the run, which is half of it, belongs.

Imperial or metric

The Imperial | Metric switch above the boxes picks how you type and how the results read. The page opens in the system your browser's region uses and remembers your choice. Switching keeps your numbers: a bare 24 in feet becomes 7.3152 in meters, while anything typed with a unit, such as 24'6" or 300 mm, stays as typed. A unit you type always wins over the setting.

The conversions are exact: a foot is 0.3048 m and an inch is 25.4 mm. Pitch stays as rise per 12 of run in both systems because it is a ratio, so 6 in 12 is also 6 cm in 12 cm. In metric the cut list adds the rise per meter of run: 6 in 12 rises 500 mm per meter, a 50% slope. Lumber sizes stay as sold, such as a 2×10 that is 9¼ in (about 235 mm) deep.

A metric example: a building 7.2 m wide has a run of 3.6 m. With a 300 mm tail the run to the end of the tail is 3.9 m, and 3.9 × 1.1180 = 4.360 m. A 1½ in ridge board (38 mm) takes 21 mm off along the slope, so the length to cut is 4,339 mm. Both slopes of a 10 m long building are 2 × 4.360 × 10 = 87.2 square meters.

The cut angles

The roof angle is the arctangent of the rise over 12. For 6 in 12 that is 26.57°. The plumb cut at the ridge and tail is a vertical line, which sits 26.57° away from a square cut on the board, so set a miter saw to 26.57°. The seat cut is the level line where the rafter rests on the wall plate. It sits at 90° minus the roof angle from square, which is 63.43° for this roof. Many carpenters mark both with a speed square instead, using the pitch number on the common scale.

Marking the peak, birdsmouth and fascia end

Lay the board crown up on sawhorses and work from the top edge. For the peak cut, set a framing square with 12 on the blade and the rise, such as 6, on the tongue, both against the top edge. The line along the tongue is the plumb cut. Measure the length along the top edge from that line to the heel line, scribe it the same way, then mark the seat level from the heel line toward the peak.

The birdsmouth sits over the wall plate. The code limits an end notch to one-fourth of the board's actual depth. On a 2×10 (9¼ in deep) that is 2 5/16 in, and the calculator keeps the heel cut within it. On steep roofs this makes the seat shorter than the plate. On shallow roofs the seat reaches the full plate width first, as the International Residential Code allows in section R802.7.1. The fascia is fastened to the plumb face at the tail, so its thickness sits beyond the tail length you enter.

Where the numbers come from

  • The triangle. The formula is plain geometry, the Pythagorean theorem applied to run and rise.
  • Pitch notation. American framing states pitch as inches of rise per 12 inches of run, so this calculator uses the same.
  • Ridge deduction. Half the ridge thickness, measured level, is converted to a length along the rafter with the pitch factor.
  • Rafter size and spacing. This page does not choose lumber. Spans and sizes come from the roof framing chapter of the International Residential Code, and New York State publishes its own residential code based on it. Your building department decides which edition applies.

What rafter length is used for

The length goes straight onto a cut list and an order. Lumber comes in 2 foot steps, so a 14 ft 5 9/16 in rafter is bought as a 16 footer. The same number gives the roof area. Two slopes times the rafter length times the building length is 2 × 14.534 × 36 = 1,046 square feet, or about 10.5 roofing squares before waste. That feeds the roofing and shingle calculators, and it sets the panel length for metal roofing. Builders also use it for sheds, garages, porch roofs and additions, and to check a plan.

Tips for accurate cuts

  • Measure the building at the outside of the wall plates, and check that the walls are square and the same height.
  • Cut one pattern rafter first and test it in place before cutting the rest.
  • Sight each board and set the crown, the slight bow along its edge, facing up.
  • Take the width from the outside of the plates, not the inside, or every rafter will come out short by the thickness of the wall.
  • Hip and valley rafters are longer than common rafters and need their own calculation.
  • If the walls lean or the ridge sags, small errors add up, so confirm the actual pitch on site.

Questions

What is the difference between rafter length and roof pitch?

Pitch is the steepness of the roof, such as 6 in 12. Rafter length is the distance along the slope. A steeper pitch makes the rafter longer for the same building width.

Does the length include the tail?

Yes. The tail is added to the run before the length is found. Set the tail to zero if your rafters end at the wall.

How do I convert pitch to degrees?

Divide the rise by 12 and take the arctangent. For 8 in 12, 8 ÷ 12 = 0.667 and the arctangent is 33.69°.

Can I use metric?

Yes. Pick Metric above the boxes and type meters, centimeters or millimeters; the cut list reads in millimeters. Pitch stays as rise per 12, with the rise per meter shown too. A foot is exactly 0.3048 m.

What size lumber do I need for rafters?

That depends on the span, spacing, species, grade and the snow and wind loads where you live. Look it up in your local code or ask your building department or an engineer. This calculator finds length and angles only.

Related calculators