Rafter Length Calculator
Estimate common rafter length, roof run, roof rise, pitch angle, overhang length, rafter count, lumber length, waste allowance, and material cost for gable roofs, shed roofs, porch roofs, garages, cabins, and roof framing projects.
Calculate Rafter Length
Your Rafter Estimate
Formula used:
Practical recommendation:
Quick Formula Box
Gable roof run = (building span − ridge thickness) ÷ 2
Shed roof run = building span
Rise = run × pitch ÷ 12
Common rafter length = √(run² + rise²)
Overhang rafter length = overhang × √(1 + (pitch ÷ 12)²)
Total rafter length = common rafter length + sloped overhang length
Pitch angle = arctan(pitch ÷ 12)
This calculator estimates common rafter length for a simple roof plane. It does not calculate hip rafters, valley rafters, structural capacity, birdsmouth depth, ridge beam design, collar ties, rafter thrust, snow load, wind uplift, or code-required connections.
Rafter Pitch Reference Table
| Roof Pitch | Angle | Length Factor per 1 ft Run | Typical Use | Planning Note |
|---|---|---|---|---|
| 2/12 | 9.46° | 1.014 ft | Low-slope roofs where allowed | Roofing material limits are very important. |
| 3/12 | 14.04° | 1.031 ft | Low to moderate slope | Often needs special underlayment rules. |
| 4/12 | 18.43° | 1.054 ft | Common residential roofs | Easy to frame and walk compared with steeper roofs. |
| 6/12 | 26.57° | 1.118 ft | Very common gable roof pitch | Good balance of drainage and attic space. |
| 8/12 | 33.69° | 1.202 ft | Steeper architectural roofs | Longer rafters and more roof area. |
| 10/12 | 39.81° | 1.302 ft | Steep roofs | More challenging cutting, bracing, and safety planning. |
| 12/12 | 45.00° | 1.414 ft | Very steep roofs | Rafter length grows quickly as pitch increases. |
How to Use the Rafter Length Calculator
Rafter Length Calculator Guide
A rafter length calculator helps estimate the sloped length of a roof rafter from the roof span, pitch, and overhang. Rafters are the sloping framing members that run from the wall plate to the ridge or upper support. They support roof sheathing, roofing material, underlayment, snow load, wind loads, and other roof loads. Accurate rafter length is important for ordering lumber, cutting rafters, laying out birdsmouth cuts, and planning roof framing.
This calculator focuses on the most common first-step calculation: common rafter length. A common rafter is used on a simple gable roof or shed roof plane. The calculator also estimates roof run, rise, pitch angle, overhang length along the slope, rafter count, stock boards, waste allowance, and cost. It is designed for preliminary material planning, not final structural design.
What This Rafter Length Calculator Does
This tool estimates common rafter length, total sloped length with overhang, roof run, rise, pitch angle, roof length factor, number of rafters, board count, total linear feet, waste allowance, and material cost. It is useful for homeowners, carpenters, shed builders, porch builders, roof framers, remodelers, contractors, cabin builders, and DIY users planning simple roof framing materials.
The default workflow uses only four main inputs: building span, roof pitch, overhang, and price per rafter board. A roof type selector adjusts whether the run is treated as half-span for a gable roof or full span for a shed/lean-to roof. Advanced options include units, roof length, rafter spacing, stock board length, waste allowance, and ridge thickness. This keeps the calculator fast while still supporting practical estimating.
Why Rafter Length Matters
Rafter length affects lumber ordering, roof geometry, roof area, cutting accuracy, fascia alignment, ridge layout, and waste. A small mistake in rafter length can lead to poor fit at the ridge, uneven eaves, incorrect overhang, or extra cutting. For a full roof, repeated small errors can turn into a large layout problem.
Rafter length also affects cost. Steeper roofs use longer rafters than low-pitch roofs for the same building width. Overhangs add additional sloped length. Stock board length matters because a 12-foot rafter may not be practical from a 10-foot board. Estimating rafter length before buying lumber helps reduce waste and avoid short boards.
Rafter Length Formula Explained
The basic rafter length calculation uses the Pythagorean theorem. A roof rafter forms the hypotenuse of a right triangle. The horizontal run is one leg, and the roof rise is the other leg. The rafter length is the sloped side.
For a gable roof, the run is usually half the building span, adjusted for ridge board thickness when desired:
Run = building span ÷ 2
For a shed roof or lean-to roof, the run may be the full horizontal distance from the lower support to the upper support:
Run = roof span
Roof pitch tells you how much the roof rises for every 12 inches of run:
Rise = run × pitch ÷ 12
Then the rafter length is:
Rafter length = √(run² + rise²)
For example, a 24-foot-wide gable roof with a 6/12 pitch has a run of about 12 feet. The rise is 12 × 6 ÷ 12, or 6 feet. The common rafter length before overhang is √(12² + 6²), or about 13.42 feet.
Overhang and Sloped Length
Many roofs include an eave overhang. If the overhang is measured horizontally, it must be converted to the sloped length along the rafter. A 12-inch horizontal overhang on a 6/12 roof is not exactly 12 inches along the rafter; it is longer because it follows the slope.
The calculator uses a pitch factor:
Pitch factor = √(1 + (pitch ÷ 12)²)
Then it multiplies the horizontal overhang by the pitch factor. This creates a better estimate for the extra rafter length needed beyond the wall line. Final rafter cutting may still need adjustment for fascia, birdsmouth seat cut, plumb cut, ridge contact, and tail details.
Practical Applications
Homeowner Uses
Contractor Uses
Common Mistakes to Avoid
A common mistake is using the full building width as the rafter run for a gable roof. For a standard gable roof, each common rafter usually runs from the wall to the ridge, so the run is half the span. Shed roofs are different because one rafter may run the full roof depth from low wall to high wall.
Another mistake is forgetting the overhang. If you calculate only wall-to-ridge length, your rafters may be too short for eaves. Users also sometimes measure pitch incorrectly. A 6/12 pitch means 6 inches of rise per 12 inches of horizontal run, not 6 degrees.
Ridge thickness can also affect layout. When rafters meet against a ridge board, the theoretical run may need adjustment by half the ridge thickness. This calculator includes an optional ridge thickness setting for estimating, but final cuts should be laid out from actual framing conditions.
Expert Recommendations
Use the calculator for estimating and planning, then verify final rafter cuts with a framing square, speed square, construction calculator, or framing plan. Mark one test rafter carefully before cutting the full batch. Confirm the birdsmouth seat cut, plumb cut, ridge cut, tail length, fascia detail, and wall plate position.
For structural design, verify rafter size, species, grade, spacing, span, roof load, snow load, wind uplift, ceiling joists, collar ties, ridge beam requirements, bracing, and fastening. Roof framing is structural work, so material quantity is only one part of a safe roof assembly.
Conclusion
This rafter length calculator gives a fast, practical estimate for common rafter length, roof run, rise, pitch angle, overhang length, rafter count, board count, waste allowance, and cost. It works for simple gable roofs, shed roofs, porch roofs, garages, cabins, and DIY roof framing projects. For best results, enter accurate span and pitch, include overhang, choose realistic rafter spacing, and verify final cuts and structural requirements before building.