Rafter Length Calculator
Calculate roof rafter length from rise and run or roof pitch. Also estimate truss count and total roof truss cost for your building project.
What is a Rafter Length Calculator?
A rafter length calculator helps you determine the exact length of roof rafters needed for your construction project. Whether you are building a new home, adding a shed, or replacing an existing roof, knowing the precise rafter length ensures you cut lumber correctly and avoid material waste. This tool also estimates the number of roof trusses needed and the total project cost.
Rafter length is calculated using the Pythagorean theorem, treating the roof section as a right triangle. The rise (vertical height) and run (horizontal span) form the two legs, while the rafter itself is the hypotenuse. You can input the rise and run directly, or use the roof pitch (slope) to calculate the rafter length automatically.
Rafter Length Formula
The rafter length is calculated using the Pythagorean theorem:
$$ L = \sqrt{R^2 + r^2} $$
Where $L$ is the rafter length, $R$ is the rise (vertical height), and $r$ is the run (horizontal span). When using roof pitch, the rise is derived from the pitch ratio:
$$ \text{pitch} = \frac{\text{rise}}{\text{run}} $$
$$ L = \sqrt{(\text{run} \times \text{pitch})^2 + \text{run}^2} = \text{run} \times \sqrt{\text{pitch}^2 + 1} $$
How Many Trusses Do I Need?
The number of roof trusses depends on the roof length and the on-center spacing between trusses. Standard spacing is typically 24 inches. The formula is:
$$ n = \left\lceil \frac{L_r}{s} \right\rceil + 1 $$
Where $n$ is the number of trusses, $L_r$ is the roof length, and $s$ is the on-center spacing. The total cost is then the number of trusses multiplied by the price per truss, plus optional installation labor costs.
For related calculations, check the Birdsmouth Cut Calculator for rafter notch cuts, or the Roofing Calculator for complete roofing material estimates.
Frequently Asked Questions
How do I calculate rafter length using pitch?
To calculate rafter length from pitch and run, use the formula: rafter length = run x v(pitch² + 1). For example, with a 6:12 pitch (pitch = 0.5) and a 12-foot run, the rafter length is 12 x v(0.5² + 1) = 12 x 1.118 = 13.42 feet. Our calculator handles this automatically.
What is the difference between a rafter and a truss?
A rafter is a single sloped beam that extends from the roof ridge to the exterior wall. A roof truss is a prefabricated framework composed of multiple members connected in a triangular shape. Trusses are typically stronger, require less on-site labor, and can span longer distances than individual rafters.
How far apart should roof rafters be?
Roof rafters are commonly spaced 16 inches or 24 inches on center, depending on local building codes, roof load requirements, lumber size, and climate conditions. Always check your local building codes for specific requirements in your area.
What size rafters do I need for a 12-foot span?
For a 12-foot span with a standard 4:12 pitch, you need rafters approximately 6 feet 4 inches long (since the run is half the span, or 6 feet). The exact length depends on the pitch you choose. Use this calculator to determine the precise rafter length for your specific roof design.
What are common roof pitch values?
Common roof pitches range from 4:12 to 9:12. A 4:12 pitch rises 4 inches per 12 inches of run (about 18.4 degrees), while a 9:12 pitch rises 9 inches per foot (about 36.9 degrees). Low-slope roofs may use 2:12 or 3:12, while steep roofs can exceed 12:12.
Does rafter length include overhang?
The basic rafter length calculation covers the distance from the ridge to the exterior wall. For roof overhangs (eaves), you need to add the overhang length to the total rafter. The Birdsmouth Cut Calculator includes overhang in its calculations.