Rafter Calculator

Calculate the length of a common roof rafter from the building span and the roof pitch — get the rafter length, the rise and the run, in feet and inches.

Geometric estimate of common rafter length only. It does not size rafters for load, allow for ridge-board thickness, overhang, birdsmouth or bearing, and is not a substitute for engineered span tables or local code. Confirm member sizes and spans with the IRC/AWC span tables or a structural pro.

How to calculate rafter length

A common rafter is the sloped member of a roof, and its length is the hypotenuse of a right triangle. The horizontal run is half the building span; the vertical rise is the run times the pitch (rise per 12 inches of run). The rafter length is then the square root of run² plus rise². Enter the span and pitch above — add an overhang if you want — and the calculator returns the length in feet and feet-and-inches.

rafter = √(run² + rise²),  run = span ÷ 2,  rise = run × (pitch ÷ 12)

For example, a 24 ft span at a 6/12 pitch has a 12 ft run and a 6 ft rise, so the rafter is √(12² + 6²) = √180 ≈ 13.42 ft (about 13 ft 5 in) before any overhang. A steeper pitch means a longer rafter for the same span.

Common roof pitches

PitchAngleRafter per 12 ft run
4/1218.4°12.6 ft
6/1226.6°13.4 ft
9/1236.9°15.0 ft
12/1245°17.0 ft

This gives the geometric length, not the structural size — it does not account for the ridge board, birdsmouth or load. Confirm the rafter size and span against the AWC/IRC span tables or a pro before framing. For the diagonal of any right triangle, see the surface area calculator for related geometry.

Frequently asked questions

How do I calculate rafter length?

A common rafter is the hypotenuse of a right triangle. The run is half the span; the rise is run × (pitch ÷ 12). The rafter length is √(run² + rise²). For a 24 ft span at a 6/12 pitch: run 12 ft, rise 6 ft, length √(144 + 36) ≈ 13.4 ft, before overhang. The calculator does this for you.

What size rafter do you need for a 12 foot span?

It depends on the wood species, grade, spacing and roof load, not just the span — for example, 2×6 or 2×8 rafters at 16 inches on-center often cover a 12 ft span, but you must check the AWC/IRC span tables for your conditions. This tool gives the geometric length, not the structural size.

How far can a 2x6 rafter span without support?

Roughly 12–18 feet depending on species, grade, spacing and snow load — there is no single number. Always confirm against the published rafter span tables for your lumber and load, or ask a builder or engineer; do not rely on a rule of thumb for a roof.

Sources

Related tools