Roof Rafter Calculator
Calculate roof rafter length, roof rise, horizontal run, pitch angle, overhang length, total board length, rafter count, roof area, birdsmouth planning values, lumber quantity, and material cost for gable, shed, lean-to, garage, porch, and simple roof framing projects.
Calculate Rafter Length
Your Rafter Estimate
Formula used:
Practical recommendation:
Quick Formula Box
Gable rafter run = building span ÷ 2 - ridge board thickness ÷ 2
Shed / lean-to rafter run = building span
Pitch factor = √(1 + (pitch ÷ 12)²)
Roof rise = run × (pitch ÷ 12)
Common rafter length = run × pitch factor
Overhang rafter length = overhang × pitch factor
Total rafter board length = common rafter length + overhang rafter length
Rafter count = ceil((roof length × 12) ÷ spacing in inches) + 1, multiplied by roof sides
The calculator uses right-triangle geometry. The horizontal run and vertical rise form the two legs of the triangle, while the rafter is the sloped hypotenuse.
Roof Rafter Reference Table
| Rafter Item | Common Unit | Typical Formula / Meaning | Best Use | Common Mistake |
|---|---|---|---|---|
| Run | Feet | Horizontal distance from wall to ridge | Rafter geometry | Using full building width for each side of a gable roof. |
| Rise | Feet | Run × pitch ÷ 12 | Roof height and slope planning | Confusing rise with rafter length. |
| Pitch | Rise per 12 in run | Example: 6/12 rises 6 inches per foot | Roof slope selection | Mixing pitch ratio and angle degrees. |
| Pitch angle | Degrees | atan(pitch ÷ 12) | Saw settings and layout reference | Using degrees where pitch ratio is required. |
| Common rafter | Feet | Run × pitch factor | Main sloped framing member | Forgetting ridge board adjustment. |
| Overhang length | Feet | Overhang × pitch factor | Eave extension planning | Adding horizontal overhang instead of sloped overhang length. |
| Birdsmouth | Inches | Seat cut rests on wall plate | Layout planning | Cutting too deep and weakening the rafter. |
| Rafter spacing | Inches on center | 12, 16, or 24 inches common | Rafter count and load planning | Choosing spacing without checking span tables and load. |
How to Use the Roof Rafter Calculator
Roof Rafter Calculator Guide
A roof rafter calculator helps estimate the geometry and material quantities for a framed roof. Rafters are sloped framing members that run from the wall plate to the ridge, ridge beam, or upper support. They define the roof slope, support roof sheathing and covering, and transfer loads into the walls or beams below.
This calculator estimates common rafter length, roof rise, horizontal run, pitch factor, roof pitch angle, overhang length, total board length, rafter count, roof area, board length to buy, material quantity, and cost. It is useful for shed roofs, lean-to roofs, garages, porches, small cabins, additions, and simple gable roof planning. It is not a structural span calculator and does not replace code tables or engineering.
What This Roof Rafter Calculator Does
The calculator uses building width, roof length, roof pitch, rafter spacing, roof type, overhang, ridge board thickness, waste allowance, and lumber price to estimate rafter geometry and quantity. The default workflow needs only four primary inputs: building width, roof length, pitch, and spacing. Advanced settings allow more refined planning without overwhelming first-time users.
The results show common rafter length, roof rise, pitch angle, rafter count, board length to buy, roof area, total linear feet of rafter lumber, approximate material cost, formula used, interpretation, and practical recommendation. These outputs are designed to help users understand both the math and the material implications.
Why Rafter Length Matters
Rafter length affects lumber ordering, roof height, roof area, sheathing quantities, roofing quantities, eave overhang, fascia placement, birdsmouth layout, ridge height, and roof appearance. A small error in run or pitch can create rafters that are too short or too long. That can lead to poor fit, uneven eaves, wasted lumber, and delays.
Rafter length is also tied to safety and performance. A long rafter may require a larger lumber size or closer spacing depending on species, grade, load, and span. A roof in a heavy snow area may need stronger rafters than the same roof in a mild climate. Geometry is only one part of a safe roof design.
Rafter Length Formula Explained
A rafter is the hypotenuse of a right triangle. The run is the horizontal leg, and the rise is the vertical leg. Roof pitch tells you how much the roof rises for every 12 inches of horizontal run.
The roof rise is:
Rise = run × pitch ÷ 12
The pitch factor is:
Pitch factor = √(1 + (pitch ÷ 12)²)
The common rafter length is:
Common rafter length = run × pitch factor
For example, a gable roof with a 24-foot span has a 12-foot run before ridge adjustment. With a 6/12 pitch, the pitch factor is about 1.118. The common rafter length is about 13.42 feet before overhang and layout allowances. If the eave overhang is 1 foot horizontally, the sloped overhang length is about 1.12 feet, making the total board length about 14.54 feet before rounding to a stock board length.
Gable Roofs, Shed Roofs, and Lean-To Roofs
For a gable roof, each rafter usually spans from an exterior wall to the ridge, so the run is about half the building span. If a ridge board is used, half the ridge board thickness is often subtracted from the run for layout. For a shed roof or lean-to roof, the rafter may span the full horizontal width from low wall to high wall, so the run is usually the full building width.
A lean-to roof is often similar to a shed roof but attached to an existing wall or building. Wall flashing, ledger attachment, uplift resistance, and water management are important. The calculator estimates geometry, but attachment details must be designed correctly.
Practical Applications
Homeowner and DIY Uses
Contractor and Builder Uses
Common Mistakes to Avoid
A common mistake is using full building width as the run for a gable roof. For a symmetrical gable roof, the run is usually half the span, not the full span. Another mistake is adding the horizontal overhang directly to the rafter length. Overhang should also be adjusted by the pitch factor because it follows the roof slope.
Another mistake is ignoring the ridge board or ridge beam. A ridge board is not the same as a structural ridge beam. A ridge board mainly provides a nailing surface for opposing rafters, while a ridge beam supports vertical roof loads and needs proper sizing and supports. The calculator allows a small ridge thickness adjustment, but the structural role must be determined separately.
Users also sometimes cut birdsmouth notches too deep. A birdsmouth should provide bearing on the wall plate without removing too much rafter depth. Excessive notching can weaken the rafter. Check code guidance, span tables, and framing details before cutting.
Expert Recommendations
Use this calculator for geometry and material planning, then verify rafter size, spacing, lumber species, grade, snow load, live load, dead load, wind uplift, roof sheathing span rating, ceiling joists, collar ties, rafter ties, ridge beam requirements, bearing length, fasteners, and connectors. For habitable structures, permits and inspections may be required.
For best results, measure the actual span carefully, confirm the pitch, decide whether the roof uses a ridge board or ridge beam, and create a layout plan before cutting. When possible, make a test rafter pattern from one board, verify fit, then use it as a template for the remaining rafters.
Conclusion
This roof rafter calculator estimates rafter length, rise, run, pitch angle, overhang length, board length, rafter count, roof area, total lumber length, and cost. It is ideal for early planning of simple gable, shed, and lean-to roof framing projects. For final construction, always verify structural capacity, span limits, code requirements, connections, and roof load conditions before cutting or installing rafters.