Rafter calculator

Common rafter length, cuts, birdsmouth and board count for a gable roof, from its pitch and width.

Start from:

Each rafter, along the top edge

14 ft 5 5/8 in

Board to buy
2x8 × 16 ft
Outside of wall to ridge
13 ft 4 1/8 in
Tail (overhang)
1 ft 1 3/8 in
Plumb cuts
26.6° (6/12 on a speed square)
Birdsmouth seat
3 1/2 in
Birdsmouth heel
1 3/4 in
Height above plate
6 3/8 in
Ridge top (above plate)
6 ft 6 in
Rafters
48 (24 per side)

Ridge already shortened by half the ridge board (13/16 in along the rafter). Sizes and spans are not checked: see "What size rafter do I need?" below.

6/12 · 2x8 · top edge 14 ft 5 5/8 in Seat 3 1/2 in · heel 1 3/4 in · HAP 6 3/8 in
Drawn to scale from your numbers. First: one rafter, tail to ridge board. Second: the birdsmouth up close, where the rafter sits on the wall plate.

How to calculate rafter length

A common rafter is the long side of a right triangle: its run is the flat distance it covers, its rise is how much it climbs. Measured along the top edge between two plumb (vertical) cuts, its length is always the run times the pitch's slope factor.

  1. Slope factor = √(1 + (pitch ÷ 12)²)
  2. Run to the ridge = half the building width − half the ridge board thickness
  3. Outside of wall to ridge = run × slope factor; tail = overhang × slope factor
  4. Birdsmouth: seat = wall plate width; heel = seat × pitch ÷ 12
  5. Height above plate = rafter depth × slope factor − heel
  6. Board length = top-edge length + rafter depth × pitch ÷ 12 (the tail's plumb cut runs past the top edge), rounded up to a stock length
  7. Rafters per side = building length ÷ spacing, rounded up, + 1; twice that for both sides

Worked example

A 24 ft wide building with a 6/12 roof, 1 1/2 in ridge board, 12 inch overhang and 2x8 rafters on 2x4 walls. The slope factor is √(1 + (6 ÷ 12)²) = 1.118. Each rafter runs 144 − 0.75 = 143.25 inches to the ridge, so it's 143.25 × 1.118 = 160.16 inches from the outside of the wall to the ridge, plus a 13.42 inch tail: 14 ft 5 5/8 in along the top edge. The birdsmouth seat is 3 1/2 in and the heel is 3 1/2 in × 6 ÷ 12 = 1 3/4 in, leaving 6 3/8 in above the plate. The board has to be 14 ft 9 1/4 in long, so buy 16 ft 2x8s. On a 30 ft long building at 16 inches on center that's 24 per side, 48 rafters.

Rafter length per foot of run

The common-rafter table on a framing square: inches of rafter for each 12 inches of run, with the plumb and seat cut angles. Multiply by the run in feet for the line length.

PitchRafter per foot of runPlumb cutSeat cut
3/1212.37 in14.0°76.0°
4/1212.65 in18.4°71.6°
5/1213.00 in22.6°67.4°
6/1213.42 in26.6°63.4°
7/1213.89 in30.3°59.7°
8/1214.42 in33.7°56.3°
9/1215.00 in36.9°53.1°
10/1215.62 in39.8°50.2°
12/1216.97 in45.0°45.0°

Rafter lumber sizes

Typical actual (dry) sizes from the American Softwood Lumber Standard (PS 20); mills vary by about 1/32 inch. Stock lengths run 8 to 20 ft in 2 ft steps; longer boards are often special order.

NominalActual sizePlumb depth at 6/12
2x41 1/2 in × 3 1/2 in3 15/16 in
2x61 1/2 in × 5 1/2 in6 1/8 in
2x81 1/2 in × 7 1/4 in8 1/8 in
2x101 1/2 in × 9 1/4 in10 5/16 in
2x121 1/2 in × 11 1/4 in12 9/16 in

Rafter questions

What is a rafter?

A rafter is one of the sloped boards that frame a roof, running from the wall up to the ridge. A common rafter runs the full distance at right angles to the wall plate. Rafters are cut and set one at a time on site; trusses are triangles built in a factory with their own bottom chord. Joists are the level boards that carry a floor or ceiling, and ceiling joists often double as rafter ties.

How do I mark the plumb cut and birdsmouth with a speed square?

Hold the square's pivot on the rafter's top edge and turn it until the pitch number on the "common" scale lines up with the same edge; the square's edge is now plumb. For a 6/12 roof that's the 6 mark, which is 26.6°. Mark the seat cut square to that plumb line, as long as the wall plate is wide, and the heel up the plumb line. In the example above that's a 3 1/2 in seat and a 1 3/4 in heel.

What is the standard rafter spacing?

16 or 24 inches on center are the most common, with 12 inches for heavy loads or short spans. The spacing has to match the span table you size the rafters from and the roof sheathing's rating, so pick it with the rafter size, not afterwards.

What size rafter do I need?

That depends on the span, spacing, wood species and grade, and your area's snow and wind loads. This calculator doesn't check it. The span tables are in Section R802 of the International Residential Code (IRC); follow your local building code, which may amend them, and have a qualified professional size the rafters for anything unusual.

How long should rafter tails be?

The tail is set by the overhang you want, measured flat from the outside of the wall. For a 12 inch overhang on a 6/12 roof the tail is 13 7/16 in along the rafter. For exposed rafter tails, add the overhang here and the calculator includes the tail in the board length.

How do I figure rafters for a shed roof?

This calculator is for gable roofs, with rafters meeting at a ridge board. A shed rafter runs the full width from the low wall to the high wall and sits on both, so it needs a birdsmouth at each end. The roof pitch calculator gives a shed rafter's line length; choose "Shed" there.