ToolNestr

Rafter Length Calculator

Find the rafter length you need to cut, from the horizontal run, roof pitch, and overhang, using the Pythagorean theorem.

Reviewed by the ToolNestr Editorial Team — July 2026

Disclaimer: Results are estimates for planning only. Always verify quantities, measurements and structural loads against local building codes and a qualified professional before purchasing materials or building.
Rafter as the hypotenuse of run and rise A right triangle formed by run, rise, and the rafter length, with the overhang extending past the wall run rise overhang Rafter length rise = run × pitch⁄12 rafter = √(run² + rise²) total = rafter + overhang⁄cos(angle)
The rafter is the hypotenuse of the run and rise; the overhang extends the tail past the wall.

How the rafter length calculator works

A common rafter forms the hypotenuse of a right triangle: the run is the horizontal leg, from the outside wall to the center of the ridge, and the rise is the vertical leg, how much the roof climbs over that run. The rise is found from the pitch — the rise-per-12-inches ratio — multiplied by the actual run and divided by 12.

With both legs known, the Pythagorean theorem gives the rafter length: the square root of the run squared plus the rise squared. That is the length from the top of the wall plate to the centerline of the ridge. The overhang, the part of the rafter that extends past the wall to form the eave, is added on separately along the same slope angle, since it is not part of the run-to-ridge triangle.

This is standard IRC/IBC rafter geometry — the same right-triangle relationship every span table and framing square is built on. In the field, carpenters typically shorten the final cut by half the ridge board's thickness on each side so the two opposing rafters meet cleanly at the ridge; that small trim happens after laying out this theoretical length.

Rafter sizing and span limits follow IRC Chapter 8 (Roof-Ceiling Construction) and the AWC span tables referenced by Section R802.

1

Enter the run

Half the building's span, in feet, from wall to ridge centerline.

2

Set the pitch

The rise per 12 inches of run, such as 6 for a 6-in-12 roof.

3

Add the overhang

Include your eave overhang for the full rafter cut length.

The formula explained

Rise

rise = run × pitch⁄12. A 12 ft run at 6 in 12: 12 × 6⁄12 = 6 ft.

Run-to-ridge length

= √(run² + rise²) = √(144+36) = √180 = 13.42 ft.

With overhang

An 18″ (1.5 ft) overhang along the slope: 1.5⁄cos(26.57°) = 1.68 ft. Total = 13.42 + 1.68 = 15.1 ft.

Worked example

A 28 ft wide building (14 ft run) at 8 in 12 pitch, 12″ overhang.

Rise: 14 × 8/12 = 9.33 ft
Main length: √(196+87.1) = 16.83 ft
Angle: atan(8/12) = 33.7°
Total with overhang: ≈ 18.03 ft

Real-world context

A garage addition with a 32 ft span (16 ft run) at a moderate 5 in 12 pitch with a 24-inch overhang is a common permit-ready scenario. The rise works out to 16 × 5⁄12 = 6.67 ft, giving a run-to-ridge length of √(256+44.4) = 17.33 ft, and with the overhang added along the 22.6° slope, the total cut length comes to 19.5 ft — long enough that most lumberyards would special-order 20 ft dimensional stock rather than splice shorter boards.

A steep 9 in 12 roof over a compact 20 ft span (10 ft run) with a 16-inch overhang shows how pitch, not span, drives length on smaller structures. The rise is 7.5 ft, the run-to-ridge length is exactly √(100+56.25) = 12.5 ft, and at a 36.9° angle the overhang adds relatively more slope length per inch than a shallow roof would, bringing the total to 14.17 ft.

A wide 40 ft span (20 ft run) at a shallow 4 in 12 pitch with an 18-inch overhang is typical of ranch-style additions. Rise is 6.67 ft, the main rafter length is 21.08 ft, and the gentle 18.4° angle means the overhang barely stretches beyond its flat 1.5 ft measurement, landing the total near 22.66 ft — a length that pushes into engineered I-joist or LVL territory rather than standard dimensional lumber for many species and grades.

Lumberyards typically stock dimensional rafter stock in 2 ft increments — 12, 14, 16, 18, 20, 22, and 24 ft lengths — so once the calculator returns a total, framers round up to the next available stock length rather than ordering an exact custom cut. This is also the point where many builders decide whether trussed rafters make more economic sense than site-built stick framing, since factory trusses become more competitive as calculated span and rise increase.

Common misconceptions

"Run means the full width of the building." It is half that. For a simple gable roof, the run is measured from the outside wall to the centerline of the ridge — for a 24 ft wide building, the run is 12 ft, not 24 ft. Entering the full span instead of half of it roughly doubles the calculated rafter length.

"The rafter length calculation already accounts for the ridge board and birdsmouth cuts." It does not. This calculator gives the theoretical centerline-to-centerline length. Real-world cuts get shortened by half the ridge board's thickness at the top and adjusted at the birdsmouth notch where the rafter meets the wall plate — both are field adjustments made after this baseline length.

Related calculators

Frequently asked questions

How do I calculate rafter length?

A rafter is the hypotenuse of a right triangle formed by the horizontal run and the vertical rise. Find the rise by multiplying the run by the pitch (rise per 12 inches, divided by 12), then use the Pythagorean theorem: rafter length equals the square root of run squared plus rise squared.

What is roof run versus roof span?

The span is the total width of the building; the run is half the span for a simple gable roof, since the rafter travels from the outside wall to the center ridge. Enter the run — half the span — not the full building width.

Do I need to add anything for the overhang?

Yes. This calculator finds the length from the wall plate to the ridge. Add your desired eave overhang separately, since it extends the rafter tail beyond the wall and is not part of the run-to-ridge span.

Does this account for the ridge board thickness?

No, this gives the theoretical centerline length. In the field, carpenters shorten the actual cut by half the ridge board thickness on each rafter so the pair meets correctly at the ridge — a small adjustment made after this length is found.

Sources & references

This tool uses standard formulas and reference values from:

  • American Concrete Institute — ACI 318, Building Code Requirements for Structural Concrete. concrete.org
  • ICC — International Residential Code (IRC), span, footing and framing tables. codes.iccsafe.org
  • APA – The Engineered Wood Association, allowable span and load guidance.

Estimates for planning only. Span, load and code values vary by jurisdiction — verify against your local adopted code and a licensed engineer before building.

All tool categories

🏠 Construction & Home Improvement (105 tools)
🎨 Paint Coverage Calculator📐 Square Footage Calculator📏 Perimeter Calculator🏗️ Concrete Calculator🧱 Concrete Slab Calculator⬜ Tile Calculator🪵 Flooring Calculator🧱 Brick Calculator🚧 Fence Calculator🪵 Deck Calculator🏠 Roofing Calculator⛰️ Gravel & Sand Calculator🌿 Mulch Calculator🪵 Board Foot / Lumber Calculator🏊 Pool Volume Calculator📦 Cubic Yardage Calculator🧱 Drywall Calculator🛡️ Insulation Calculator🌱 Sod Calculator🟫 Paver Calculator🪜 Stair Calculator🧊 Concrete Block Fill Calculator🛢️ Sonotube Concrete Calculator🕳️ Concrete Footing Calculator🔻 Concrete Stairs Calculator🪣 Mortar Mix Calculator🔳 Thinset Coverage Calculator⏲️ Concrete Curing Time Calculator🏋️ Metal Weight Calculator🔗 Rebar Calculator🔨 Framing Stud Calculator🚰 Pipe Weight Calculator🔲 Retaining Wall Block Calculator🏘️ Vinyl Siding Calculator🧽 Tile Grout Calculator🌀 Spiral Staircase Calculator❄️ AC Unit Size Calculator🔥 Furnace BTU Calculator🌡️ Home Heat Loss Estimator🚧 Fence Post Spacing Calculator🖌️ Deck Stain Calculator🖼️ Wallpaper Roll Calculator♿ ADA Ramp Slope Calculator🐔 Chicken Coop Size Calculator📐 Roof Pitch Calculator📏 Rafter Length Calculator🏚️ Roof Truss Spacing Calculator❄️ Snow Load Calculator🏗️ Metal Roofing Calculator🛖 Gambrel Roof Rafter Calculator🛣️ Asphalt Driveway Calculator🪨 Road Base Calculator🛁 Water Tank Volume Calculator🪷 Pond Volume Calculator🚿 GPM Flow Rate Calculator🫗 Pipe Volume Calculator🚒 Fire Flow Calculator🔄 Square Feet to Cubic Yards Calculator🧴 Gallons per Square Foot Calculator📤 Box Weight Calculator🪚 Miter Angle Calculator🔺 Compound Angle Calculator📉 Grade & Slope Calculator⭕ Bolt Circle Calculator🐎 Round Pen Calculator🔩 Countersink Depth Calculator🌉 Beam Deflection Calculator💠 Bending Stress Calculator🔧 Bolt Torque Calculator⚡ Welding Amperage Calculator🗳️ Electrical Box Fill Calculator🚪 Door Header Size Calculator📊 Floor Joist Span Calculator🧥 Insulation R-Value Calculator🟦 Concrete Block (CMU) Count Calculator🏛️ Concrete Column Calculator⚖️ Concrete Weight Calculator🔘 Post Hole Concrete Calculator🪟 Board and Batten Calculator💧 French Drain Calculator🗿 Stone Weight Calculator🧮 Steel Plate Weight Calculator🌬️ Air Changes Per Hour (ACH) Calculator⛩️ Arch Layout Calculator🔆 Boiler Size Calculator🧶 Carpet Calculator🧾 DIY Shed Cost Calculator🧪 Epoxy Resin Calculator🗺️ Floor Area Ratio (FAR) Calculator🏕️ Hoop House Calculator📶 Ladder Angle Calculator🏖️ Paver Sand Calculator📚 Plywood Sheet Calculator🎋 Shiplap Calculator🪞 Wainscoting Calculator🪛 Birdsmouth Cut Calculator🛻 Concrete Driveway Cost Calculator🛞 Gravel Driveway Calculator💦 Liters Per Minute Calculator🏋️‍♂️ Beam Load Calculator🌲 Wood Beam Span Calculator🧬 Carbon Equivalent (CE) Calculator📌 Thread Pitch Calculator⚙️ Rivet Size Calculator🍃 CFM Airflow Calculator
🌐 Networking & IP Tools (36 tools)
🧮 Everyday (26 tools)
💪 Health & Fitness (30 tools)
💰 Finance (34 tools)
🔢 Math (23 tools)
📄 PDF Tools (10 tools)
🎨 Creators (12 tools)
💻 Developers (24 tools)
⚡ Engineering & Science (24 tools)
⚛️ Physics (48 tools)
🧪 Chemistry (50 tools)
🧬 Biology (50 tools)
👗 Clothing & Garment Tools (68 tools)
🍳 Cooking & Baking (9 tools)
🚗 Automotive (26 tools)
🖼️ Image Tools (13 tools)
🔐 Security & Hash (15 tools)
📝 Text Tools (15 tools)
🔍 SEO Tools (11 tools)
🔄 Converters (69 tools)
🕐 Time & Date (15 tools)
📊 Chart Generators (11 tools)
🕌 Islamic Tools (16 tools)