Roof framing

Rafter length calculator

Span and pitch in, common rafter out: line length, the ridge deduction, the overhang tail, the birdsmouth seat and plumb cuts, HAP, and the two saw angles. Same math the CutOnce app runs on the jobsite.

Updated

Type spans the way your tape reads: 24 ft, 288, or 24′ 0″

Run
12 ft
Rise
6 ft
Line length
13 ft 5 in
Less half the ridge
13 ft 4-3/16 in
Tail (overhang) length
1 ft 1-7/16 in
Total board length
14 ft 6-7/16 in
Plumb cut angle
26.57°
Seat cut angle
63.43°
Rafter factor
1.1180
Birdsmouth seat cut
3-1/2 in
Birdsmouth plumb cut
1-3/4 in
HAP (height above plate)
6-3/8 in

Ridge board must be at least as deep as the rafter's plumb-cut depth (IRC R802.3).

A worked 6/12 example

A 24 ft span at 6/12 with 2x8 rafters. Every line below is computed by the same functions that drive the calculator above.

Span24 ftgiven
Run12 ftspan / 2
Rise6 ftrun x 6/12
Line length13 ft 5 insqrt(rise squared + run squared)
Plumb cut angle26.57°atan(6/12)
Seat cut angle63.43°90 - plumb cut
Birdsmouth seat3-1/2 inwall plate width
Birdsmouth plumb1-3/4 inseat x tan(angle)
HAP6-3/8 indepth / cos(angle) - plumb cut

How each number is derived

  1. 01

    Halve the span for the run

    Run is half the span, wall outside to ridge centreline. Everything else hangs off run and pitch.

  2. 02

    Rise from the pitch

    Pitch is rise per 12 in of run, so a 6/12 over a 144 in run rises 72 in. Rafter length is then the hypotenuse: the square root of rise squared plus run squared.

  3. 03

    Take off half the ridge

    Line length runs to the ridge centreline, but the board stops at the face of the ridge. The deduction is half the ridge thickness divided by the cosine of the roof angle, because you are measuring along the slope, not horizontally. That cosine is the part people forget.

  4. 04

    Add the tail

    The overhang is a second right triangle at the same pitch. A horizontal overhang of 12 in at 6/12 is 13-7/16 in of board, not 12.

  5. 05

    Cut the birdsmouth

    The seat cut is the wall plate width, 3-1/2 in for a 2x4 wall. The plumb cut follows from it: seat times the tangent of the angle. What is left above the plate is HAP, and that is the number that has to match at every rafter or your ridge will not be level.

Rafter factors by pitch

The rafter factor is the length of rafter per 1 unit of run. Multiply your run by the factor and you have the line length without touching a calculator. Framing squares have carried these figures for generations; two of the pitches below work out to exact fractions, 13/12 and 5/4, because they sit on Pythagorean triples.

PitchAngleFactorPer 12 in of run
3/1214.04°1.030812-3/8 in
4/1218.43°1.054112-5/8 in
5/1222.62°1.083313 in
6/1226.57°1.118013-7/16 in
7/1230.26°1.157713-7/8 in
8/1233.69°1.201914-7/16 in
9/1236.87°1.250015 in
10/1239.81°1.301715-5/8 in
12/1245.00°1.414217 in

The one code rule this touches

Rafter sizing is a span-table question and depends on species, grade, spacing, and load, so this page does not pretend to answer it. There is one rule the geometry here does trigger:

The ridge board has to be at least as deep as the rafter's plumb-cut depth, which is the rafter depth divided by the cosine of the roof angle (IRC R802.3). At 6/12 a 2x8 rafter needs a plumb-cut depth of about 8-1/8 in, so a 2x8 ridge is already short and you want a 2x10.

For spans, sizes, and load paths, use the span tables your jurisdiction adopts. The app flags the ridge upsize automatically when it prints a cut plan.

How we verify this math

Common questions

Is line length the board length I buy?
No. Line length is ridge centreline to the outside of the wall. Take off half the ridge, add the tail, then add the waste your cuts need, and buy the next stock length up.
Why does my rafter come out short at the ridge?
Nine times out of ten the ridge deduction was taken horizontally instead of along the slope. Half of a 1-1/2 in ridge is 3/4 in flat, but at 6/12 the deduction along the rafter is 13/16 in. Small, and it compounds across a roof.
What is HAP and why does it matter?
Height above plate: what is left of the rafter above the birdsmouth seat. Every common rafter on the roof has to have the same HAP, because that is what puts the ridge at a consistent height. If your HAP varies, your ridge waves.
Does this handle hips, valleys, and jacks?
Not on this page. Those run on different unit lengths and need backing angles and drop, which is what the app's hip and valley calculator does.

Print the cut plan, not just the number

The app carries this to the board: rafter counts, the ridge upsize check, and a printable plan with the birdsmouth marked.

App StoreGoogle Play

See also