Rafter Length Calculator
A rafter is a right triangle with deductions. Enter the building span and pitch and get the actual board length to cut — common and hip rafters, ridge deduction, birdsmouth and overhang tail all worked out, where the roof-pitch tool only gives a per-foot factor.
Span is the full outside-to-outside width; each common rafter covers half of it (the unit run). The hip run is the horizontal distance the hip rafter travels — on a square hip roof it equals the common rafter's unit run. Lengths are the theoretical cut lengths along the top edge; always confirm against a story pole or the first pair of rafters on a real build.
How it works
Everything starts from the unit rafter: for a pitch of P (rise per 12 in of run), the unit length is √(12² + P²) inches of rafter per 12 in of run, and the slope factor is that ÷ 12. The theoretical common rafter is unit run (half the span) × slope factor. From there the real-world adjustments land: subtract half the ridge board thickness laid along the slope, add the overhang tail (horizontal overhang × slope factor). The birdsmouth seat is the wall thickness laid along the slope — it tells you where the seat cut falls, it does not change the board length. Hip rafters run at 45° in plan, so their unit run is 12√2 and the unit length is √(288 + P²).
Formula & worked example
Formula: Unit length = √(12² + pitch²) inches of rafter per 12 in of run; slope factor = unit length ÷ 12. Common rafter = (span ÷ 2) × slope factor − (ridge thickness ÷ 2, along the slope) + overhang × slope factor. Hip unit length = √(288 + pitch²) per 12√2 in of plan run. Birdsmouth seat along slope = wall thickness × slope factor. Total rise = (span ÷ 2) × pitch ÷ 12.
Worked example: A 28 ft span at 6/12: unit length 13.42 in, slope factor 1.118, theoretical 15.65 ft, ridge deduction 0.07 ft, 12 in overhang tail 1.12 ft — common rafter 16.70 ft. The hip on a 14 ft hip run: unit length 18.00 in, 15.84 ft to cut.
When to use this
- You are cutting a roof and need real board lengths, not a per-foot multiplier.
- A quote lists rafter lengths you want to verify before paying for lumber.
- You are framing a hip roof and need hip lengths alongside the commons.
- You need the ridge height (plumb height) for gable studs or a permit drawing.
How to use it, step by step
- Measure the building span outside-to-outside and enter it in feet.
- Enter the pitch as rise per 12 (6 means 6/12).
- Pick the wall thickness and confirm plate height and ridge board thickness.
- Enter the horizontal overhang in inches; set hip run to 0 for a gable roof, or to the hip’s horizontal travel for a hip roof.
- Read the common rafter cut length, then the hip length if shown, and round each up to a stock length.
What the inputs mean
| Input | What it is | Typical values |
|---|---|---|
| Span | Full building width, outside of wall to outside of wall | 24–40 ft for most houses |
| Pitch | Rise in inches per 12 inches of horizontal run | 4/12 low slope; 6/12 common; 8–12/12 steep |
| Overhang | Horizontal distance the eave extends past the wall | 12 in typical; 16–24 in on wide eaves |
| Hip run | Horizontal travel of the hip rafter in plan view | Equals half the span on a square hip roof; 0 = gable |
Another worked example
A 24 ft span at 8/12 with 2×6 walls (5.5 in) and an 18 in overhang: unit length √(144+64) = 14.42 in, slope factor 1.202. Theoretical rafter 12 × 1.202 = 14.42 ft; ridge deduction 0.08 ft; tail 1.5 × 1.202 = 1.80 ft — cut length 16.15 ft, total rise 8.00 ft. The steeper pitch adds length fast: the same span at 6/12 cuts at about 14.6 ft.
Frequently asked questions
How long is a common rafter for a 28 ft span at 6/12 pitch?
Unit run is 14 ft. The 6/12 unit length is √(144+36) = 13.42 in per foot of run, a slope factor of 1.118. Theoretical length 14 × 1.118 = 15.65 ft; minus a 0.07 ft ridge deduction, plus a 1.12 ft tail for a 12 in overhang = 16.70 ft to cut — order 18 ft stock.
What is the ridge deduction and why is it halved?
The theoretical rafter length runs to the centerline of the ridge. A real rafter stops at the face of the ridge board, so you deduct half the board thickness — measured along the slope, which is why a 1.5 in board deducts about 0.07 ft (0.84 in along the slope at 6/12), not a full 0.75 in horizontally.
How is a hip rafter different from a common rafter?
A hip rafter travels diagonally in plan view, so for every 12 in of common run it covers 12√2 ≈ 16.97 in horizontally. Its unit length at 6/12 is √(288+36) = 18.00 in per 16.97 in of plan run — a factor of about 1.06 per foot of hip run. On a 14 ft hip run at 6/12 that is 15.84 ft with the same ridge deduction and tail logic.
Does the birdsmouth change the rafter length?
No — the birdsmouth is a notch, not a length change. Its seat (horizontal) cut equals the wall thickness (3.5 in on a 2×4 wall), which is 0.33 ft measured along the slope at 6/12. It sets where the rafter bears on the plate. Cutting the seat deeper than about a third of the rafter depth weakens it — keep the heel stand (plumb height above the plate) in mind.
What is plumb height and why does it matter?
The vertical distance from the top of the wall plate to the ridge line: total rise (7.00 ft on the example) plus the plate/heel allowance. It is the number you need for gable-end studs, ridge board height and checking that the roof clears doors, windows and the floor below before you cut anything.
My span is measured inside the walls. Does that matter?
Yes. Rafters bear on the outside face line of the wall plates in this geometry, so span means outside-to-outside. An inside measurement on 2×4 walls understates the span by 7 in, which at 6/12 shortens each rafter by about 3.9 in — enough to ruin a cut list. Add both wall thicknesses first.
How much extra should I order beyond the cut length?
Buy the next stock length up (lengths come in 2 ft steps) and add one spare pair per roof plane on a first build. The tail is the usual casualty: if the fascia line moves, a longer board still works, a shorter one becomes blocking.