FigureYard
Roofing

Rafter Calculator

Enter the building width, the pitch and the overhang to get the rafter length, the length without overhang, the run and the ridge height above the wall.

Reviewed by FigureYard editorial teamUpdated October 8, 20263 sources

Your measurements

in 12
Rafter length
14.53ft
  • Without overhang: 13.42 ft
  • Ridge height above the wall: 72.0 in
  • Run: 12.00 ft

Measured along the top edge, ignoring the ridge board thickness. Buy the next standard lumber length up.

Rafters are cut from dimensional lumber, which comes in standard lengths, so the result is the starting point for your cut list and your lumber order. A rafter is measured along the slope, so it comes out longer than the flat distance it covers.

How to use this calculator

  1. Measure the building width from the outside face of a wall to the outside face of the opposite wall, and enter it as the span.
  2. Enter the pitch as the inches of rise for each foot of run. If you know only the rise and run, work out the pitch with the roof pitch calculator.
  3. Enter the overhang as the flat distance from the outside of the wall to the edge of the eave, and check the unit selector beside it.
  4. Read Rafter length as the cut length along the top edge, in feet. Use Without overhang when the rafter stops at the wall, and use Run and Ridge height to check the drawing.
  5. Buy each rafter in the next standard length above the result you cut from. The plumb cut, the birdsmouth seat and any ridge board deduction all use up lumber.
  6. Check the size, spacing and maximum span against the span tables in your building code, and confirm them with your local building department before you order.

Worked examples

Detached garage

Building width: 24 ft · Pitch: 4 in 12 · Overhang: 6 in

Rafter length
13.18 ft
Without overhang
12.65 ft
Ridge height above the wall
48.0 in
Run
12.00 ft

Ranch house with wide eaves

Building width: 30 ft · Pitch: 6 in 12 · Overhang: 18 in

Rafter length
18.45 ft
Without overhang
16.77 ft
Ridge height above the wall
90.0 in
Run
15.00 ft

Steep cabin roof

Building width: 20 ft · Pitch: 10 in 12 · Overhang: 12 in

Rafter length
14.32 ft
Without overhang
13.02 ft
Ridge height above the wall
100.0 in
Run
10.00 ft

Narrow cottage

Building width: 16 ft · Pitch: 9 in 12 · Overhang: 8 in

Rafter length
10.83 ft
Without overhang
10.00 ft
Ridge height above the wall
72.0 in
Run
8.00 ft

Rafter length with overhang by building width and pitch

Building widthPitch: 4 in 12Pitch: 6 in 12Pitch: 8 in 12
16 ft9.4910.0610.82
24 ft13.7014.5315.62
32 ft17.9219.0120.43
40 ft22.1423.4825.24

Each cell: Rafter length (ft). Inputs not in the table use the calculator's starting values.

How the length is worked out

For a common gable rafter, the run is the building width split down the middle, from the outside of the wall to the centre of the ridge. The calculator multiplies the run by a slope factor, which is the ratio of rafter length to run. The factor grows as the pitch gets steeper.

The overhang is measured flat, so the calculator adds it to the run before it applies the slope factor. Without overhang stops at the outside of the wall. The ridge height is the run in feet multiplied by the pitch, which gives inches, so you can check it by hand. The table uses the starting overhang, so enter your own eave width.

Cuts and lumber to buy

The result is the length before any cuts. The top end gets a plumb cut where it meets the ridge, and a ridge board shortens each rafter by part of the board's thickness. The bottom end gets a birdsmouth seat cut, a notch that sits on the top plate of the wall.

Every cut uses up lumber. The board feet calculator can total the lumber when you have the full list of lengths, and the roofing calculator covers the roof covering, which is a separate purchase.

Size and spacing come from code

This calculator covers geometry only. Rafter size, spacing and the longest allowed span depend on the lumber grade, the roof loads and the spacing, and the span tables in your building code set them out. Check local codes before you order, since your local building department confirms which tables apply.

Mistakes to avoid

  • Cutting to Without overhang when the rafter tail runs past the wall. Use Rafter length there.
  • Ordering exactly the result. The cuts take off length, so a board cut to the exact result comes up short.
  • Reading decimal feet as feet and inches. Multiply the part after the decimal point by the inches in a foot before you mark the board.

How do I mark a birdsmouth and a tail cut?

Lay the rafter on the top plate and mark where the underside meets the outside corner of the plate. The birdsmouth has two cuts: a level seat that rests on the plate and a plumb heel cut up from the seat. At the tail, make a plumb cut, or a level cut if your fascia calls for one, at the end of the overhang. Keep the notch shallow, because a deep one weakens the board. The IRC caps a notch at the end of a rafter at 25 percent of its depth, so confirm the limit with your local building department.

Common questions

How do I calculate rafter length?

Enter the span, the pitch and the overhang, then read Rafter length. It is the cut length along the top edge, in decimal feet.

What is the difference between Rafter length and Without overhang?

Without overhang runs from the outside of the wall to the centre of the ridge. Rafter length adds the eave, so cut from it when the tail runs past the wall.

What is a birdsmouth cut?

It is a notch cut into the bottom end of a rafter so that it sits on the top plate of the wall. The calculator does not subtract it, so buy longer than the result to leave room for it.

What rafter size and spacing should I use?

The calculator gives neither. The span tables in your building code set rafter size, spacing and maximum span, and your local building department can confirm which tables apply to your roof.

Can I use this calculator for hip or truss rafters?

No. It is built for a common gable rafter on a symmetrical roof. Hip and valley rafters run diagonally, and engineered trusses come from the truss maker's design.

Do I need a ridge board or a ridge beam?

A ridge board is a plain board that the rafter tops lean against, and the rafters carry the roof load. A ridge beam is a structural beam that holds the rafters up, and it is needed when the rafters cannot push against each other, such as on a vaulted ceiling with no ties. Your building code or an engineer decides which one your roof needs.

Can I use a rafter calculator for a shed roof?

A shed roof slopes one way, so its run is the whole building width, measured from the outside of one wall to the outside of the other. This calculator splits the width in half, so for a shed roof enter twice the building width and read the result as one rafter. The ridge height then shows how much higher the tall wall sits than the low wall.

What is the minimum roof pitch for shingles?

Asphalt shingles need a pitch of at least 2 in per 12 in. Below 4 in per 12 in they also need two layers of underlayment. Work out your pitch with the roof pitch calculator, then check the shingle maker's instructions before you buy.