YBT YardBuild Tools Landscaping · Aggregate · Framing tools
Unfinished residential roof framing with exposed rafters

Build · Framing

Rafter calculator

Estimate common-rafter line length from rise/run or pitch + span. Geometry only — not span tables.

What this calculates

Line length √(rise²+run²), plumb-cut angle, overhang converted along the slope, and total planning length. Span mode splits (span − ridge) ÷ 2 for each side’s run.

Show

Line length √(rise²+run²), plumb-cut angle, overhang converted along the slope, and total planning length. Span mode splits (span − ridge) ÷ 2 for each side’s run.

Does not replace

  • Selecting 2×6 vs 2×8 from IRC Tables R802.4.1(1)–(8)
  • Snow/wind/dead load design or ridge beam engineering
  • Birdsmouth / seat-cut layout or hip/valley geometry

Supply yard

Materials you’ll need

Full materials catalog →

Recommended starting values

Starting points for planning — not a site-specific design. Footnotes point to sources on this page.

Topic Typical starting value Source notes
How code sizes rafters Use IRC R802.4 span tables (adopted edition) or AWC tables IRC R802.4.1 concept via Building Code Trainer / UpCodes mirrors — we do not reproduce copyrighted tables.
Span measurement Horizontal projection of the rafter IRC R802.4.1 language as commonly summarized in code commentaries.
When tables are not enough Loads/species/tie location outside table scope → engineering practice Building Code Trainer overview of R802.4 limits (raised ties, load beyond tables, etc.).
This calculator’s role Length & angle planning only YardBuild Tools disclaimer — pair with span tables or a licensed designer for member size.

Case studies

Short DIY narratives. Numbers match the one-click scenario presets in the calculator (US units).

Rise 6 / run 12 + 1 ft overhang

Problem
Rough-cut common rafters for a small shed roof.
Inputs
Rise 6 ft, run 12 ft, overhang 1 ft horizontal
Outputs
Line ~13.416 ft · θ ~26.57° · overhang along slope ~1.118 ft · total ~14.53 ft.
What to order / next step
Buy stock longer than total length; lay out birdsmouth separately; verify size via span tables / engineer.

6/12 gable · 24 ft span

Problem
Planning both sides of a simple gable with a 1½ in ridge.
Inputs
Pitch 6/12, span 24, ridge 1.5, overhang 1 — keep every field in the same length unit (the defaults treat them consistently as one unit system).
Outputs
Run = (span − ridge)/2; rise from pitch; total length includes overhang along the slope.
What to order / next step
Use outputs for cutting length estimates only. Member depth/spacing from IRC tables or plans.

8/12 · 28 ft span

Problem
Steeper pitch on a wider building — length grows quickly.
Inputs
Pitch 8/12, span 28, ridge 1.5, overhang 1.5
Outputs
Scenario chip fills fields — check total length before ordering lumber.
What to order / next step
Longer rafters and steeper roofs increase handling risk; follow engineered plans when required.

Buy stock: round up to store length

Problem
Geometry says ~14.5 ft total — what do you ask for at the lumber desk?
Inputs
Rise 6 / run 12 + 1 ft horizontal overhang (default worked example)
Outputs
Total ~14.53 ft with overhang along slope.
What to order / next step
Lumber script: “Common rafters about 14.5 ft line+OH — buy 16 ft stock (or longer) so birdsmouth and square cuts have meat.” Member size still from span tables / plans.

Rafter length planning (not member size)

Use this when you need a cutting-length ballpark from pitch and span — the same geometry DIY framers sketch before a lumber run. Pair the length with IRC span tables or engineered plans for depth, grade, and spacing.

IRC span tables — what we will not invent

The International Residential Code provides prescriptive rafter span tables (R802.4.1 series in recent editions). Those tables are copyrighted; allowable spans depend on species, grade, spacing, and loads. We link to explanations of the concept and tell you to use the adopted code book, AWC resources, or a licensed design professional — we will not paste fake span numbers.

How we calculate

Line length = √(rise² + run²). Angle θ = arctan(rise ÷ run). In pitch + span mode, run = (span − ridge thickness) ÷ 2 and rise = (pitch12 ÷ 12) × run. Overhang along slope = overhanghorizontal ÷ cos(θ).

FAQ

Does this pick rafter size from IRC span tables?

No. This tool estimates common-rafter line length and plumb-cut angle from rise/run or pitch + span. Member size still comes from IRC R802.4 span tables (adopted edition), AWC resources, or a licensed designer — we do not reprint copyrighted tables.

How is rafter length calculated?

Line length = √(rise² + run²). In pitch + span mode, run = (span − ridge thickness) ÷ 2 and rise = (pitch₁₂ ÷ 12) × run. Overhang along the slope = overhang_horizontal ÷ cos(θ).

Can I use this for hip or valley rafters?

No — this is common-rafter geometry only. Hip/valley and birdsmouth layout need additional framing methods or engineered plans.

Sources & references

We cite extension services, manufacturer guidance, and municipal/IRC reprints. This is not legal advice, not a substitute for a licensed engineer or architect, and not approval from your Authority Having Jurisdiction (AHJ). Adopted codes and product warranties vary by place and year — verify before you buy or cut.

  1. Minimum Slope for Shingles: What Contractors Need to Know — GAF

    States absolute minimum asphalt-shingle slope 2:12; 2:12 to <4:12 treated as low slope needing double underlayment; typical residential often 4:12–9:12.

  2. How to Size Roof Rafters (IRC R802.4 overview) — Building Code Trainer

    Explains IRC R802.4 span-table concept, loads, and when engineering practice is required. We do not reproduce copyrighted span tables.

  3. Rafter Size — IRC R802.4.1 — UpCodes (code text mirror)

    Shows that rafters are sized from IRC Tables R802.4.1(1)–(8); spans measured on horizontal projection. Confirm adopted edition with your AHJ.

Full site bibliography: Sources hub.

Related calculators