Rafter Length Calculator
Calculate common rafter line length from building span or roof run, pitch, and horizontal overhang. Define the ridge reference before using the result for framing layout.

How to calculate common rafter length
- 01Choose span, run, or measured rise
Use span only for a centered symmetrical gable. Otherwise enter the actual horizontal run.
- 02Enter pitch and overhang
Enter X/12 pitch and measure overhang horizontally, not along the rafter edge.
- 03Read the line length
Use the body and tail results to understand the geometry before laying out cuts.
The rafter length calculator finds the sloped geometric line from the upper roof reference to the exterior bearing line, then adds the sloped tail when you enter a horizontal overhang. It does not determine structural rafter size or final cut layout. The Gable Roof Guide explains when half-span geometry is appropriate.
Define span, run, and the ridge reference
Measure building span horizontally between the two exterior bearing lines. On a centered symmetrical gable, one roof run extends from a bearing line to the ridge centerline and equals half the span.
If a ridge board occupies the centerline, its face sits half the board thickness away from that line. Apply this deduction only when the run is explicitly measured to the ridge centerline.
Preserve measured geometryWhen you enter rise and run directly, those values already define the right triangle. The calculator does not apply a separate ridge deduction.
Rafter length formulas and methodology
The engine converts every length to inches, gets the pitch ratio and multiplier from the shared Roof Pitch Calculator engine, and retains full precision until display. U.S. results round to the nearest 1/16 inch.
Centered-gable run
run = span ÷ 2
Pitch multiplier
√(1 + (pitch ÷ 12)2)
Line to bearing
effective run × multiplier
Total line length
(effective run + overhang) × multiplier
Line length is not final cut layout
The calculated line runs parallel to the rafter edge. It connects the selected upper reference to the exterior bearing reference, then continues along the tail when you include overhang.
A framing layout still needs verified plumb cuts, birdsmouth geometry, bearing, fascia treatment, stock allowance, and member sizing. Keep those decisions separate from this geometric result.
Rafter length for a 12-foot horizontal run
This engine-generated table shows how pitch changes common-rafter line length before overhang or ridge-board adjustment. Use the complete pitch and angle chart for additional slope conversions.
| Pitch | Angle | Multiplier | Line length |
|---|---|---|---|
| 0/12 | 0.00° | 1 | 12 ft 0 in |
| 3/12 | 14.04° | 1.0308 | 12 ft 4 7/16 in |
| 4/12 | 18.43° | 1.0541 | 12 ft 7 13/16 in |
| 6/12 | 26.57° | 1.118 | 13 ft 5 in |
| 8/12 | 33.69° | 1.2019 | 14 ft 5 1/16 in |
| 10/12 | 39.81° | 1.3017 | 15 ft 7 7/16 in |
| 12/12 | 45.00° | 1.4142 | 16 ft 11 5/8 in |
Common rafter calculation mistakes
- 01Dividing span by two for an offset ridge or shed roof.
- 02Measuring overhang along the slope instead of horizontally.
- 03Subtracting ridge-board thickness from a run that already ends at the board face.
- 04Applying a ridge deduction to directly entered rise-and-run geometry.
- 05Treating geometric line length as structural member sizing or final cut length.
Limitations and safety
- This calculator includes
- Common-rafter geometry, pitch conversion, ridge reference, and horizontal overhang.
- It excludes
- Structural capacity, lumber grade, loads, spacing, connections, birdsmouth design, and hip, valley, or jack rafters.
- Work safely
- Use plans and accessible measurements where possible. Follow OSHA residential fall-protection guidance for framing and work at height.
Technical references
- HUDResidential Structural Design Guide, Chapter 5Conventional roof framing, exterior bearing, rafters, and ridge-board context.
- JohnsonCALC-1500 Construction Calculator ManualCommon-rafter example using half span as run, pitch, rise, and diagonal length.
- OSHAResidential Fall Protection GuidanceFall protection while installing ridge poles, rafters, and roof framing.
Rafter length calculator questions
How do I calculate rafter length from span and pitch?
For a centered symmetrical gable, divide the building span by two to get the horizontal run. Multiply that run by the pitch multiplier, or calculate the square root of run squared plus rise squared. Add the sloped tail separately when the rafter extends beyond the exterior bearing line.
Is rafter run always half the building span?
No. Run equals half span only for a centered symmetrical gable. Use the actual horizontal distance for a shed roof, offset ridge, unequal roof planes, or any layout that does not place the ridge at the center of the span.
Does overhang increase rafter length?
Yes. Enter overhang as its horizontal projection. The calculator multiplies that horizontal distance by the same pitch factor to find the additional sloped tail length.
How do I account for ridge-board thickness?
When span or run is measured to the ridge centerline, subtract half the ridge-board thickness from the horizontal run before calculating the line to the ridge-board face. Do not apply that deduction when the run already ends at the board face or when rise and run directly define the measured triangle.
Can I use this calculator for a shed or lean-to roof?
Yes. Select Run + Pitch and enter the full horizontal run for the roof plane. Do not divide that run by two. Confirm the actual upper endpoint before applying any ridge-board adjustment.
Does this calculator determine rafter size or birdsmouth cuts?
No. It calculates geometric common-rafter line length. Lumber size, species, grade, spacing, loads, connections, bearing, birdsmouth depth, and cut layout require approved plans, applicable code provisions, manufacturer instructions, or qualified structural guidance.