How the rafter length calculator works
A rafter is the hypotenuse of a right triangle: its length is the level run times the pitch multiplier. The calculator takes half the span, takes off half the ridge board, multiplies by the multiplier for your pitch, and adds the overhang tail the same way.
Net run = span ÷ 2 − ridge ÷ 2
Main = net run × M Tail = overhang × M
M = √(1 + (pitch ÷ 12)²)
All lengths are line lengths, measured along the top edge of the rafter from the ridge plumb line to the tail plumb line. The overhang is the level projection past the outside of the wall, the way it shows on plans. Hips and valleys use the hip factor √(2 + (pitch ÷ 12)²) instead of M, because they climb the same rise over a diagonal run √2 times longer.
Worked example: a 24 ft garage at 6/12
- InputsSpan 24 ft, pitch 6/12, 1.5 in ridge board, 12 in overhang, 2x8 rafters (7.25 in deep) on a 2x4 wall (3.5 in plate).
- Net run24 ÷ 2 − 1.5 ÷ 24 = 12 − 0.0625 = 11.9375 ft.
- Multiplier√(1 + 0.5²) = 1.1180.
- LengthsMain 11.9375 × 1.1180 = 13 ft 4 3/16 in; tail 1 × 1.1180 = 1 ft 1 7/16 in; total 14 ft 5 9/16 in.
- Birdsmouth and boardHeel 3.5 × 6 ÷ 12 = 1.750 in; notch 1.565 in, inside the 2.417 in limit; height above plate 6.356 in. Cut from a 16 ft 2x8.
Sixteen-foot 2x8s on a 24 ft, 6/12 garage are standard US framing: the extra length covers the plumb cuts and lets you pick straight boards.
Line length vs the board you buy
The line length is a layout measurement, not a board length. You still need material beyond both plumb lines for the cuts, and boards come in 2 ft steps from 8 to 24 ft in the US (2.4 m to 7.2 m in 0.3 m steps in metric markets). The calculator adds a 6 in (150 mm) allowance and picks the next stock length. Past 24 ft, solid sawn stock is hard to find: use engineered lumber or a splice your engineer approves.
Marking the plumb and seat cuts
With a speed square, hold the pivot on the top edge and rotate the square until your pitch number on the common scale lines up with the same edge; mark along the square for the plumb line. With a framing square, hold 12 on the blade and the rise on the tongue at the edge of the board: the tongue gives the plumb cut, the blade the seat cut. The calculator gives the same lines as angles: the plumb cut is 90° minus the roof angle measured from the edge, and the seat cut is level when the rafter is in place.
The birdsmouth: heel, seat, notch and HAP
The birdsmouth is the notch that lets the rafter sit on the wall plate. The seat is the level cut that bears on the plate; the heel is the plumb cut at the outside of the wall. The deeper the notch, the weaker the rafter at its most loaded point, so a common shop rule keeps the notch, measured square to the rafter edge, to no more than ⅓ of the rafter depth. Some engineering design rules are stricter, so treat ⅓ as an upper bound, not an approval. If the notch is too deep, use a deeper rafter or a narrower seat; reduce the seat below the full plate only with an engineer's approval.
The height above plate (HAP) is the plumb distance from the top of the wall to the top edge of the rafter at the outside of the wall. Keep it the same on every rafter so the roof plane stays flat, and use it to check ridge heights from the roof pitch calculator.
Rafter table per foot of run
The numbers stamped on a framing square, computed from the same formulas as the calculator. Multiply the common figure by the run in feet for a rough common length, or the hip figure by the common run for a hip.
| Pitch | Common per ft of run | Hip per ft of common run | Jack difference at 16 in | Jack difference at 24 in | Plumb angle from level |
|---|---|---|---|---|---|
| 3/12 | 12.37 in | 17.23 in | 16.49 in | 24.74 in | 14.04° |
| 4/12 | 12.65 in | 17.44 in | 16.87 in | 25.30 in | 18.43° |
| 5/12 | 13.00 in | 17.69 in | 17.33 in | 26.00 in | 22.62° |
| 6/12 | 13.42 in | 18.00 in | 17.89 in | 26.83 in | 26.57° |
| 7/12 | 13.89 in | 18.36 in | 18.52 in | 27.78 in | 30.26° |
| 8/12 | 14.42 in | 18.76 in | 19.23 in | 28.84 in | 33.69° |
| 9/12 | 15.00 in | 19.21 in | 20.00 in | 30.00 in | 36.87° |
| 10/12 | 15.62 in | 19.70 in | 20.83 in | 31.24 in | 39.81° |
| 12/12 | 16.97 in | 20.78 in | 22.63 in | 33.94 in | 45.00° |
Hip, valley and jack rafters
Hips and valleys run at 45° in plan when both roofs share one pitch, so they rise the same height over a run √2 times longer. That makes the hip pitch the common pitch ÷ √2 per 12 (or the full pitch per 16.97, the "17 per 12" rule) and its length the common run times the hip factor. Hips have the same 45° side cuts on both sides; the top edge is dropped (or backed) by the hip drop so the sheathing lies flat. A valley uses the same lengths; its seat is dropped instead so the jacks bear fully.
Jack rafters fill the space between the hip and the wall, each one shorter than the last by the common difference: spacing × M. At 16 in on centre and 6/12, that is 17.89 in, the classic framing-square figure. Each jack also loses half the hip's 45° thickness at its top end. Cripple jacks, between a hip and a valley, are the common difference times the number of spaces they cover.
When two roofs of different pitch meet, the hip swings toward the steeper roof and is no longer at 45°. The calculator gives the theoretical hip length and plan angle from the two runs; lay out the real cuts on site from those lines.
How the ridge board changes the length
Each common rafter stops at the face of the ridge board, so half the ridge thickness comes off each run. A 1.5 in ridge shortens the run by ¾ in; a doubled or 3.5 in beam by 1¾ in; a 5.25 in LVL by 2⅝ in. Measured along the rafter, the reduction is that amount times the multiplier. Forgetting it is the most common reason rafters come out too long.
Shed and lean-to rafters
A shed rafter spans the whole building from the low wall to the high wall, so there is no ridge deduction: the run is the full span. It usually has two overhangs, a low tail at the eave and a high tail past the tall wall, and the calculator adds both. A 10 ft deep lean-to at 3/12 with a 12 in low and 6 in high overhang needs rafters of 11 ft 10 1/4 in, cut from 14 ft stock.
Metric units and UK terms
Switch to m · mm to work in millimetres and degrees, with ridge presets for 38, 45 and 47 mm timber. The board to buy switches to metre lengths in 0.3 m steps. In the UK the birdsmouth is often called the rafter foot or seating cut; the wall plate is the same word.
When this result does not apply
The lengths are exact for the geometry stated; they are cut lengths, not a structural design. Check further in these cases:
- Rafter size and span. Whether a 2x8 can span the run under your snow and dead loads is a separate check: use the rafter span calculator and your local code.
- Trusses. Factory trusses are designed and cut by the truss maker; this page is for stick framing.
- Gambrel and mansard roofs. Two pitches meet at a knee joint: use the gambrel roof calculator.
- Out-of-square or out-of-level walls. Lengths assume parallel, level plates. Measure the actual span at several points.
- Unequal-pitch hips. The length is theoretical, with no ridge, hip or overhang deductions.
- Long overhangs. Over 48 in, overhangs usually need outriggers or engineering.
- Counting rafters and lumber. Use the roof framing calculator for the count and board list.
Frequently asked questions
How do I calculate rafter length with overhang?
Work out the net run (half the span less half the ridge thickness), multiply it by the pitch multiplier √(1 + (pitch ÷ 12)²) for the main length, then multiply the level overhang by the same multiplier for the tail and add the two. At 6/12 a 12 in overhang adds 1 ft 1 7/16 in.
How long should rafters be for a 24 ft span?
At 6/12 with a 1.5 in ridge and 12 in overhang, each rafter is 14 ft 5 9/16 in on the line, cut from 16 ft stock. At 8/12 it grows to 15 ft 6 9/16 in, still from 16 ft boards. Steeper pitches and longer overhangs need longer stock.
How deep can a birdsmouth be?
A common shop rule is no more than ⅓ of the rafter depth, measured square to the edge: 2.42 in on a 2x8. Some design rules are stricter, and your local code or engineer governs. If the notch is too deep, use a deeper rafter or a narrower seat.
How do I calculate a hip rafter?
Multiply the net common run by the hip factor √(2 + (pitch ÷ 12)²). At 6/12 the factor is 1.5, so a 13.9375 ft common run gives a 20 ft 10 7/8 in hip before the tail. The hip pitch is the common pitch ÷ √2, and the side cuts are 45°.
What is the difference between rafters and trusses?
Rafters are single boards cut and assembled on site, usually with ceiling joists; trusses are triangulated frames engineered and built in a factory. Trusses use smaller lumber and span further, while rafters leave the attic open for storage or a room.
How many rafters do I need?
Divide the building length by the spacing, round up, add one, and double it for both sides of a gable. A 32 ft building at 16 in centres needs 25 per side, 50 in all, plus any doubled rafters at openings. The roof framing calculator counts them with the lumber list.
About this calculator
Roof Calcly builds every calculator from a written method, tests it against worked cases before it goes live, and shows the formula, assumptions and sources on the page, so you can check any number yourself.
Update history
- Published with Common rafter, Hip & valley and Jack rafters modes.
Sources
- Roof geometry. Rafter, hip, valley and jack lengths, the √2 hip factor and the 17-per-12 hip run, derived in How it works and Hip, valley and jack rafters above.
- American Softwood Lumber Standard (PS 20). Actual dressed sizes of dimension lumber: a 2x4 is 3.5 in, a 2x8 is 7.25 in, a 2x12 is 11.25 in deep.
- Framing practice and carpentry trade texts. The ⅓-depth birdsmouth guideline and the cut-length allowance; local code and the engineer govern notching.
- International yard and pound definition. 1 ft = 0.3048 m and 1 in = 25.4 mm exactly.