Rafter Calculator

Enter your roof run, pitch, and rafter spacing to calculate the rafter length and the number of rafters needed.

Results

Rafter length
13.42 ft
Rafters per side
31
Total rafters
62

Estimates only. Round up and buy a little extra to account for waste, spills, and breakage.

Enter your roof run, pitch, and rafter spacing to calculate the rafter length and the number of rafters needed.

How to use the rafter calculator

  1. Enter the horizontal run (per side) in ft.
  2. Enter the pitch (rise per 12) in /12.
  3. Enter the roof length in ft.
  4. Enter the rafter spacing in in.
  5. Optionally add a price to estimate the total project cost.
  6. Read your quantities instantly — no sign-up, and you can print the estimate to take to the supplier.

Worked example

Inputs

Horizontal run (per side)
12 ft
Pitch (rise per 12)
6 /12
Roof length
40 ft
Rafter spacing
16 in

Results

Rafter length
13.42 ft
Rafters per side
31
Total rafters
62

Using the example values above, the rafter calculator returns 13.42 ft (rafter length). Change any field to match your own project and the numbers update instantly.

Formula

Rafter length = run × √(1 + (rise/run)²). Rafters = roof length ÷ spacing + 1, doubled for both sides.

Frequently asked questions

What is roof pitch?
Pitch is the rise in inches for every 12 inches of horizontal run, e.g. 6/12.
What spacing should rafters use?
16 in on center is standard; 24 in is allowed with heavier lumber and lighter loads.

Related calculators