Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Rafter calculator

Enter the run, the pitch and the overhang to get the rafter length, the angles for the plumb and seat cuts, and how high the ridge sits above the wall plate.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Ordering shingles? The roofing calculator gives roof squares. Pricing the framing? See the lumber calculator.

How rafter length is worked out

A common rafter is the sloping side of a right triangle. The run is the flat side, from the outside of the wall to the center of the ridge, and the rise is the vertical side. Pitch is given as inches of rise per 12 inches of run, so the slope factor is the length of the sloping side for each 1 ft of run.

Roof angle = arctan(pitch ÷ 12)
Slope factor = √(1 + (pitch ÷ 12)²)
Rise (ridge height above the plate) = run × pitch ÷ 12
Rafter length (wall to ridge) = (run − ridge thickness ÷ 2) × slope factor
Overhang length = level overhang × slope factor
Plumb cut = roof angle from square; seat (level) cut = 90° − roof angle from square

The rafter stops against the ridge board, not at its center, so half the ridge's thickness comes off the run before multiplying. All lengths are measured along the same line on the rafter (usually its top edge, or the measuring line through the birdsmouth).

Worked example

A 24 ft wide building has a 12 ft run. At a 6/12 pitch: roof angle = arctan(0.5) = 26.57°, slope factor = √(1 + 0.25) = 1.11803. The ridge is 12 × 6 ÷ 12 = 6 ft above the top plate. With a 1½ in ridge board, the run shortens by 0.75 in (0.0625 ft): (12 − 0.0625) × 1.11803 = 13.3465 ft. A 1.5 ft level overhang adds 1.5 × 1.11803 = 1.6771 ft. Total = 15.024 ft, about 15 ft 0 5/16 in, so a 16 ft board works.

The plumb cuts at the ridge and the tail are vertical once the rafter is in place: on a miter saw that's 26.57° from square. The seat cut of the birdsmouth is level, at a right angle to the plumb cut: 63.43° from square (it meets the rafter's edge at 26.57°).

PitchRoof angleSlope factor
3/1214.04°1.0308
4/1218.43°1.0541
5/1222.62°1.0833
6/1226.57°1.1180
7/1230.26°1.1577
8/1233.69°1.2019
9/1236.87°1.2500
10/1239.81°1.3017
12/1245.00°1.4142

Before you cut

  • Size comes from span tables. This gives length, not the lumber size. Rafter size and spacing depend on the span, the load and the wood species and grade: use the span tables in your building code (IRC Chapter 8) or a design by an engineer.
  • Birdsmouth depth: the seat cut shouldn't remove more than about a third of the rafter's depth; check your local code.
  • Cut one pattern rafter, test it at both ends of the building, then use it to mark the rest.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • 12 ft run, 6/12, 1.5 ft overhang, 1.5 in ridge: 15.024 ft = 15 ft 0 5/16 in ✓
  • 6/12 roof angle: 26.57° ✓
  • 12 ft run at 6/12: ridge 6 ft above the plate ✓
  • 10 ft run, 12/12, no overhang or ridge: 14.142 ft = 14 ft 1 11/16 in ✓
  • Edge: a pitch of 0 asks for a pitch ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking cookies, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

How long is a rafter for a 6/12 pitch?

1.118 times the run. For a 12 ft run that's 13.42 ft to the ridge center, before the ridge deduction and the overhang.

What angle is a 6/12 pitch?

26.57°. 4/12 is 18.43°, 8/12 is 33.69° and 12/12 is 45°.

What is the run of a rafter?

The level distance from the outside of the wall to the center of the ridge, which is half the building's width for a simple gable roof.

How do I find the ridge height?

Multiply the run by the pitch over 12. A 12 ft run at 6/12 rises 6 ft above the top of the wall plate, plus the height of the rafter above the seat cut.

What size lumber do I need for rafters?

That depends on the span, spacing, snow and dead loads and the wood grade. Use your local code's rafter span tables or ask an engineer.

Related calculators