Skip to the content
The DIY Calculator

My project

Nothing on the list yet. Work out a quantity with a calculator, then press “Add to project”: the lines add up here, and stay in this browser.

Rafter length calculator

Enter the span, the pitch, the ridge board and the overhang: this rafter length calculator gives the run, the line length, the cuts, the birdsmouth and the board to buy.

Opening the calculator…

Measurements

= 24 ft
= 12 in
= 1.5 in

Each rafter is

14 ft 5 9/16 inlong

Line length
13 ft 4 3/16 in 160.16 in
Run
11 ft 11 1/4 in 143.25 in
Overhang
1 ft 1 7/16 in along the rafter; 1 ft level
Plumb cut
26.57° off a square cut
Level cut
63.43° off a square cut
Board
16 ft whatever its size
Birdsmouth
3 1/2 in seatheel 1 3/4 in

Type the length of the ridge and the spacing on your plans, and the page counts the rafters.

Choose the size on your plans or in the span tables, and the page draws the birdsmouth and gives the height above the plate.

A common rafter of 14 ft 5 9/16 in at 6/12: line length 13 ft 4 3/16 in, overhang 1 ft 1 7/16 in, plumb cut 26.57°; from a board of 16 ft.

Half the roof from its gable end, to scale: a rafter of 14 ft 5 9/16 in at 6/12run 11 ft 11 1/4 inoverhang 1 ftline 13 ft 4 3/16 inridge 1 1/2 inrise 5 ft 11 5/8 in
Half the roof from its gable end, to scale: a rafter of 14 ft 5 9/16 in at 6/12
The drawing as a table
PartLengthWhere
Run11 ft 11 1/4 inon the level, wall to ridge
Rise5 ft 11 5/8 inat 6/12
Line length13 ft 4 3/16 inalong the rafter
Overhang1 ft 1 7/16 in1 ft on the level
Seat3 1/2 inon a 2 × 4 plate
Heel1 3/4 inplumb, against the wall
Reference valuesThis rafterReference
Stock above the seatchoose a size2 in at least

Reference: US Navy, Builder 3 & 2 (1994). Your local code may differ — check with your building department.

Options

The size and the spacing are yours, from your plans or the span tables: the page sizes no rafter.

How this was calculated
Run
288 in ÷ 2 − 1.5 in of ridge ÷ 2 = 143.25 in: each rafter stops at the face of the ridge boardSource: US Navy, Naval Education and Training
Slope
√(6² + 12²) ÷ 12 = 1.11803: the length along the rafter for one of run at 6/12
Line length
143.25 in × 1.11803 = 160.16 in, from the ridge’s plumb cut to the outside of the wall
Overhang
12 in on the level × 1.11803 = 13.42 in along the rafter
Total
(143.25 in + 12 in) × 1.11803 = 173.57 in, which a tape reads as 14 ft 5 9/16 in
Cuts
plumb: the angle whose tangent is 6 ÷ 12, 26.57° off a square cut; level: 90° − 26.57° = 63.43°
Board
the tail’s plumb cut reaches farther on the bottom edge by the rafter’s depth × 6 ÷ 12; from a 2 × 4 to a 2 × 12, the board is 16 ftSource: Archtoolbox
Birdsmouth
a seat of 3.5 in, the width of a 2 × 4 plate; a heel of 3.5 in × 6 ÷ 12 = 1.75 inSource: US Army, Archtoolbox, American Wood Council

From the span to the run

A common rafter runs from the top of a wall to the ridge. The span is measured from the outside of one wall to the outside of the other, and each rafter covers half of it on the level. Where the rafters meet a ridge board, each one stops at the board’s face, so the run is half the span less half the board’s thickness: the ridge deduction, which the US Navy’s builder’s manual calls shortening the rafter.

The line length is the run times the length of slope for one of run, which is the square root of the pitch squared plus twelve squared, over twelve. It runs from the ridge’s plumb cut to the plumb line of the outside of the wall, the same along either edge.

Worked example. A span of 24 ft at 6/12, a ridge board of 1 1/2 in and an overhang of 12 in on the level.

  • Run: 288 in ÷ 2 less 0.75 in = 143.25 in
  • Slope at 6/12: 1.11803 for one of run
  • Line length: 143.25 in × 1.11803 = 160.16 in
  • Overhang along the rafter: 12 in × 1.11803 = 13.42 in
  • Total: (143.25 in + 12 in) × 1.11803 = 173.57 in, or 14 ft 5 9/16 in, from a 16 ft board whatever its size
  • Plumb cut 26.57°, level cut 63.43°, both off a square cut

The overhang, on the level or along the rafter

An overhang on the plans is usually given on the level. The rafter’s tail is longer than that by the same slope. Measured along the rafter instead, it is worked back to the level: 18 in along the rafter at 6/12 is 16.1 in out from the wall.

The plumb and level cuts

At 6/12 the plumb cut is 26.57° off a square cut, the angle of the roof, and the level cut, the seat of the birdsmouth, is 63.43°. The ridge’s plumb cut has its long point on the top edge and the tail’s on the bottom edge, so the board is longer than the total by the rafter’s depth times the pitch over twelve: 3.63 in for a 2 × 8 at 6/12. The next stock length up from that is the board to buy.

The birdsmouth

The birdsmouth is the notch that seats a rafter on the wall: a level cut, the seat, that sits on the top plate, and a plumb cut, the heel, against the outside of the wall. With a seat as wide as the plate, as the US Army’s carpentry manual lays it out, a plate of 2 × 4 studs gives a seat of 3 1/2 in, and the heel at 6/12 is 1 3/4 in. A plate of 2 × 6 studs is 5.5 in wide, and the seat with it.

Choose the rafter’s size and the page draws the notch and gives what is left above it. A 2 × 8 is 7.25 in deep: its plumb cut is 8.11 in long, 6 3/8 in of it stands above the plate, and the notch takes 1.57 in of its depth square to its edge, leaving 5 11/16 in. The same manual asks for at least 2 in of stock to stay above the seat cut. The page sets that figure beside yours and judges nothing: how deep a notch may go is your code’s to say, and your building department reads it where you build.

Sizing a rafter is not done here

A rafter’s size depends on its span, spacing, species, grade and loads, which are in the American Wood Council’s span tables and in the code’s own, and your plans or your building department settle them. The page asks for the size only to draw the birdsmouth, and opens on none.

How many rafters

Type the length of the ridge and the spacing on your plans, and the page counts a rafter at each end of the ridge and enough between them that none stand farther apart than the spacing, on both sides of the roof. Along a ridge of 40 ft at 16 in that is 31 a side, 62 in all; with a size chosen, they are added to your list as boards.

Questions about rafters

What is the ridge deduction?

Half the thickness of the ridge board, taken off the run of each rafter, since a rafter stops at the face of the board and not at the middle of the roof. With a board of 1 1/2 in it is 3/4 in of run, 0.84 in along the rafter at 6/12.

Is the line length the length of board to buy?

Not quite: the line length ends at the outside of the wall, and the total adds the overhang. The tail’s plumb cut then reaches a little past the total on the bottom edge, and the board is the next stock length up from that, 16 ft on the example.

How deep can a birdsmouth be?

The US Navy’s manual keeps at least 2 in of stock above the seat cut, and your local code may say more; the page shows what is left of yours beside that figure.

What size rafters do I need?

That comes from the span tables, for your span, spacing, wood and loads, or from your plans. The page does not size rafters.

Sources

  • US Navy, Naval Education and Training, Builder 3 & 2, Volume 2 (NAVEDTRA 14044), chapter 2: roof framing. “The total run is always one-half the span.” The rafter’s length is its length for one unit of run times the run (p. 2-12). “Since a ridgeboard, usually 1 1/2 inches thick, is placed between the rafters, one-half of the ridgeboard (3/4 inch) must be deducted from each rafter. This calculation is known as shortening the rafter” (pp. 2-12, 2-13); its figure 2-18 draws the half thickness on the level, and its step 4 (p. 2-14) marks it “along the line length”. The tail’s length is the length for a unit of run times the projection (p. 2-13). Of the bird’s-mouth: “At least 2 inches of stock should remain above the seat cut” (p. 2-11). Public domain, 1994. Read on .
  • US Army, FM 5-426 Carpentry, chapter 7: rafter layout. Step 1: “find one-half of the horizontal distance (total run)”. Step 7: “The level cut or width of the seat is the width of the plate measured perpendicular to the plumb cut”. Public domain, 1995. Read on .
  • American Wood Council, Span Tables for Joists and Rafters, 2024 edition. Free. Spans of joists and rafters by species, grade, spacing and load. Lumber to the American Softwood Lumber Standard, PS 20-20: a 2 x 4 is 1-1/2 x 3-1/2 in, a 2 x 6 1-1/2 x 5-1/2, a 2 x 8 1-1/2 x 7-1/4, a 2 x 10 1-1/2 x 9-1/4, a 2 x 12 1-1/2 x 11-1/4 (p. 1, item 3). “Tabulated spans are the distance from face to face of supports. For sloping rafters the span is measured along the horizontal projection” (p. 1, item 5). Read on .
  • Archtoolbox, Lumber Dimensions: Nominal vs Actual. Surfaced softwood lumber: a 2 x 4 is 1 1/2 x 3 1/2 in, a 2 x 6 is 1 1/2 x 5 1/2 in, a 2 x 8 is 1 1/2 x 7 1/4 in, a 2 x 10 is 1 1/2 x 9 1/4 in and a 2 x 12 is 1 1/2 x 11 1/4 in; a 4 x 4 is 3 1/2 x 3 1/2 in and a 6 x 6 is 5 1/2 x 5 1/2 in; a 1 x 4 is 3/4 x 3 1/2 in and a 1 x 6 is 3/4 x 5 1/2 in. Standard lengths run from 6 to 24 ft in steps of 2 ft. Read on .

Updated . How we calculate. Found a mistake? Tell us.