WoodCalc Pro

Rafter Calculator

Common rafter length with overhang, the plumb and seat cut angles, a birdsmouth that keeps the roof plane true, ridge height, hip and valley length and how many rafters to order.

Outside of wall to outside of wall. 24' or 288
1½" for 2× ridge, 0 if none
Horizontal, from wall face

Common rafter, with overhang

14′ 5 9/16"

Ridge to wall (line)
13′ 4 3/16"
Tail (overhang)
13 7/16"
Plumb cut angle
26.6°
Seat cut angle
63.4°
Birdsmouth heel
1 3/4"
HAP
6 3/8"
Ridge top above plate
6′ 6 3/8"
Rafters
69 × 16 ft
Board feet
1,472 bf
Valley (if any)
19′ 4 7/8"

Lengths are measured along the top edge. Subtract nothing more for the ridge; half its thickness is already taken out of the run.

run 11′ 11 1/4"rise 5′ 11 5/8"13′ 4 3/16"

Rafter length chart (24 ft span)

Gable roof, 1½″ ridge, 12″ level overhang; length along the top edge. Click a pitch for spans from 12 to 40 ft.

PitchAngleRafter factorRidge to wallWith overhangBuy
3/1214°1.03112′ 3 11/16"13′ 4"14 ft
4/1218.4°1.05412′ 7"13′ 7 5/8"16 ft
5/1222.6°1.08312′ 11 3/16"14′ 3/16"16 ft
6/1226.6°1.11813′ 4 3/16"14′ 5 9/16"16 ft
7/1230.3°1.15813′ 9 13/16"14′ 11 3/4"16 ft
8/1233.7°1.20214′ 4 3/16"15′ 6 9/16"18 ft
9/1236.9°1.2514′ 11 1/16"16′ 2 1/16"18 ft
10/1239.8°1.30215′ 6 1/2"16′ 10 1/16"18 ft
12/1245°1.41416′ 10 9/16"18′ 3 9/16"20 ft

How rafter length is worked out

Every common rafter is the hypotenuse of a right triangle. The run is half the span, less half the ridge board. The rise is run × pitch ÷ 12. Instead of taking a square root every time, framers multiply the run by the rafter factor √(1 + (pitch/12)²), the "length per foot of run" row stamped on a framing square's rafter table (13.42" per foot for 6/12 means a factor of 1.118).

Cutting sequence

  1. Mark the plumb cut at the ridge end at 26.6° (a speed square's 6 mark on the common scale).
  2. Measure 13′ 4 3/16" along the top edge and mark a parallel plumb line: that is the outside face of the wall.
  3. From that line, lay out the heel (1 3/4") and the seat (3.5") so 6 3/8" of rafter stays above the plate.
  4. Measure the tail (13 7/16" along the top edge) and cut the fascia plumb cut.
  5. Cut one pattern rafter, test it on both walls, then use it to mark the rest.

Shed and hip roofs

On a shed (lean-to) roof the rafter runs the full building width from the low wall to the high wall, and both ends overhang, so run = span, not half the span. On a hip roof the four hips run diagonally at 45° in plan: hip run = common run × 1.4142, so the hip slope is pitch ÷ 1.4142 (a 6/12 roof has 4.24/12 hips). Jack rafters fill between the hip and the wall plate, each one shorter than the last by spacing × rafter factor.

Choosing a rafter size

Size comes from the IRC rafter span tables R802.4.1(1)–(8), read for your species and grade, snow or live load, dead load, spacing and whether a ceiling is attached. Longer spans, heavier snow or heavy roofing (tile, slate) push you to deeper rafters or closer spacing. Engineered trusses avoid the question on most new houses. Check the table that matches your load and ask your building department if you're unsure.

Need the pitch first? Use the roof pitch calculator, or go straight to a common pitch: 4/12, 6/12, 8/12, 12/12.

Ask the shop

Stuck on a detail? Ask a question about this job. Your current inputs and results are sent along so the answer fits your numbers. AI answers can be wrong, so double-check anything structural with your building department.

Questions people ask

How do you calculate rafter length?
Rafter run = (building span − ridge board thickness) ÷ 2. Rafter length (along the top edge, from ridge to the outside of the wall) = run × √(1 + (pitch/12)²). Add the overhang: overhang run × the same factor. Example: 24 ft span, 1½" ridge, 6/12 pitch: run = 143.25", × 1.118 = 160.16" (13′ 4 3/16″) before the overhang.
What is a birdsmouth cut?
The notch that lets a rafter sit flat on the wall top plate: a horizontal seat cut that bears on the plate and a vertical heel (plumb) cut against its outside face. Framers usually make the seat as wide as the plate (3½" on a 2×4 wall, 5½" on a 2×6) and keep at least two-thirds of the rafter depth above the notch.
What is HAP (height above plate)?
The plumb distance from the top of the wall plate to the top edge of the rafter, measured at the heel cut. Keeping HAP identical on every rafter (and on hips and valleys) keeps the roof plane flat, so framers lay out the birdsmouth from HAP.
How long is a hip rafter?
On a regular hip roof (equal pitches), the hip run is the common rafter run × √2 (1.4142), and it rises the same height, so hip length = √(hip run² + rise²) or common run × √(2 + (pitch/12)²)/12 per foot. For a 6/12 roof the hip factor is 1.5 per unit of common run (18" per foot).
How many rafters do I need?
For each roof side: building length ÷ spacing, rounded up, plus one. A 40 ft building at 16" on center needs 31 rafters per side, 62 total, plus doubled rafters at openings and any gable-end ladder framing.
How do you calculate rafters for a shed roof?
A shed (single-slope) rafter spans the full building width. Run = building width (outside of low wall to outside of high wall). Rafter length = run × √(1 + (pitch/12)²), plus the overhang at both ends (each overhang × the same factor). The high wall must be taller than the low wall by run × pitch ÷ 12.
How long is a rafter for a 24 foot span?
With a 1½" ridge board the run is 143¼". At 4/12 the rafter is 12′ 7″, at 6/12 13′ 4 3/16″, at 8/12 14′ 4 3/16″ and at 12/12 16′ 10 9/16″ from ridge to wall line. Add the overhang and buy the next even length (usually 16 ft for a 6/12 roof with a 12″ overhang).
How do you calculate jack rafter lengths?
Jack rafters on a hip roof get shorter by a fixed amount: on-center spacing × the rafter factor. At 6/12 (factor 1.118) and 16″ spacing, each jack is 17 7/8″ shorter than the one before. Start from the common rafter length and subtract the step for each jack.
What size rafters do I need?
Rafter size depends on span, spacing, species, grade, snow load and ceiling attachment; the IRC tables R802.4.1(1)–(8) cover it. As a rough guide, 2×6 at 16" on center reaches about 12–14 ft in low snow areas, 2×8 about 15–18 ft, 2×10 about 19–22 ft. Always confirm with the table for your load or with your building department.