Free rafter calculator

Rafter Calculator

Enter the building width, pitch and overhang to get rafter length and cut angles.

Ridge and spacing

How to use the rafter calculator

  1. Enter the building width from the outside of one wall to the outside of the other.
  2. Enter the pitch (inches of rise per 12) and the level overhang past the wall.
  3. Add the building length to count rafters; change ridge thickness or spacing under Ridge and spacing.

Rafter formulas

Run = building width ÷ 2 − ridge thickness ÷ 2

Rafter length = run × √(1 + (pitch ÷ 12)²)

Plumb cut = arctan(pitch ÷ 12) · Seat cut = 90° − plumb cut

Measure rafter length along the top edge (the measuring line) from the seat cut to the ridge plumb cut. Find the pitch from a measurement with the roof pitch calculator, and sheathing for the roof with the plywood calculator.

Frequently asked questions

How do I calculate rafter length?

Take the run — half the building width minus half the ridge board — and multiply it by the rafter factor for your pitch, √(1 + (pitch ÷ 12)²). A 24 ft wide building with a 1 1/2" ridge has a run of 143 1/4"; at 6/12 (factor 1.118) the rafter is 160 3/16" from the wall to the ridge. Add the tail for the overhang.

What angle do I cut a rafter at?

The plumb cut (at the ridge and the tail) is arctan(pitch ÷ 12) — 26.6° for a 6/12 roof. The seat cut of the bird’s mouth is square to it, 90° minus the plumb angle. On a speed square, pivot to the pitch number on the common scale.

How many rafters do I need?

Divide the building length by the spacing, round down, add one, and double it for the two sides. A 40 ft building at 16" on centre needs 31 rafters per side, 62 in all.

What size rafters do I need?

That depends on the span, spacing, wood species and the snow and dead loads where you build. Check the rafter span tables in your local code (IRC R802.4) before choosing between 2×6, 2×8, 2×10 or 2×12.

How is the overhang measured?

Here, as the level distance from the outside of the wall to the end of the rafter tail. The tail length along the rafter is that distance times the rafter factor.