Rafter length and roof pitch calculator

Work a common rafter from the horizontal run, the roof pitch and the overhang. You get the sloped length with the ridge board deduction taken off, the rise, the pitch in x in 12 and degrees, and the plumb and seat cut angles. Give the pitch as x in 12, as an angle, or as a rise you measured over a level run.

Common rafter

Pitch
6 in 12 = 26.57°
Rafter per foot of run
13.416 in (√(6² + 12²))
Rise (run × pitch ÷ 12)
6 ft 0 in (72 in)
Run × slope factor 1.118
13 ft 5 in (160.997 in)
Overhang along the slope
1 ft 1 7/16 in (13.416 in)
Ridge deduction along the slope
0 ft 13/16 in (0.839 in)
Rafter length, top edge
14 ft 5 9/16 in (173.575 in)
Plumb cut
26.57° off a square cut
Seat cut
63.43° off a square cut

Steps: (144 in run + 12 in overhang) × 1.118 − 0.75 in × 1.118 = 173.575 in. The half ridge is measured level, so it takes the same slope factor.

run 12 ft 0 inrise 6 ft 0 in26.6°pitch 6.00 in 12

Run is half the span: from the outside face of the wall to the ridge centerline, measured level. Overhang is measured level from the same wall line. Lengths are along the top edge of the rafter.

Studying for ICC B1? Take the free 10-question check to see exactly which topics to fix first, then close the gaps with the Rafter Tie course.

Or read a full free lesson first (no signup).

This is covered in Roofs, attics and chimneys of the Rafter Tie course.

Studying with a coworker? Send them the free check.

How the common rafter calculation works

A common rafter, the run and the rise make a right triangle. The run is the level side, the rise is the vertical side and the rafter is the sloped side. Pitch is written as x in 12: the roof rises x inches for every 12 inches of run. Everything follows from that:

  • Rafter length per 12 in of run = √(x² + 12²). At 6 in 12 that is √180 = 13.416 in.
  • Slope factor = √(x² + 12²) ÷ 12. Multiply any level distance by it to get the distance along the slope.
  • Rise = run × x ÷ 12.
  • Roof angle = arctan(x ÷ 12) in degrees. 12 in 12 is 45 degrees.
  • Ridge deduction = half the ridge board thickness × slope factor. The rafters on each side stop short of the ridge centerline by half the board, measured level, so the cut length is shorter by that distance along the slope.
  • Cut length = (run + overhang) × slope factor − ridge deduction.

Run is half the building span, from the outside face of the wall to the ridge centerline. Overhang is measured level from the same wall line, not along the rafter tail. Mixing a level overhang with a sloped one is the most common way to cut a tail wrong.

Cut angles: plumb and seat

The plumb cut is the vertical cut at the ridge and at the tail. The seat cut is the level cut where the rafter sits on the wall plate. If you set a saw from a square cut across the board, the plumb cut is the roof angle off square and the seat cut is 90 degrees minus the roof angle. At 6 in 12 that is 26.57 degrees for the plumb cut and 63.43 degrees for the seat cut. On a framing square, you read the same cuts by lining up x and 12 along the rafter edge.

Roof pitch chart

These values come from the same formulas the calculator uses. The length column is the rafter length in inches for every foot of run, before any overhang or ridge deduction.

PitchAngleRafter per ft of runPlumb cut off squareSeat cut off square
3 in 1214.04°12.369 in14.04°75.96°
4 in 1218.43°12.649 in18.43°71.57°
5 in 1222.62°13.000 in22.62°67.38°
6 in 1226.57°13.416 in26.57°63.43°
7 in 1230.26°13.892 in30.26°59.74°
8 in 1233.69°14.422 in33.69°56.31°
9 in 1236.87°15.000 in36.87°53.13°
10 in 1239.81°15.620 in39.81°50.19°
12 in 1245.00°16.971 in45.00°45.00°

Worked example 1: a 24 ft wide house at 6 in 12

Span 24 ft, so the run is 12 ft (144 in). Pitch 6 in 12, overhang 12 in level, 1.5 in ridge board. These are invented study numbers.

  1. Slope factor = √180 ÷ 12 = 1.1180.
  2. Rise = 144 × 6 ÷ 12 = 72 in (6 ft). Angle = arctan(0.5) = 26.57 degrees.
  3. Run along the slope = 144 × 1.1180 = 161.00 in. Overhang along the slope = 12 × 1.1180 = 13.42 in.
  4. Ridge deduction = 0.75 in × 1.1180 = 0.84 in.
  5. Cut length = 161.00 + 13.42 − 0.84 = 173.57 in, which is 14 ft 5 9/16 in to the nearest 1/16 in.

Worked example 2: 21 ft wide at 8 in 12 with a longer overhang

Span 21 ft, so the run is 10 ft 6 in (126 in). Pitch 8 in 12, overhang 16 in, 1.5 in ridge board.

  1. Slope factor = √208 ÷ 12 = 1.2019. Angle = arctan(8 ÷ 12) = 33.69 degrees.
  2. Rise = 126 × 8 ÷ 12 = 84 in (7 ft).
  3. Level distance used = 126 + 16 − 0.75 = 141.25 in. The 0.75 is half the ridge board, measured level.
  4. Cut length = 141.25 × 1.2019 = 169.76 in, which is 14 ft 1 3/4 in.

Taking the 0.75 off before multiplying and taking 0.90 off after give the same answer. Forgetting the slope factor on the deduction would leave the rafter about 0.15 in long. These are original arithmetic examples, not exam questions.

What this means on an inspection

You do not cut rafters, but plans give a pitch as x in 12 and spans as level dimensions, and a tape laid along a rafter reads the sloped length. The sloped length is always longer than the run. Rafter spans in the IRC tables are measured along the horizontal projection, not the sloped length, as the span table guide walks through. Check in your own book, at R802.4.1, how your edition measures the span, and convert with the slope factor before you compare.

Pitch also changes the thrust at the walls. For the same load, a flatter roof pushes outward harder than a steep one. That is why where the tie sits matters, and the rafter ties vs collar ties post shows what to look for. Roof and ceiling construction carries 14% of the B1 outline, and the outline guide shows where roof framing sits among the other areas.

Rafter length questions

How do I find the pitch of a roof I can reach?

Hold a level against the underside of a rafter, mark 12 inches along the level, and measure straight down from that mark to the rafter. That drop is x in 12. The calculator's measured rise option takes any rise and level run, such as 8 in over 24 in, which is 4 in 12.

Is run the same as span?

No. Span is the full width between the outside faces of the walls. Run is half of that for a symmetrical roof, to the ridge centerline. Typing the full span as the run doubles the answer.

Why take half the ridge board off the rafter?

The rafters on the two sides meet the ridge board on its faces, not at its centerline. Each rafter stops half the board's thickness short of the centerline. That half thickness is level, so you scale it by the slope factor before taking it off the sloped length.

Common rafter framing is part of the roof area of the B1. The calculator covers the geometry, and the guides cover where the code sets what is allowed.

Work common rafter length, rise, pitch and cut angles from run, pitch and overhang, with every step shown. A geometry aid; the plans, the adopted code and the engineer or AHJ govern real framing.

Try one free question

Try one question

Question 1 of the free 10-question check on ICC B1. No signup. Then ask Plumb, the AI study assistant, why the answer is right and the others are wrong.

Question 1 of 10 · free checkUntimed

Public Safety and Special Construction

In a new bedroom, the only emergency escape window has a keyed sash lock, with the key hanging on a hook beside the window. What should the inspector do?

Press A-D or 1-4 to choose an answer while this question is on screen.

Choose an answer to begin

Email me the free ICC B1 exam-day kit

What to bring, arriving and the testing room, from the exam body's own candidate guide. Sent to your inbox.

Ask Plumb before you buy AI your AI study assistant

See what's on the ICC B1 exam, test yourself with 5 quick questions, or find the plan that fits you.

Terms this tool uses

Published references

Print the Roof, egress opening and stair formula sheet (free PDF, one page) and the worked guide.

From the blog

Practice roof framing for the B1

You just worked the geometry behind a roof frame. On the open-book B1 you also have to find the right IRC section fast. The free 10-question check scores you by topic in minutes, roofs included, with no signup. The Rafter Tie course drills your weak spots and explains every answer.

Take the free 10-question check

The ICC B1 course

Available now · instant access

The ICC B1 course

  • 7modules of lessonsEvery task on the outline
  • 4full-length timed exams60 questions in 120 minutes each
  • 426practice questionsEach one explained
  • 4worked calculationsStep by step
  • 8timed code lookups a setFind it fast in IRC, with your median time
  • 1week-by-week study planSet to your exam date

Turn a practice answer into a study step. In untimed practice, ask Plumb AI about any question you answer, follow up, then see your weakest topics and what to drill next.

B1 course with IRC navigation drills$99

Terms and refunds · Secure checkout by Stripe · Billed by Nori Software

See the course

Compare plans

Every answer comes with a full explanation.

By the Rafter Tie editorial team. Report an error.

Add this calculator to your site

Copy this HTML with its attribution link. The frame scrolls to include the calculator and explanations; no external script is needed.