Skip to content
TROWELLY

Rafter Calculator

Enter the roof pitch, the building span and length, and the overhang to get the length of each common rafter, the angles to cut, and how many boards to buy at standard lumber lengths.

Units
in / 12

A 6/12 roof rises 6 in for every 12 in of run. Use the roof pitch calculator if you only know the angle.

ft
ft
in

Measured level from the outside of the wall to the end of the rafter tail.

in

A 2× ridge board is 1½ in thick; half of it comes off each rafter.

Size rafters from your local span tables or building department; this only sets the shopping list label.

Add prices for a cost estimate (optional)

Quantities work without prices. Material prices start as typical prices for your area, marked “Regional estimate”; type over any of them with the price you are quoted or see in store. Clear a price if you don’t know it, or enter 0 for something you already have.

Estimates use the US average.

each
per hour
hours
%
total

Results

Rafter length (with overhang)
14.46 ft
Rafters needed
48 rafters
Board length to buy
16 ft
Rafter length, wall to ridge
13.35 ft
Overhang (tail) length
1.12 ft
Plumb cut angle
26.6 °
Seat cut angle
63.4 °
Ridge height above wall plate
5.97 ft
  • 24 rafters per side at 16 in on center, two sides. Lengths are along the top edge of the rafter from the outside of the wall to the face of the ridge board, plus the tail.
  • Cut one rafter as a pattern, test it on both ends of the building, then use it to mark the rest. The birdsmouth seat cut should not remove more than a third of the rafter depth.
  • Rafter size depends on span, snow load, wood species and grade. Check your local span tables or building department before buying.

Where to buy

Quantities from your result, with links to search each store.

Your ZIP code stays on this device. We use it to show stores and suppliers in your area.

You may also need

Pick straight boards and set each rafter crown side up.

Links search each store’s website. Check prices and stock before you go.

How to use the rafter calculator

  1. Choose a Gable roof (two sloped sides meeting at a ridge) or a Shed roof (one slope).
  2. Enter the Pitch as inches of rise per 12 in of run, such as 6 for a 6/12 roof.
  3. Enter the Building span from outside wall to outside wall and the Building length along the ridge.
  4. Enter the Overhang, measured level from the wall to the rafter tail, and the ridge board thickness.
  5. Pick the rafter spacing and size, and optionally the price per board.

How it works

A rafter is the hypotenuse of a right triangle whose legs are the run and the rise. The slope multiplier converts any level distance into the sloped length along the rafter.

The plumb cut at the ridge is cut at the roof angle; the seat cut of the birdsmouth that sits on the wall is square to it.

Run = span ÷ 2 − ridge thickness ÷ 2 (gable) or span (shed)

Slope multiplier = √(1 + (rise ÷ 12)²)

Rafter length = (run + overhang) × slope multiplier

Rafters per side = building length ÷ spacing, rounded up, + 1

Worked example

A 24 ft wide gable building with a 6/12 pitch and 1½ in ridge board has a run of 12 ft − ¾ in = 11.94 ft.

The slope multiplier for 6/12 is 1.118, so the rafter is 13.35 ft to the wall plus 1.12 ft of tail for a 12 in overhang: 14.46 ft, cut from 16 ft boards.

A 30 ft building at 16 in on center needs 24 rafters per side, 48 in total.

Tips before you buy

  • Cut one pattern rafter, test it at both ends of the building, then mark the rest from it.
  • Sight down each board and install it crown side up.
  • Add hurricane ties or rafter ties where your local code requires them.

Frequently asked questions

How do you calculate rafter length?

Multiply the run (half the span on a gable roof, less half the ridge board) by the slope multiplier √(1 + (rise ÷ 12)²), then add the overhang times the same multiplier.

How many rafters do I need?

Divide the building length in inches by the spacing, round up and add one for each side. A 30 ft gable roof at 16 in on center needs 24 per side, 48 total.

What size rafters do I need?

It depends on the span, snow and dead load, wood species and grade. Use the span tables your local building department follows; this calculator only labels the shopping list.

What angle do I cut rafters?

The plumb cut is the roof angle measured from vertical, 26.6° for a 6/12 roof. The seat cut is the complement, 63.4°.

Results are estimates based on the measurements you enter and typical material properties, and costs are planning estimates: actual costs vary. Products vary, so check quantities with your supplier and follow product labels and your local building codes. Read the full disclaimer. Last reviewed October 9, 2026.