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.
| Span | 24 ft | given |
| Run | 12 ft | span / 2 |
| Rise | 6 ft | run x 6/12 |
| Line length | 13 ft 5 in | sqrt(rise squared + run squared) |
| Plumb cut angle | 26.57° | atan(6/12) |
| Seat cut angle | 63.43° | 90 - plumb cut |
| Birdsmouth seat | 3-1/2 in | wall plate width |
| Birdsmouth plumb | 1-3/4 in | seat x tan(angle) |
| HAP | 6-3/8 in | depth / cos(angle) - plumb cut |
How each number is derived
- 01
Halve the span for the run
Run is half the span, wall outside to ridge centreline. Everything else hangs off run and pitch.
- 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.
- 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.
- 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.
- 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.
| Pitch | Angle | Factor | Per 12 in of run |
|---|---|---|---|
| 3/12 | 14.04° | 1.0308 | 12-3/8 in |
| 4/12 | 18.43° | 1.0541 | 12-5/8 in |
| 5/12 | 22.62° | 1.0833 | 13 in |
| 6/12 | 26.57° | 1.1180 | 13-7/16 in |
| 7/12 | 30.26° | 1.1577 | 13-7/8 in |
| 8/12 | 33.69° | 1.2019 | 14-7/16 in |
| 9/12 | 36.87° | 1.2500 | 15 in |
| 10/12 | 39.81° | 1.3017 | 15-5/8 in |
| 12/12 | 45.00° | 1.4142 | 17 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.
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.
See also
