FREE · NO SIGNUP · INSTANT RESULTS

Rafter Length Calculator

Use this free rafter length calculator to find your rafter length from span, pitch, and overhang. Get rise, run, and angle instantly.

Enter Rafter Details

Total width from exterior wall to exterior wall

Typical: 12" standard, 18-24" for rain protection

Your Results

Rafter Length (with overhang)
17.77 ft
213.2 inches
Run (horizontal)
15.00 ft
half the span
Rise (vertical)
7.50 ft
peak height above wall
Roof Angle
26.57°
from horizontal
Rafter (no overhang)
16.77 ft
structural length only

Round up to the next standard lumber length when ordering. Add extra for birdsmouth cuts and ridge board connections.

How the Rafter Length Formula Works

Rafter length is calculated using the Pythagorean theorem. A rafter forms the hypotenuse of a right triangle where the horizontal leg is the run and the vertical leg is the rise.

The Formula

The basic formula is:

Rafter Length = √(Run² + Rise²) + Overhang

Where:

  • Run = Span ÷ 2 (distance from exterior wall to center of ridge)
  • Rise = Run × (Pitch ÷ 12)
  • Overhang = eave projection in feet (typically 1 ft)

Worked Example

For a building with a 30 ft span, 6/12 pitch, and 12" overhang:

  1. Run = 30 ÷ 2 = 15 ft
  2. Rise = 15 × (6 ÷ 12) = 7.5 ft
  3. Rafter = √(15² + 7.5²) = √(225 + 56.25) = √281.25 = 16.77 ft
  4. With overhang = 16.77 + 1.0 = 17.77 ft

You would order 18 ft or 20 ft lumber to accommodate the birdsmouth cut and any trimming needed.

Standard Rafter Sizes & Maximum Spans

Based on #2 Southern Pine or Douglas Fir, 20 psf live load, 10 psf dead load. Always verify with local building codes.

Rafter Size Max Span @ 16" O.C. Max Span @ 24" O.C.
2×6 11' 4" 8' 10"
2×8 15' 0" 11' 8"
2×10 19' 2" 14' 11"
2×12 23' 4" 18' 2"

O.C. = on center (spacing between rafters). These values are for simple-span rafters with no ceiling attached. Ceiling-attached rafters and engineered trusses have different span tables.

Building Code Requirements for Rafters

The International Residential Code (IRC) sets minimum standards for rafter design. Here are the key requirements most jurisdictions follow:

  • Minimum rafter depth: Nominal 2x4 for spans up to 5 ft; 2x6 or larger for typical residential use
  • Spacing: Maximum 24" on center; 16" O.C. is standard for most applications
  • Load requirements: Must support dead loads (roofing materials, ~10-15 psf) plus live loads (snow, workers, ~20 psf minimum, higher in snow regions)
  • Bearing: Minimum 1.5" bearing on the wall plate; birdsmouth cuts must leave at least 2/3 of the rafter depth intact
  • Ridge connections: Rafters must be connected at the ridge with a ridge board at least 1" nominal thickness, or use an engineered ridge beam
  • Collar ties: Required in the upper third of the rafter span to prevent roof spread, typically at every other rafter pair minimum

These are general guidelines based on the IRC. Local jurisdictions may have stricter requirements, especially in high-wind, seismic, or heavy-snow areas. Always consult your local building department and consider hiring a structural engineer for non-standard designs.

Rafter Spacing and Load Calculations

Once you have determined your rafter length, the next step is choosing the correct spacing and verifying load capacity. Standard roof rafter spacing is either 16 inches or 24 inches on center (O.C.). The 16-inch spacing is the most common for residential construction because it provides greater load-bearing capacity and a more solid nailing surface for sheathing. The 24-inch spacing is acceptable for lighter loads and can reduce material costs by roughly 30%.

Load requirements vary significantly by region. Northern states with heavy snowfall may require rafters to support 40–60 psf of snow load in addition to the standard 10–15 psf dead load. Coastal areas exposed to hurricanes must meet wind uplift requirements, which can dictate stronger connections and closer spacing. Always consult your local building department for the specific live load, dead load, and wind load requirements in your jurisdiction before finalizing your rafter length calculator inputs.

When to Use Engineered Trusses vs. Rafters

Traditional stick-framed rafters and factory-built engineered trusses each have advantages depending on the project. Rafters are ideal for simple gable and shed roofs, additions, and situations where you want usable attic space beneath the roof. They are cut and assembled on site, giving the framer flexibility to adjust dimensions. A rafter length calculator like the one above makes the math quick and accurate.

Engineered trusses, on the other hand, are manufactured in a factory to exact specifications and delivered to the job site ready to install. They are the preferred choice for complex roof designs, wide spans exceeding 20 feet, and production home building where speed and consistency matter. Trusses typically cost 10–20% less than equivalent stick-framed roof rafter systems when labor is factored in, because installation is significantly faster. However, trusses create a web of internal members that eliminates usable attic space.

Common Rafter Sizing Quick Reference

For most residential projects using #2 grade lumber at 16 inches O.C., use 2x6 rafters for spans up to 11 feet, 2x8 for spans up to 15 feet, 2x10 for spans up to 19 feet, and 2x12 for spans up to 23 feet. These guidelines assume standard 20 psf live load conditions. For heavier loads or wider spacing, increase the rafter length lumber size by one grade or consult an engineer.

Frequently Asked Questions

How do I calculate rafter length from span and pitch?
Divide the span by 2 to get the run (horizontal distance from wall to ridge). Then use the Pythagorean theorem: Rafter Length = √(run² + rise²) + overhang. The rise equals run × (pitch/12). For example, a 30 ft span at 6/12 pitch with 12" overhang: run = 15 ft, rise = 7.5 ft, rafter = √(15² + 7.5²) + 1 = 17.77 ft.
What size rafter do I need?
Rafter size depends on span, spacing, and load requirements. For residential construction: 2×6 rafters handle spans up to 11 ft at 16" on center, 2×8 up to 15 ft, 2×10 up to 19 ft, and 2×12 up to 23 ft. These are general guidelines for 20 psf live load and #2 Southern Pine. Always verify with local building codes and an engineer for your specific conditions.
How much overhang should a rafter have?
Standard rafter overhang (eave projection) is 12-18 inches for most residential roofs. Minimum overhang should be 6 inches to protect walls from rain. In wet climates, 18-24 inches provides better protection. Very deep overhangs (24"+) may require additional structural support. The overhang adds directly to the rafter length and must be accounted for when ordering lumber.

Need to Calculate Roof Pitch?

Use our pitch calculator to find your roof's slope, angle, and multiplier for accurate rafter calculations.

Roof Pitch Calculator