How to Calculate Rafter Length: Formula, Factors and Examples

By Ubaid Ullah

7 min read

A roof with a triangle-shaped window on top of it

Key takeaways

  • Rafter length along the slope = the square root of (run squared + rise squared).
  • From a pitch, rafter length = run x the square root of (144 + pitch squared) / 12. That square-root part is a fixed factor for each pitch.
  • For a 12 ft run and a 6 ft rise the rafter is about 13.42 ft.
  • The number is a straight-line length. Overhang, birdsmouth cuts and waste are not included and must be added by the builder.

What rafter length means here

A rafter is the sloping board that runs from the top of a wall up to the ridge. Its length is longer than the horizontal distance it covers, because it travels up as well as across. The question is how much longer.

In this guide, rafter length means the straight-line distance along the slope for a given run. It does not include any overhang past the wall, any cuts, or any waste. Those are real parts of building a roof, but they depend on the design, so the builder adds them.

Method 1: from rise and run

If you know the rise and the run, the rafter is the long side of a right-angled triangle. The run is one side, the rise is the other, and the rafter closes the triangle.

rafter length = the square root of (run squared + rise squared)

This is the same formula used in our Roof Pitch Calculator. If you want a refresher on rise and run, how to calculate roof pitch explains both terms and the pitch chart.

Method 2: from a pitch and a factor

Often you know the pitch, such as 6/12, instead of the rise. A pitch of x/12 means the rise is x for every 12 of run. Plug that into the triangle formula and a pattern appears:

rafter length = run x the square root of (144 + pitch squared) / 12

The part after the run depends only on the pitch. It tells you how many units of rafter you need for each unit of run. We can call it the rafter factor. For a 6/12 pitch the factor is the square root of (144 + 36) / 12 = the square root of 180 / 12, which is 1.1180.

Once you have the factor, the job is one multiplication: rafter length = run x factor.

Quick-reference factor table

Here are the factors for common pitches, as rafter length per 1 unit of run.

PitchRafter length per 1 unit of run
4/121.0541
5/121.0833
6/121.1180
7/121.1577
8/121.2019
9/121.2500
10/121.3017
11/121.3566
12/121.4142

The factor grows as the roof gets steeper, from about 1.05 at 4/12 up to 1.4142 at 12/12, where the rise equals the run. Even on a fairly gentle roof the rafter is a little longer than the run.

Worked examples

Using rise and run

A run of 12 ft and a rise of 6 ft. Rafter length = the square root of (12 x 12 + 6 x 6) = the square root of 180, which is about 13.42 ft.

A run of 15 ft and a rise of 10 ft. Rafter length = the square root of (15 x 15 + 10 x 10) = the square root of 325, which is about 18.03 ft.

Starting from a pitch

A 6/12 pitch over a 20 ft run. First the rise: 6 / 12 x 20 = 10 ft. Then the rafter: the square root of (20 x 20 + 10 x 10) = the square root of 500, which is about 22.36 ft. With the factor: 20 x 1.1180 = 22.36 ft. Both routes agree.

The same 10 ft run at three pitches

Keep the run at 10 ft and change the pitch to see the effect.

PitchFactorRafter length for a 10 ft run
4/121.054110.54 ft
8/121.201912.02 ft
12/121.414214.14 ft

Tripling the pitch from 4/12 to 12/12 adds about 3.6 ft to the rafter, so steeper roofs need noticeably longer boards even over the same run.

Checking your own arithmetic

Because there are two routes to the same answer, you can use one to check the other. It takes a minute and catches most slips.

  1. Work out the rafter from rise and run with the square-root formula.
  2. Work it out again from the pitch, using run x factor.
  3. Compare the two. They should agree to the second decimal place.

Try it on a roof with a 15 ft run and an 8/12 pitch. The rise is 8 / 12 x 15 = 10 ft, so the square-root route gives the square root of (15 x 15 + 10 x 10) = the square root of 325, or about 18.03 ft. The factor route gives 15 x 1.2019 = 18.03 ft. The two match, so you can trust the figure.

If they do not match, look for the usual causes: a rise measured in different units from the run, a factor read from the wrong row of the table, or a run that is the full width instead of half. One of those is almost always the culprit.

What the number leaves out

The calculated length is a clean geometric figure. A real rafter is cut from a board, and several things sit on top of it.

  • Overhang. If the rafter extends past the wall, that extra length is added to the calculated figure.
  • Birdsmouth cuts. The notch where the rafter sits on the wall changes how the board is marked and cut.
  • Ridge details. How the rafters meet at the top can take a little off the length.
  • Waste. Boards come in set lengths, and cuts leave offcuts.

The builder adds these. We do not make claims about code or spans here. This guide only covers the maths, so check the details with your builder and your local rules before you buy lumber.

Mistakes to avoid

  • Using the whole building width as the run. On a simple gable roof each rafter covers half the width.
  • Mixing units, for example a rise in inches with a run in feet.
  • Reading the factor from the wrong row of the table.
  • Treating the result as a cutting length when it leaves out overhang, cuts and waste.

If you are planning other work on the same project, see how much concrete you need for a slab, and browse the Home and Energy Calculators for the rest.

Frequently asked questions

How do I find rafter length without the rise?

Use the pitch. Multiply the run by the factor for that pitch, which is the square root of (144 + pitch squared) / 12. For a 6/12 roof with a 12 ft run, that is 12 x 1.1180, or about 13.42 ft.

Does this include the overhang?

No. The formula gives the straight-line length along the slope for the run you enter. Overhang, birdsmouth cuts and waste are not included, so the builder needs to add them to get the length of the board to buy.

What is the rafter factor?

It is the rafter length for each 1 unit of run at a given pitch. For example, 6/12 is 1.1180 and 12/12 is 1.4142. Multiply it by your run to get the rafter length along the slope, without overhang.

Can I use this for any roof?

It works for a single straight slope. Hips, valleys and dormers need to be worked out section by section. This guide gives the geometry only, so check your plans, your builder and local rules for anything beyond that.

Let the calculator do the arithmetic. Enter rise and run, or a pitch and a run, and read the rafter length along the slope.

Open the Roof Pitch Calculator

Tools used in this guide

Related articles

About the author

Ubaid Ullah is a digital marketer and SEO specialist, and the independent creator of Zayvora Calculators. Results are estimates for information only. See the Disclaimer.

Photo: Yucel M on Unsplash

Scroll to Top