Rafter Length Calculator

Common rafter length from span, pitch, ridge board and overhang, plus rise, plumb and seat cut angles and how many rafters a building needs at your spacing.

The width the rafters span, measured across the top of the walls from outside plate edge to outside plate edge.
in 12
6 means 6 in of rise for every 12 in of horizontal run (6/12).
The rafters stop half the board thickness short of the centerline. A 2× ridge is 1½ in (38 mm). Use 0 for a rafter pair that meets at a point.
How far the tail sticks out past the outside of the wall, measured level, not along the rafter.
Optional. The length of the ridge. Enter 0 to skip the rafter count.

Results

Total rafter length (ridge to tail)
14.46
Measured along the top edge from the plumb cut at the ridge to the tail. Buy the next longer stock length.
Common rafter: ridge to plate line
13.35
Overhang length (along the rafter)
1.12
Rise (ridge above plate line)
6.00
Pitch
6 in 12
Roof angle (seat cut angle)
26.57
Seat (level) cut: the angle between the cut and the rafter edge equals the roof angle.
Plumb cut angle
63.43
Angle between the plumb (vertical) cut and the rafter edge: 90° minus the roof angle.
Rafter length per unit of run
1.118
Rafters per side
24
One at the start, then one every spacing, rounded up to finish at the far end. Doubled end rafters, gable framing and hips or valleys are not counted.
Common rafters, both sides
48 rafters

Estimate only. This tool is for informational and educational purposes. Results depend on your inputs and simplifying assumptions, and are not a substitute for professional engineering, design or financial advice. Always verify with a qualified professional and applicable codes before purchasing, building or making decisions.

How it’s calculated

A common rafter runs from the ridge to the wall plate at the roof's pitch. Its run is half the span, less half the ridge board's thickness, and its length is the hypotenuse of the right triangle formed by that run and the rise. Pitch is the inches of rise per 12 in of horizontal run, so each foot of run needs √(1 + (pitch ÷ 12)²) feet of rafter.

Run = span ÷ 2 − ridge thickness ÷ 2 Length per unit of run = √(1 + (pitch ÷ 12)²) (or 1 ÷ cos(angle)) Rafter (ridge to plate line) = run × length per unit of run Overhang length = horizontal overhang × length per unit of run Total = (run + horizontal overhang) × length per unit of run Rise = span ÷ 2 × pitch ÷ 12 Seat cut angle = arctan(pitch ÷ 12); plumb cut angle = 90° − seat cut angle Rafters per side = ⌈ building length ÷ spacing ⌉ + 1

Example: 24 ft span, 6/12 pitch, 1½ in ridge board, 12 in horizontal overhang. Run = 144 − 0.75 = 143.25 in. Factor = √(1 + 0.5²) = 1.1180. Ridge to plate line = 143.25 × 1.1180 = 160.16 in (13.35 ft); overhang = 12 × 1.1180 = 13.42 in; total = 173.58 in = 14.46 ft, so buy 16 ft stock. Rise = 144 × 0.5 = 72 in (6 ft). Angles: seat cut 26.57°, plumb cut 63.43°. For a 30 ft building at 16 in spacing: ⌈360 ÷ 16⌉ + 1 = 24 rafters per side, 48 in all.

This is geometry only. Rafter size, grade, spacing, ceiling joists or collar ties, and ridge support depend on span, snow and wind loads: use the span tables in your local building code or have an engineer design the roof. Add allowance for the bird's mouth, trimming and waste.

Frequently asked questions

How do I calculate rafter length?

Take half the span (less half the ridge thickness), multiply by the pitch factor √(1 + (pitch ÷ 12)²), and add the overhang times the same factor. A 24 ft span at 6/12 with a 12 in overhang gives about 14.46 ft.

Do I measure the span to the outside or the inside of the walls?

To the outside edges of the wall plates, because that is where the rafters bear. The overhang is then measured from that outside edge.

What are the plumb cut and seat cut angles?

The plumb cut is the vertical cut against the ridge board and the seat (level) cut is the horizontal notch on the plate. For a roof angle θ, the seat cut makes θ with the rafter edge and the plumb cut makes 90° − θ with it. A 6/12 roof is 26.57° and 63.43°.

What size rafters do I need?

That depends on span, spacing, species and grade, and on the snow and wind loads where you live. Use the rafter span tables in your local building code or ask an engineer; this calculator only finds lengths.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Need this calculator branded, changed or built around your own prices?See custom business solutions →

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Added · Last updated · How we check our calculators

Spotted a mistake or missing option? Report a problem· Suggest a calculator