Rafter length calculator

Give the span, the pitch, the overhang and the ridge board, and see the rafter length, run, rise and roof angle as you type, with how many rafters the roof takes.

Takes off half the ridge board on each side and adds the overhang along the slope, not level.

The roof

Span
The rise for every 12 of run: 6 in 12 rises 6 in each foot.
Overhang optional
Ridge board optional

Span is the building width, outside of wall to outside of wall. Overhang is measured level, from the wall out. Ridge board is its thickness.

How many rafters

Building length
Free for your own website, with no account and no ads.

Put the rafter length calculator on your website

Paste this code into an HTML or embed block on any page. Your visitors use the calculator right there, the same as here: free, no sign-up, no ads, and nothing they type is sent anywhere.

Preview it

It fits any width from a phone up to 640 px and grows to the calculator's height. The line under it links to this page, so your visitors can see where it comes from. Every calculator you can embed

Free calculator by Billsmith

Rafter length14 ft 5 9/16 in4.335 m
Rafters6262
See the working

Rafter length, worked out

The run

Each rafter covers half the span, less half the ridge board: (288 in − 1 1/2 in) ÷ 2 = 143 1/4 in, which is 11 ft 11 1/4 in.

The slope factor

A rafter is the long side of a right triangle whose short sides are the run and the rise. For every 12 of run at 6 in 12 it is √(12² + 6²) = 13.42, so the rafter is 13.42 ÷ 12 = 1.118 times the run. The roof pitch calculator gives the factor for any pitch.

Length and overhang

143 1/4 in × 1.118 = 160.16 in, 13 ft 4 3/16 in, from the ridge to the outside of the wall. The overhang is level, so it grows on the slope too: 12 in × 1.118 = 13.42 in. Together, 14 ft 5 9/16 in.

Angle and rise

The roof angle is arctan(6 ÷ 12) = 26.57°, the setting for the plumb cuts at the ridge and the tail. The rise from the top of the wall to the ridge line is 143 1/4 × 6 ÷ 12 = 71 5/8 in.

How many rafters

Along a 40 ft building at 16 in on center there are 480 ÷ 16 = 30 spaces, so 31 rafters a side, 62 in all. Then press "Put this on an estimate" to put them on a line of the estimate template at your price.

Questions

How do I calculate rafter length?

Halve the span less the ridge board thickness to get the run, multiply by the slope factor √(1 + (pitch ÷ 12)²), then add the overhang times the same factor. A 24 ft span at 6 in 12 with a 1 1/2 in ridge and a 12 in overhang: 143.25 in × 1.118 + 12 in × 1.118 = 173.57 in, or 14 ft 5 9/16 in.

How long is a rafter for a 6/12 pitch?

At 6 in 12 the rafter is 1.118 times the run. With a 12 ft run that is 13 ft 5 in (13.42 ft) before the overhang and the ridge board.

What is the slope factor for a roof pitch?

It is √(1 + (rise ÷ 12)²): 4 in 12 is 1.054, 6 in 12 is 1.118, 8 in 12 is 1.202, 12 in 12 is 1.414.

Do I take the ridge board off the rafter length?

Yes, half its thickness on each side: the rafters meet the faces of the ridge board, not its center line. With a 1 1/2 in ridge each run is 3/4 in shorter.

How many rafters do I need?

Divide the building length by the spacing, round down, add one, and double it for both sides. 40 ft at 16 in on center is 480 ÷ 16 = 30, plus 1 is 31 a side, 62 rafters.