Rafter Length Calculator

Common, hip and jack rafter lengths — with the ridge deduction done horizontally, which is where most rafters go wrong.

How to use this calculator

  1. Enter the full span; the run is half of it on a gable.
  2. Give the ridge thickness as an actual dimension — a 2x ridge is 1.5 in.
  3. Read the line length first, then the cut length; the difference is the ridge and the tail.
  4. Switch to jack mode for the common difference, then cut the longest and step down.

How the calculation works

A rafter is one number and three modifications. The number is the line length — measured along the top edge, from the outside of the wall plate to the centre of the ridge. The modifications are the ridge deduction, the tail that runs past the wall, and the birdsmouth that sits down on the plate.

Almost every rafter that comes out short does so for one reason: the ridge deduction is horizontal, and people subtract it as if it were along the rafter. Half of a 1½ inch ridge is ¾ inch of RUN, which at 6/12 is 0.84 inches measured up the rafter — and on a steep roof the gap between those two numbers gets wide enough to matter.

Hips and valleys are the same arithmetic on a longer unit run. Where a common rafter travels 12 inches of run, a hip travels the diagonal of a 12 inch square — 12√2, about 16.97 inches.

  • Runspan ÷ 2
  • Common rafterrun × √(rise² + 144) ÷ 12
  • Hip or valleyrun × √(288 + rise²) ÷ 12
  • Ridge deduction(ridge ÷ 2 ÷ 12) × multiplier
  • Jack common differencespacing ÷ 12 × multiplier

Line length, and why everything hangs off it

The line length is the theoretical rafter: plate to ridge centre, along the top edge, with no allowance for anything. Every real rafter is that length minus half the ridge, plus the tail. Working in that order keeps the arithmetic honest, because the run is a number you can check against the building while the cut length is not.

The ridge deduction is horizontal

The ridge board occupies run, not rafter. Half its thickness comes off the run, and only then gets multiplied to become a length along the rafter. Subtracting the raw half-thickness leaves every rafter short by the difference — small at 4/12, and at 12/12 the deduction is 1.06 inches where the raw figure would say 0.75. A hip meets the ridge at 45° so its deduction is scaled by √2 again, which catches out people who have got the common rafter right.

Why hips run 16.97, not 17

A hip travels diagonally across the square that a common rafter crosses in a straight line, so its unit run is 12√2 = 16.97 inches. Framing squares print 17 because it is easier to read — but the length tables printed on the same square are computed from the exact figure. At 8/12 they read 18.76 inches per foot of run, which is √352; a true 17 inch run would give √353, or 18.79. The tool uses the exact value, and it matches the printed tables at every pitch.

Jack rafters step by a constant

On a hip running at 45° in plan, moving one rafter spacing along the plate shortens the jack's run by exactly that spacing. So every jack is one spacing × the pitch multiplier shorter than the one before it — 17.89 inches at 16 in centres on a 6/12 roof, every time. That constant is why jacks are cut from a stepped pattern rather than measured individually, and it is the single most useful number in hip framing.

The birdsmouth is cut to the building, not the number

The seat cut is the width of the plate and the plumb cut drops from it. It is not derived from the rafter length — it is laid out where the rafter crosses the plate. The one rule that matters: leave at least two thirds of the rafter depth above the seat cut. Cut deeper and you have hinged the rafter at its most heavily loaded point, and it will sag there regardless of what the span tables said.

Cut the tails long

The tail figure here is the sloped length for the horizontal overhang you entered. In practice, run every rafter long, get them all up, then snap a chalk line across the tails and cut them in place. Trying to make forty identical tails on the ground and have the fascia land straight is far harder than it sounds, because the plate is never as straight as the drawing.

Worked examples

Common rafter, 30 ft span at 6/12

1½ in ridge board, 12 in overhang.

Run
30 ÷ 2 = 15 ft
Line length
15 × 1.1180 = 16.77 ft
Less half the ridge
0.75 in of run → 0.070 ft
Plus the tail
12 in of run → 1.118 ft
Cut length
17.82 ft

17.82 ft — buy 18 ft stock

The deduction is 0.84 inches along the rafter, not the 0.75 the ridge measures. Small here; at 12/12 it is 1.06 against 0.75, and it compounds across both slopes.

The hip on the same roof

Same 15 ft run, same 6/12 pitch.

Hip factor at 6/12
√(288 + 36) ÷ 12 = 1.5000
Line length
15 × 1.5 = 22.50 ft
Versus the common
16.77 ft
Longer by
34%

22.50 ft — buy 24 ft stock

At 6/12 the hip factor is exactly 1.5, which is a pleasant coincidence rather than a rule. It also needs a double cheek cut at the ridge and a backing bevel along the top, or the sheathing will not sit flat on it.

Jacks into that hip at 16 in centres

How much shorter is each one?

Common difference
16 ÷ 12 × 1.1180 = 1.491 ft
In inches
17.89 in
Longest jack
16.77 − 1.49 = 15.28 ft
Then
13.79, 12.30, 10.81 ft …

17.89 in shorter each time

Cut the longest, then step the pattern down by that constant. They come in handed pairs — a jack cut for the wrong side of the hip is firewood.

Reference tables

Common rafter, 30 ft span

1½ in ridge, 12 in overhang. Stock rounded up to an even length.

PitchRiseLine lengthCut lengthStock
4/125.00 ft15.81 ft16.80 ft18 ft
6/127.50 ft16.77 ft17.82 ft18 ft
8/1210.00 ft18.03 ft19.15 ft20 ft
10/1212.50 ft19.53 ft20.75 ft22 ft
12/1215.00 ft21.21 ft22.54 ft24 ft

Jack rafter common difference

How much shorter each successive jack is, on a 45° hip.

PitchAt 16 in centresAt 24 in centres
4/1216.87 in25.30 in
6/1217.89 in26.83 in
8/1219.23 in28.84 in
10/1220.83 in31.24 in
12/1222.63 in33.94 in

What it costs

Rafter stock runs $1.20–$2.50 per linear foot for 2×8 and 2×10 SPF in 2026, so a 30 ft span at 6/12 with rafters at 16 in centres — 62 rafters at 18 ft — is roughly $1,300–$2,800 in timber. Trusses for the same roof frequently come in lower, which is the real decision.

Rafters against trusses

Trusses are engineered, arrive ready, and go up in a day with a crane. They are usually cheaper in material and much cheaper in labour, and they span further without interior bearing walls. What they cost you is the attic: a trussed roof is full of webs and the space is unusable. Stick framing keeps the volume — which is the whole argument for it on a house where the attic might one day be a room.

Where stick framing still wins

Complicated roofs, renovations tying into existing structure, and anywhere a crane cannot reach. Also small jobs: a truss order has a lead time and a delivery charge, and for a 12 ft garage roof that overhead swamps the saving.

Buy the length you need

Timber comes in even 2 ft increments, so a 17.82 ft rafter takes 18 ft stock with almost nothing spare, while an 18.10 ft rafter takes 20 ft and wastes nearly two feet on every one. On a 62 rafter roof that is over 100 linear feet of timber decided by a couple of inches of overhang — worth checking before the overhang is finalised.

Common mistakes

Subtracting the ridge thickness along the rafter

Half the ridge is a horizontal deduction and has to be multiplied before it comes off the length. Subtracting the raw half-thickness leaves every rafter short, and the error grows with the pitch.

Using 17 for the hip unit run

It is 12√2, or 16.97. The framing square prints 17 for readability but its own length tables are computed from the exact figure. On a long hip the difference is real timber.

Forgetting the hip deduction is scaled twice

A hip meets the ridge at 45°, so its ridge deduction takes the √2 as well as the hip factor. Getting the common rafters right and the hips wrong is a common and confusing way to end up with a roof that will not close.

Cutting the birdsmouth too deep

Leave two thirds of the rafter depth above the seat cut. A deeper notch hinges the rafter exactly where the load is highest, and no span table accounts for it.

Measuring each jack rafter

They step by a constant — one spacing times the pitch multiplier. Cut the longest and work down the pattern. Measuring them one at a time is slower and less accurate.

Counting rafters as span divided by spacing

That gives the gaps. The rafters are one more, per slope. Miss the plus-one and you are one rafter short at the end of each side.

Frequently asked questions

How do I calculate rafter length?

Rafter length equals the run times √(rise² + 144) ÷ 12. On a 30 ft span at 6/12 the run is 15 ft and the line length is 16.77 ft — measured along the top edge from the outside of the plate to the centre of the ridge.

How much do I deduct for the ridge board?

Half the ridge thickness, but taken off the RUN and then multiplied. Half of a 1½ in ridge is ¾ in of run, which at 6/12 is 0.84 in along the rafter and at 12/12 is 1.06 in. Subtracting the raw ¾ in leaves every rafter short.

What is the hip rafter factor?

√(288 + rise²) ÷ 12 per foot of common run — 1.5000 at 6/12, 1.5635 at 8/12. The unit run is 12√2, about 16.97 in, because a hip travels the diagonal of the square a common rafter crosses straight.

Is the hip unit run 17 or 16.97?

16.97, which is 12√2. Framing squares print 17 because it is easier to read, but the length tables printed on the same square are computed from the exact figure — at 8/12 they read 18.76 in, which is √352 rather than the √353 a true 17 would give.

How much shorter is each jack rafter?

One rafter spacing times the pitch multiplier, every time — 17.89 in at 16 in centres on a 6/12 roof. A 45° hip loses exactly one spacing of run per jack, so they step by a constant and can be cut from a pattern.

How deep can I cut the birdsmouth?

Leave at least two thirds of the rafter depth above the seat cut. A deeper notch hinges the rafter where the load is highest, and no span table accounts for it. The seat cut is the plate width and is laid out on the building, not derived from the length.

How many rafters do I need?

Building length in inches divided by the spacing, plus one, per slope. A 40 ft wall at 16 in centres takes 31 rafters a side, so 62 on a gable roof. Spacing counts the gaps — the rafters are always one more.

Related calculators

Put this calculator on your site

Embed the Rafter Length Calculator anywhere — it is free, stays in sync with this page, and sizes itself to fit. The only condition is the credit line in the snippet, which links your readers to the full version with the formulas and worked examples.

<!-- Rafter Length Calculator — free embed from BuildCalculators.com -->
<div data-buildcalculators="rafter-length-calculator"></div>
<script async src="https://buildcalculators.com/embed.js"></script>
<p>Free rafter length calculator by <a href="https://buildcalculators.com/rafter-length-calculator">BuildCalculators</a></p>

How this number was worked out

This calculator uses published constants from named industry sources, each asserted in an automated test that runs on every build. The formula is printed with the result above, and any correction we make is logged on the changelog.

It is a planning estimate. It does not replace an engineer, a site visit or a written quote — confirm quantities with your supplier before ordering.