Rafter Calculator

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

Your measurements

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 the span and pitch and this calculator returns rafter length, the number of rafters at your chosen spacing, and the plumb and seat cut angles.

Rafter length is measured along the slope, which is always longer than the horizontal run. That difference is where most manual estimates go wrong.

Also works as a roof rafter length calculator, common rafter calculator, and ridge beam layout tool.

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.

Pitch, run and length

For a common rafter, length equals the run multiplied by the rafter length factor for the pitch. A 6/12 pitch has a factor of 1.118, so a 12 ft run gives a 13.4 ft rafter before overhang.

Add the overhang along the slope, not horizontally, and add the ridge board thickness deduction of half the ridge stock to the top of each rafter.

Spacing and count

16 inch on centre is standard for most roof loads, with 24 inch used for lighter loads and shorter spans. Count is roof length in inches divided by spacing plus one.

The birdsmouth seat cut should not remove more than one third of the rafter depth or the rafter loses too much strength at the bearing point.

Pitch multipliers

PitchMultiplierAngle
3/121.03114.0°
4/121.05418.4°
6/121.11826.6°
8/121.20233.7°
12/121.41445.0°

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.
How do I calculate rafter length?
Square the run, square the rise, add them, take the square root. Or multiply the run by the rafter factor for your pitch.
How far apart should rafters be?
16 inches on centre is standard residential spacing; 24 inches is used where the span and load allow.

Related calculators