Field Service Cost Compare prices

Home/Calculators/Rafter length calculator

Rafter length calculator: length from run and pitch

You are trying to find the sloped length of a rafter for a roof you plan to frame, so you can cut the board to the right length from the wall to the overhang. Rafter length calculator. Nothing was tested for this page; the numbers come from the formula shown below and the inputs you enter.

CalculatorBuilt 27 November 2026Example inputs, not industry averages

Rafter length, feet

—

Rise, feet
—
Length before overhang, feet
—

An estimate from the formula below and the numbers you typed. Check quantities against your plan and your supplier before you order.

Put it into a job estimate

Enter the horizontal run, the pitch as rise per 12 inches, and the horizontal overhang. The page returns the rise, the rafter length before the overhang, and the total sloped length including the overhang.

The automatic calculation needs JavaScript. With scripting off, the fields above do nothing and the result area stays empty. The formula is written out below, so you can do the same arithmetic on paper.

Rafter length calculator: how to measure

  1. Measure the horizontal run in feet from the outer edge of the wall to the ridge line or center point of the roof.
  2. Find the pitch as inches of rise per 12 inches of run, for example 6 means the roof rises 6 inches for every 12 inches it runs.
  3. Measure the overhang horizontally in feet, from the outside face of the wall to the edge of the rafter tail.
  4. Enter the run and the overhang in feet and the pitch as a plain number, check that they match the roof you are framing, and read the total length.

Rafter length calculator formula, written out

  • rise = run x pitch / 12
  • overhang follows the roof slope
  • length = square root of (run squared plus rise squared) plus overhang x square root of (1 + (pitch / 12) squared)

Rafter length calculator worked example

With the inputs already in the form (horizontal run 12, pitch rise per 12 inches 6, horizontal overhang 1) the result is: rafter length, feet: 14.53; rise, feet: 6.00; length before overhang, feet: 13.42.

  1. Rise = 12 x 6 / 12 = 6.00 ft
  2. Rafter length = 13.416 + 1 x 1.118 = 14.534 ft

If you only measured rise and run, start with the pitch and angle calculator for roofs.

What the rafter length calculator assumes

  • The run is measured horizontally, not along the sloped line of the rafter.
  • The overhang is a horizontal distance and gets added along the slope, not as a flat figure.
  • Ridge board thickness and plumb cut or birdsmouth allowances are not included.
  • Material cut waste is not included; check your layout and add what your cut plan needs.

Rafter length calculator questions people ask

Why does the calculator add the overhang along the slope?

The overhang is measured as a flat horizontal distance. The rafter tail follows the roof slope, so that flat distance has to be stretched to match the angle. The formula uses the pitch to work out how much longer the sloped tail is.

Can I use this for a shed roof or a gable roof?

Yes. The math works for any straight roof plane with a constant pitch, including a shed roof and both sides of a gable. On a gable, each side is usually the same run, so one result covers both.

What does the pitch number mean?

The pitch is the rise per 12 inches of run. A pitch of 6 means the roof climbs 6 inches over each 12 inches it goes across. Higher numbers make a steeper roof and a longer rafter for the same run.

What is missing from the total length?

The total leaves out ridge board thickness, plumb cut and birdsmouth allowances, and material cut waste. Check your cut plan and the thickness of the board at the ridge before you mark the final length.

This calculator belongs to the framing and roofing calculators. To price the whole job, not just this part, use the job costing calculator and the pricing guide below.

How this site makes money. Affiliate links on this site are marked before you click them, and a commission will never change a price, a test result or a ranking. Details in the affiliate disclosure.