Rafter Length and Roof Pitch Calculator

Enter the run and the roof slope as a pitch, a total rise or an angle. Get the rafter length including the overhang, the roof angle and every pitch conversion, worked out step by step.

By the PythagoreanTheorem.net teamUpdated Free · no sign-up

The run is measured level, from the outside of the wall to the center of the ridge: half the building's width on a simple gable roof. The overhang is also measured level, from the outside of the wall to the end of the tail.

≈ 14.53 ft (14 ft 6 7/16 in)

Rafter line length: 13.42 ft from the ridge line to the outside of the wall, plus a 1.12 ft overhang tail. Before any ridge or birdsmouth adjustment.

  • Pitch6/12
  • Roof angle26.57°
  • Total rise6 ft
  • Slope (grade)50%
  • Rafter, no overhang13.42 ft
  • Slope factor1.118
overhang 1 ftθ126ridgerise 6 ftrun 12 ftc = 13.42 ft

Step-by-step solution

  1. Rise from the pitch: rise = 12 × 6 ÷ 12 = 6 ft
  2. The run, the rise and the rafter form a right triangle: c2 = 122 + 62 = 144 + 36 = 180
  3. Take the square root: c = √180 = 6√5 ≈ 13.4164 ft
  4. Slope factor (rafter length per 1 unit of run): √62 + 144 ÷ 12 ≈ 1.118
  5. Overhang tail: 1 × 1.118 ≈ 1.118 ft
  6. Total line length: 13.4164 + 1.118 ≈ 14.5344 ft
  7. Roof angle: θ = arctan(6 ÷ 12) ≈ 26.57°

All lengths use the same unit. Enter a run of 14 and an overhang of 1.5 for a 28 ft wide house with 18 in eaves. Type the pitch as 7 or as 7/12; decimals such as 7.5 work too.

A common rafter is the hypotenuse of a right triangle whose legs are the run (level distance) and the rise (vertical height), so its length is √run2 + rise2. On a 6/12 roof with a 12 ft run, the rise is 6 ft and the rafter is √144 + 36 = √180 ≈ 13.42 ft before you add the overhang.

How to use the rafter calculator

  1. Enter the run. For a gable roof this is half the span (the building's width from outside of wall to outside of wall). A 24 ft wide house has a 12 ft run.
  2. Choose how you know the slope: as a pitch such as 6 (meaning 6 in 12), as the total rise from the top of the wall to the ridge line, or as an angle in degrees. Switching modes converts the current slope for you.
  3. Enter the overhang as a level distance, or 0 for none. The calculator turns it into the extra length along the rafter.
  4. Read the results: the total line length, also in feet, inches and sixteenths, plus the pitch, angle, rise, grade and slope factor, and every step of the arithmetic.

Roof pitch explained

In the US and Canada, roof slope is written as inches of rise per 12 inches of run. A 6/12 roof (say "six in twelve") climbs 6 in for every 12 in it runs horizontally. Since a pitch is just the two legs of a small right triangle, the same triangle, together with the Pythagorean theorem formula, gives every other way of describing the slope:

θ= arctan(x over 12)grade= x over 12 × 100%slope factor= √x2 + 122 over 12

The slope factor is the hypotenuse of that small triangle divided by 12: the length of rafter for each unit of run. Multiply any run by it to get the length along the slope. For 6/12 it is √36 + 144 ÷ 12 = √180 ÷ 12 ≈ 1.118, so every foot of run needs about 1.118 ft (13.42 in) of rafter.

ridge board rise 6 ft run 12 ft common rafter 126 overhang birdsmouth seat on the wall span 24 ft
A 24 ft wide gable roof at 6/12. Each common rafter is the hypotenuse of the rise-run triangle, extended past the wall by the overhang. The birdsmouth is the notch that lets the rafter sit on the wall plate.

A note on words: strictly, pitch is the rise divided by the whole span, so a 6/12 slope is a "1/4 pitch", while slope is rise over run. In everyday use, "6/12 pitch" and "6-in-12 slope" mean the same thing, and that is how the calculator uses the word.

Roof pitch table

Angles to the nearest hundredth of a degree. Rafter per foot of run = 12 × slope factor.
PitchAngleGradeSlope factorRafter per foot of run
1/124.76°8.33%1.003512.04 in
2/129.46°16.67%1.013812.17 in
3/1214.04°25%1.030812.37 in
4/1218.43°33.33%1.054112.65 in
5/1222.62°41.67%1.083313 in
6/1226.57°50%1.118013.42 in
7/1230.26°58.33%1.157713.89 in
8/1233.69°66.67%1.201914.42 in
9/1236.87°75%1.250015 in
10/1239.81°83.33%1.301715.62 in
11/1242.51°91.67%1.356616.28 in
12/1245°100%1.414216.97 in

Two rows come out as whole numbers. A 5/12 roof gives exactly 13 in of rafter per foot of run and a 9/12 roof exactly 15 in, because 5-12-13 and 9-12-15 are Pythagorean triples (the second is the 3-4-5 triangle scaled by 3). A 12/12 roof is a 45° slope, a 45-45-90 triangle, so its slope factor is √2.

3/1214.04° · 25% grade 6/1226.57° · 50% grade 9/1236.87° · 75% grade 12/1245° · 100% grade run of 12 rise ↑
Every pitch is a right triangle with a run of 12. Doubling the rise from 6 to 12 does not double the angle: it goes from 26.57° to 45°.

Worked examples

Example 1: a 24 ft wide house at 6/12

Span 24 ft, so the run is 12 ft. Pitch 6/12 and a 1 ft overhang.

rise= 12 × 6 over 12 = 6 ftc= √122 + 62 = √180= 6√5 ≈ 13.416 fttail= 1 × 1.118 ≈ 1.118 ft

Total line length ≈ 14.53 ft, or 14 ft 6 7/16 in. This is the default example in the calculator above. (√180 = 6√5 because 180 = 36 × 5; the square root simplifier shows the steps.)

Example 2: find the pitch of a shed roof

A shed roof rises 2 ft over a run of 8 ft, with no overhang.

pitch= 12 × 2 over 8 = 3,  so 3/12c= √82 + 22 = √68= 2√17 ≈ 8.25 ft

A 3/12 roof (about 14.04°) with rafters about 8.25 ft long, or 8 ft 2 15/16 in. Enter it with the Total rise mode.

Example 3: a wider house with deeper eaves

A 28 ft span (14 ft run) at 4/12 with 18 in (1.5 ft) eaves. The slope factor for 4/12 is √16 + 144 ÷ 12 ≈ 1.0541.

c= 14 × 1.0541 ≈ 14.757 fttail= 1.5 × 1.0541 ≈ 1.581 ft

Total ≈ 16.34 ft, or 16 ft 4 1/16 in.

Example 4: a metric roof given by its angle

A 30° roof with a 4 m run and a 0.5 m overhang. With an angle, the slope factor is 1 ÷ cosθ.

rise= 4 × tan30° ≈ 2.309 mtotal= (4 + 0.5) ÷ cos30°≈ 5.196 m

About 5.20 m of rafter line length. A 30° roof is roughly a 6.93/12 pitch. To solve any right triangle from an angle and one side, use the right triangle calculator.

From line length to the cut board

The calculator gives the theoretical line length: the hypotenuse from the center of the ridge to the outside of the wall, plus the tail. Turning that into a cut rafter involves a few adjustments that depend on your materials and plans, so treat the following as an outline rather than a framing manual:

  • Ridge board. The run is measured to the center of the ridge, but the rafter stops at the ridge board's face. Shorten it by half the ridge thickness measured level, times the slope factor along the rafter. For a 1½ in ridge board on a 6/12 roof that is 0.75 × 1.118 ≈ 0.84 in.
  • Birdsmouth. Where the rafter crosses the wall, a notch with a level seat cut and a vertical heel cut lets it sit flat on the top plate. The depth of that notch decides where on the board the line length is laid out.
  • Plumb cuts and tail. The ridge end and usually the tail end are cut vertical (plumb) at the roof angle, so the board must be a little longer than the line length. Lumber comes in 2 ft steps, so a 14.53 ft line length usually means a 16 ft board.

Rafter sizes, spacing and allowable spans are a structural question that this math does not answer; they come from span tables and the building code that applies to your project. Hip and valley rafters cross the plan diagonally, so they need the theorem twice, the same idea as the Pythagorean theorem in 3D. For squaring the walls the rafters sit on, see the Pythagorean theorem in construction, and for the trades that use this math daily, jobs that use the Pythagorean theorem.

Frequently asked questions

How do I calculate rafter length?

Find the rise (run × pitch ÷ 12), then use the Pythagorean theorem: rafter = √run2 + rise2. Add the overhang multiplied by the slope factor. For a 10 ft run at 8/12: the rise is 6.67 ft, the rafter is √100 + 44.44 ≈ 12.02 ft, and a 1 ft overhang adds about 1.20 ft.

What does a 6/12 roof pitch mean?

The roof rises 6 in for every 12 in of horizontal run. That is a slope of 50% and an angle of about 26.57°, and each foot of run needs about 13.42 in of rafter.

How do I convert roof pitch to degrees?

Take the arctangent of the rise divided by 12: θ = arctan(x ÷ 12). A 4/12 roof is about 18.43°, 8/12 is about 33.69° and 12/12 is exactly 45°. To go the other way, the pitch is 12tanθ.

Is the overhang measured level or along the rafter?

This calculator takes the overhang as a level distance from the outside of the wall, which is how eaves are usually specified on plans, and multiplies it by the slope factor. If you already know the tail length along the rafter, enter 0 for the overhang and add the tail yourself.

Does it work for hip rafters?

Not directly. A hip rafter runs at 45° in plan, so its run is the common run times √2. For a 12 ft common run at 6/12 the hip's run is about 16.97 ft and its length is √16.972 + 62 ≈ 18 ft. You can enter that run and the rise of 6 ft in Total rise mode.

Keep exploring