How to Calculate Rafter Length
A rafter is a hypotenuse — that part's easy. The part that catches people is that the answer is a line length, not a cut length.
It's Pythagoras, and then it isn't
A 24 ft span at 6/12 pitch, with an 18-inch overhang: 14.92 ft of rafter.
The triangle is the easy half. The half that catches people is that this is a theoretical line length, not a length to cut to — and there are two deductions before the saw comes out.
Your details
Wall to wall. The run is half of this on a standard gable.
A 6/12 roof rises 6 inches for every 12 inches of run.
Measured along the rafter, not horizontally — see the slope factor.
Result
Feet, theoretical — deduct half the ridge thickness before cutting.
- Line length (ridge to wall, no overhang)The pure hypotenuse.
- 13.42
- RunHalf the span — the horizontal leg.
- 12
- RiseHow high the ridge sits above the wall plate.
- 6
- Slope factorMultiply any horizontal distance by this to get the distance along the slope.
- 1.118
Open the Rafter Length Calculator on its own page to bookmark or share it.
The arithmetic
Run — half the span on a standard gable:
24 ÷ 2 = 12 ft
Rise — run × pitch ÷ 12:
12 × 6 ÷ 12 = 6 ft
Line length — the hypotenuse:
√(12² + 6²) = √180 = 13.42 ft
Plus the overhang (measured along the slope):
13.42 + 1.5 = 14.92 ft
Pitch is a ratio, not a measurement
"6/12" means the roof rises 6 inches for every 12 inches of horizontal run. That's where the 12 in the formula comes from.
Because it's a ratio it works at any scale and in any unit — the same pitch describes a shed and a cathedral.
The commonest mistake here is entering the run where the span is asked for. The run is half the span on a gable roof. Get that wrong and every answer is half what it should be, which is just plausible enough not to notice immediately.
Overhang goes along the slope
The rafter runs along the slope, so anything added to it is added in that direction.
If what you actually want is a specific horizontal overhang past the wall, multiply it by the slope factor:
√(1 + (6/12)²) = 1.118
So a 12-inch horizontal overhang on a 6/12 roof needs about 13.4 inches of extra rafter.
Why you can't cut to this number
Two deductions, neither included, because both depend on your timber and your cuts.
The ridge board. The theoretical lines meet at a point — but two rafters and a ridge board can't all occupy it. Half the ridge thickness comes off each rafter. A 1.5-inch ridge means 0.75 inches off every one.
The birdsmouth. Cutting a seat over the wall plate changes where the rafter bears, and shortens the effective run by an amount that depends on your seat cut depth and plate width.
So the working method is: mark the theoretical length, deduct half the ridge, cut ONE and test-fit it on the building. Then use that rafter as a pattern to mark all the others.
Never measure each one separately. Small errors don't average out — they accumulate, and you find out at the far end of the roof.
The slope factor is useful well beyond rafters
Multiply any horizontal distance by it and you get the distance along the roof. Which means:
Roof area = footprint area × slope factor.
That's how you work out sheathing, felt and shingles from a plan view. And it shows what a steeper pitch actually costs:
| Pitch | Slope factor | Extra material vs footprint |
|---|---|---|
| 4/12 | 1.054 | ~5% |
| 6/12 | 1.118 | ~12% |
| 8/12 | 1.202 | ~20% |
| 12/12 | 1.414 | over 40% |
A 12/12 roof isn't just steeper to look at — it's more than 40% more of everything, rafters included. Worth knowing before choosing a pitch on aesthetics.
Hip roofs
The common rafters on a hip roof use exactly this calculation. The hips and valleys don't — they run diagonally and need a different, longer calculation based on a 17-unit rather than 12-unit run.
If you're cutting hips, this gives you the commons and the rest is a separate job.
The part a calculator can't do
Span, timber size, grade and spacing are governed by load and local code — snow, wind, what's underneath, what species and grade you're holding.
This gives you the geometry. Whether a given rafter is strong enough is a different question with a legal answer, and it's worth getting right from a source that isn't a web page.
Print the rafter cutting sheet — it has the slope factors and the deduction reminders in one place.
Free tool
Rafter Length CalculatorRafter length from your span and roof pitch, including the overhang - plus the ridge deduction that catches people who measure to the peak.
Open the tool →Enjoyed this? Get the next one.
New articles straight to your inbox. No spam, ever.
Keep reading
How Many Studs Do I Need?
Bays plus one — the off-by-one that leaves you a stud short on every wall. The arithmetic, 16 versus 24 inches, and what the count leaves out.
Jul 31, 2026 · 3 min read
How Far Can a Deck Joist Span?
A Southern Pine 2×10 at 16" centres spans 14 ft, per AWC DCA 6. The species is worth a foot, and your building department has the final say.
Aug 1, 2026 · 4 min read
How Many Bundles of Shingles Do I Need?
Forget the pitch and a 40 × 30 roof comes out at 40 bundles instead of 45. Measure the ground, not the roof — the slope factor supplies the rest.
Jul 31, 2026 · 4 min read