Rafter Length Calculator

Get the exact cut length for every rafter: common and shed rafters with the birdsmouth and the board to buy, hip and valley rafters with their pitch, drop and side cuts, and a full jack rafter cut list.

Updated Method, test cases and sources on this page

Rafter length calculator

Gable or shed rafter from span, pitch, ridge and overhang, with the birdsmouth and the board to buy.

Roof type
ft

Outside of wall plate to outside of wall plate. For a shed roof, the full width the rafter covers.

x/12 or °

Rise per 12 of run, or degrees. Don't know it? Find your roof pitch.

in

Half of it comes off each rafter. A 2x ridge board is 1.5 in.

in

Horizontal projection past the outside of the wall, not the length along the tail.

in

Actual depth of the board: a 2x8 is 7.25 in deep.

in

The seat sits on the full plate: 3.5 in on a 2x4 wall, 5.5 in on a 2x6 wall.

Your rafter

Total rafter length

—

Enter your roof to see the rafter length.

Your rafter drawn to scaleCommon rafter in elevation on its wall plate with the birdsmouth and tail; for hips and jacks, the roof corner seen from above.
Your rafter is drawn here to scale as you type.
Lumber to buy
—
Jacks per side
—
Main length (ridge to wall line)
—
Overhang (tail)
—
High-side tail
—
Net run
—
Rise
—
Roof / seat angle
—
Plumb cut
—
Birdsmouth heel
—
Seat cut
—
Notch depth
—
Height above plate (HAP)
—
Hip / valley pitch
—
Hip angle
—
Side (cheek) cut
—
Hip drop / valley backing
—
Second run
—
Hip deduction (along run)
—

Cut lengths, not structural approval: check the rafter size can span this run with the rafter span calculator.

WaitingYour cut lengths, angles and what to check will appear here.

Show the math with your numbers
  1. Enter your roof to see the rafter length.

Assumptions: span is measured outside of wall plates; overhang is a horizontal projection; line length is measured along the top edge; the ridge is centred on the ridge line; equal-pitch hips are at 45° in plan; unequal-pitch hip lengths are theoretical with no deductions; rafters are not sized for load.

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.

A common rafter from the ridge to the tail: net run from the ridge to the outside of the wall, overhang past the wall, birdsmouth seat on the wall plate, and the line length along the top edgeoverhangnet run (span ÷ 2 − ridge ÷ 2)line length along the top edgebirdsmouthridge board
Measure run and overhang level, then the calculator turns them into lengths along the rafter.

Worked example: a 24 ft garage at 6/12

  1. 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).
  2. Net run24 ÷ 2 − 1.5 ÷ 24 = 12 − 0.0625 = 11.9375 ft.
  3. Multiplier√(1 + 0.5²) = 1.1180.
  4. 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.
  5. 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.

Mark from the line, then cut to it. Measure the line length along the top edge from the ridge plumb line, mark the birdsmouth heel at the wall line, and lay out the tail last. Cut one pattern rafter, test it on the building, then copy it.

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.

Common and hip rafter length per foot of run and jack rafter common difference by pitch
PitchCommon per ft of runHip per ft of common runJack difference at 16 inJack difference at 24 inPlumb angle from level
3/1212.37 in17.23 in16.49 in24.74 in14.04°
4/1212.65 in17.44 in16.87 in25.30 in18.43°
5/1213.00 in17.69 in17.33 in26.00 in22.62°
6/1213.42 in18.00 in17.89 in26.83 in26.57°
7/1213.89 in18.36 in18.52 in27.78 in30.26°
8/1214.42 in18.76 in19.23 in28.84 in33.69°
9/1215.00 in19.21 in20.00 in30.00 in36.87°
10/1215.62 in19.70 in20.83 in31.24 in39.81°
12/1216.97 in20.78 in22.63 in33.94 in45.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.

Published · last reviewed ·
How it is checkedSeven worked test cases covering common, shed, hip, unequal-pitch hip and jack rafters, metric units and the deep-notch warning run through the live calculator before each update. All seven match to the 1/16 in shown.
Method and sourcesRight-triangle and 45° plan geometry for every length and angle; common shop practice for the ⅓ notch limit and the 6 in lumber allowance; actual dressed lumber sizes from the American Softwood Lumber Standard.
CorrectionsSpotted an error or an edge case we miss? Tell us. Confirmed errors are fixed and noted in the update history.
PublisherRoof Calcly, a project by Orionix Systems Inc, 9655 S Dixie Hwy, Suite 312, Miami, FL 33156.

Update history

  • Published with Common rafter, Hip & valley and Jack rafters modes.

Sources

  1. 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.
  2. 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.
  3. Framing practice and carpentry trade texts. The ⅓-depth birdsmouth guideline and the cut-length allowance; local code and the engineer govern notching.
  4. International yard and pound definition. 1 ft = 0.3048 m and 1 in = 25.4 mm exactly.