Skip to main content
FigureCalc

Rafter Calculator

By Uzair Arshad , Senior Civil and Structural Engineer

Last updated: April 20, 2026

Use this rafter calculator to find common rafter length, roof angle, and lumber counts for any pitch and span. Enter your roof dimensions below to get cut lengths, board totals, and a 2026 material cost estimate before you start framing.

How to use this calculator

This rafter calculator gives a fast framing estimate from the inputs you already measure on site: span, pitch, overhang, and ridge board thickness. Use it to find rafter length, determine rafter angle, and figure rafter dimensions for your cut list. The calculator returns per-piece length, roof angle, and total lineal feet so you can plan a rough lumber budget before ordering.

  1. Measure total building span in feet from outside wall to outside wall, then enter that value. This is how you get rafter length from the starting measurement.
  2. Enter pitch rise in the standard X-in-12 format. For example, a 6 in 12 roof uses a value of 6, while an 8 in 12 roof uses 8. Use pitch to calculate rafter length using the Pythagorean theorem.
  3. Set overhang and ridge board thickness. Most homes use about 1.5 inch ridge stock, and common eave overhang is often 12 to 24 inches.
  4. Enter planned rafter pairs so the calculator can determine rafter lumber totals and a practical 2026 cost planning range.
  5. Click "Calculate rafter lengths" to find rafter length, overhang cut length, board size to buy, and full framing cost. Round board lengths to available stock before final purchasing.

Pro tip: cut one test pair first, dry-fit at the ridge, and check fascia alignment before cutting the full bundle. This saves expensive rework if your overhang or ridge deductions were off by even a small amount.

Common roof pitch quick reference

Use this table before running the rafter calculator if you need a quick slope sanity check. Angle and slope factor help when converting between framing notes and field measurements.

Pitch Roof angle Slope factor Typical use
4 in 1218.43 degrees1.054Low-slope shingle roofs where drainage is still acceptable.
5 in 1222.62 degrees1.083Common on ranch homes and basic additions.
6 in 1226.57 degrees1.118Typical balance of attic volume and simple framing cuts.
8 in 1233.69 degrees1.202Steeper roofs in rain and snow climates.
10 in 1239.81 degrees1.302Higher attic volume, longer rafters, and stronger visual profile.

Rafter layout errors often start with pitch entry mistakes. Double-check that your plan note and your calculator pitch use the same rise-over-12 convention before you cut lumber.

How the calculation works

Geometry:
Run (ft) = (Building span / 2) - (Ridge thickness / 24)
Rise (ft) = Run × (Pitch rise / 12)
Roof angle (°) = atan(Pitch rise / 12) × (180 / π)

Rafter Lengths:
Main rafter (ft) = √(Run² + Rise²)
Overhang run (ft) = Overhang (in) / 12
Overhang rise (ft) = Overhang run × (Pitch rise / 12)
Overhang rafter (ft) = √(Overhang run² + Overhang rise²)
Total rafter (ft) = Main rafter + Overhang rafter

Lumber Takeoff:
Total lineal feet = Total rafter × (Rafter pairs × 2)
Board length to buy = round up Total rafter to next 2 ft
Building span
Total building width measured outside wall to outside wall (ft)
Pitch rise
Roof pitch rise in inches per 12 inches of horizontal run
Overhang
Horizontal eave overhang past the wall plate (in)
Ridge thickness
Ridge board thickness, typically 1.5 in for dimensional lumber (in)
Rafter pairs
Number of opposing rafter pairs for total lumber planning

The rafter calculator uses common framing geometry to determine rafter length. It computes run from span and ridge thickness, computes rise from pitch, and then uses the Pythagorean theorem to find the diagonal rafter length. Overhang is handled as a second right triangle so the total output matches practical tail cuts.

The lumber cost estimate uses $3 to $9 per lineal foot for 2026 planning. Actual pricing depends on board size, species, grade, and regional inventory.

Quick rule

  • Rafter length ≈ Run × Slope factor (see pitch table above)
  • Run = Building span / 2 minus half the ridge board
  • Add overhang rafter separately using the same pitch

Worked framing example

Given: 24 foot span, 6 in 12 pitch, 12 inch overhang, 1.5 inch ridge board, and 12 rafter pairs.

  • Run = (24 / 2) - (1.5 / 24) = 11.94 ft
  • Rise = 11.94 × (6 / 12) = 5.97 ft
  • Main rafter = √(11.94² + 5.97²) = 13.35 ft
  • Overhang rafter length = 1.12 ft
  • Total per rafter = 14.47 ft, so 16 foot stock is a practical choice
  • Total lineal feet for 12 pairs = 347.3 ft
  • Estimated cost = $1,042 to $3,126 at $3 to $9 per lineal foot

If you cut from 16 foot boards, always account for saw kerf and end checks before final cut nesting. The extra margin often prevents a second lumber run for just one or two short pieces.

For a deeper walkthrough of how pitch, run, and overhang affect rafter geometry, see our roof pitch and rafter length guide.

Planning lumber assumptions table (2026)

Use this table with your rafter length calculations when comparing rough framing budget scenarios. These are planning ranges, not engineered sizing approvals.

Nominal board Typical planning range Common use case Field note
2x6$3 to $5 per lineal ftShorter spans with lighter roof loadsCheck span tables carefully in snow regions.
2x8$4 to $7 per lineal ftCommon residential raftersOften balances cost and span flexibility.
2x10$5 to $9 per lineal ftLonger spans or heavier roof systemsHeavier stock may require crew planning for lift and set.
Engineered LVLVaries by supplier quoteSpecial spans and engineered designsUse stamped design documents and supplier takeoff sheets.

Common framing mistakes this calculator helps prevent

One frequent mistake is ignoring ridge thickness. That small dimension changes run and can cause ridge mismatch once opposite rafters meet.

Another mistake is ordering exact theoretical length with no stock rounding. Real framing needs practical board lengths and trim allowance for clean birdsmouth and tail cuts.

A third mistake is skipping a test fit. One sample pair catches angle or overhang assumptions early and saves both time and lumber waste.

Assumptions and limitations

This rafter length calculator assumes a symmetrical gable roof with equal pitch on both sides. It calculates common rafter length only and does not cover hip rafters, valley rafters, or jack rafters. Results may vary if your roof has irregular geometry, structural headers, or non-standard ridge configurations. Always verify final rafter dimensions against local building codes and span tables before cutting.

Frequently Asked Questions

How do you calculate rafter length from span and pitch?

Split span in half to get run, subtract half the ridge board thickness, then multiply by pitch over 12 to get rise. Use the Pythagorean theorem for length, then add overhang. This sequence gives a practical cut length that matches field framing conditions better than span-only math.

How does roof pitch change rafter length?

Steeper roof pitch always increases rafter length for the same building span. A 24 foot span at 4 in 12 needs a shorter common rafter than a 10 in 12 roof. Pitch also changes roof angle and plumb cut layout, so saw setup should follow the chosen slope exactly.

Should I include ridge board thickness in my rafter calculator inputs?

Yes, include ridge thickness for accurate common rafter run. You subtract half the ridge board thickness from half-span so opposing rafters meet correctly at the ridge. If you skip this step on a 1.5 inch ridge board, paired rafters can miss by roughly three quarters of an inch.

What overhang value should I use for common rafters?

Most residential overhangs run about 12 to 24 inches. Shorter overhangs reduce lumber use, while wider overhangs improve siding and window protection from rain. Local wind exposure and soffit details also matter, so confirm final overhang with your framing plan before making production cuts.

How do you calculate rafter length with overhang?

Calculate the main rafter from ridge to wall plate using the Pythagorean theorem on run and rise. Then calculate overhang rafter length separately using the same pitch and horizontal overhang distance. Add both lengths for total rafter length. A 12 inch overhang at 6 in 12 pitch adds about 1.12 feet to each rafter.

Related reading