Roof Rafter Length Calculator
Calculating rafter length is one of the most common framing tasks in residential construction. The rafter is the hypotenuse of a right triangle formed by the horizontal run and the vertical rise. Given a roof pitch expressed as X-in-12 (X inches of rise per 12 inches of run), the rise = Run x (Pitch / 12), and rafter length = sqrt(Run squared + Rise squared). This calculator also gives the roof angle in degrees and the pitch multiplier, which is a useful factor for computing roof area. Enter the horizontal run (half the building span for a simple gable) and the pitch.
Rafter length formula
Rise = Run x (Pitch / 12)
Rafter (to ridge) = sqrt(Run^2 + Rise^2)
Tail = sqrt(Overhang^2 + (Overhang * Pitch/12)^2)
Total rafter = Rafter to ridge + Tail
The pitch multiplier (rafter factor) equals sqrt(1 + (pitch/12) squared). Multiply the horizontal run by the pitch multiplier to get rafter length without computing rise separately. The roof angle in degrees is arctan(pitch / 12) converted from radians.
Common roof pitches
- 2/12 to 3/12: low-slope roof, requires special waterproofing measures.
- 4/12 to 6/12: moderate pitch, most common in residential construction.
- 7/12 to 9/12: steep pitch, used for aesthetic and snow-shedding purposes.
- 10/12 to 12/12: very steep, requires additional safety measures during construction.
- Above 12/12: extremely steep, uncommon in standard residential design.
Roof rafter calculator: frequently asked questions
How do I calculate rafter length from pitch and run?
Rafter length = sqrt(run squared + rise squared). First calculate rise from pitch: Rise = Run x (pitch / 12). For a 6/12 pitch with a 12-foot run, rise = 12 x 6/12 = 6 feet, rafter = sqrt(144 + 36) = sqrt(180) = 13.42 feet.
What is roof pitch?
Roof pitch is the ratio of vertical rise to horizontal run, expressed as X-in-12. A 6/12 pitch means the roof rises 6 inches for every 12 inches of horizontal run. Common residential pitches range from 4/12 to 12/12.
What is the difference between span and run?
Span is the total horizontal width of the building, measured from outside wall to outside wall. Run is half the span for a simple gable roof (the horizontal distance from the exterior wall to the ridge). Enter the run (half-span) in this calculator.
Do I need to add extra length for the rafter tail (overhang)?
Yes. The rafter length from this calculator is to the ridge. Add the overhang length (eave extension) separately. A typical residential overhang is 12 to 24 inches, calculated as: overhang = sqrt(eave_run squared + eave_rise squared) using the same pitch ratio.
What is the minimum roof pitch for shingles?
Asphalt shingles require a minimum 2/12 pitch with ice-and-water shield underlayment, and a minimum 4/12 for standard installation per most shingle manufacturer warranties and local codes.
Official sources
- International Code Council: International Residential Code (IRC) Section R802 Roof-Ceiling Construction.
- APA - The Engineered Wood Association: Span tables and design values for engineered wood products.
Reviewed by the CalculatorHub team, edited by James Graham, 15 June 2026. See our methodology.