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
- Enter the horizontal run (per side) in ft.
- Enter the pitch (rise per 12) in /12.
- Enter the roof length in ft.
- Enter the rafter spacing in in.
- Optionally add a price to estimate the total project cost.
- 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
Roofing Calculator
Estimate roofing squares and shingle bundles by footprint and pitch.
Board Foot Calculator
Calculate board feet of lumber from thickness, width, length, and quantity.
Siding Calculator
Estimate siding squares for your home's exterior walls.
Stair Calculator
Calculate the number of steps, rise, and run from total height.