Rafter Length & Roof Pitch Calculator
Enter the building width, the roof pitch and the overhang. You'll get the rafter length to cut, the roof angle, the plumb and seat cuts for the birdsmouth, and a drawing of one rafter to scale.
- Exact geometry, no rounding until the end
- To-scale diagram
- Feet or metric
2 Your rafter
Updates as you type| Run (ridge center to outside of wall) | 12' 0" |
|---|---|
| Total rise at the ridge center | 6' 0" |
| Rafter line length, ridge center to wall | 13' 5" |
| Less half the ridge board | − 13/16" (3/4" × slope factor) |
| Plus the tail (overhang) | + 1' 1 7/16" |
| Rafter length, ridge cut to tail cut | 14' 5 9/16" |
| Plumb cut (ridge and tail) | 26.6° from square, or 6 on the common scale of a speed square |
| Seat cut | square to the plumb cut, 3 1/2" long |
| Birdsmouth heel cut | 1 3/4" tall (plumb) |
| Notch depth into the rafter | 1 9/16", 22% of a 2×8's depth |
| Plumb cut depth at the ridge | 8 1/8" (the ridge board must be at least this deep, IRC R802.3) |
| Slope factor | 1.118 (rafter length per foot of run) |
Rafter size and spacing depend on span, snow load and roof weight, which this calculator doesn't check. Use your code's rafter span tables or an engineer.
Quick answer
Rafter length = (run − half the ridge thickness + overhang) × slope factor, where the run is half the building width and the slope factor is √(1 + (rise ÷ 12)²). For a 24 ft wide house with a 6/12 roof, a 1½" ridge and a 12" overhang, that's 14' 5 9/16".
Roof pitch to angle and slope factor
| Pitch | Angle | Slope factor | Rise over 12 ft of run |
|---|---|---|---|
| 1/12 | 4.8° | 1.003 | 1' 0" |
| 2/12 | 9.5° | 1.014 | 2' 0" |
| 3/12 | 14° | 1.031 | 3' 0" |
| 4/12 | 18.4° | 1.054 | 4' 0" |
| 5/12 | 22.6° | 1.083 | 5' 0" |
| 6/12 | 26.6° | 1.118 | 6' 0" |
| 7/12 | 30.3° | 1.158 | 7' 0" |
| 8/12 | 33.7° | 1.202 | 8' 0" |
| 9/12 | 36.9° | 1.25 | 9' 0" |
| 10/12 | 39.8° | 1.302 | 10' 0" |
| 11/12 | 42.5° | 1.357 | 11' 0" |
| 12/12 | 45° | 1.414 | 12' 0" |
| 14/12 | 49.4° | 1.537 | 14' 0" |
| 16/12 | 53.1° | 1.667 | 16' 0" |
Slope factor is the rafter length per foot of run. Multiply it by the run, or by the footprint area for roof area. Use the calculator above for your exact size.
How rafter length is worked out
Half the building width is the run: the level distance from the ridge center to the outside of the wall. Multiply the run by the pitch's slope factor, √(1 + (rise ÷ 12)²), and you have the rafter's line length. Then take off half the ridge board's thickness, because the rafter stops at the face of the ridge rather than its center, and add the overhang, also multiplied by the slope factor.
Worked example: a 24 ft wide house with a 6/12 roof
- Run: 24 ft ÷ 2 = 12 ft (144 inches).
- Slope factor for 6/12: √(1 + 0.5²) = 1.118.
- Line length: 144 × 1.118 = 161 inches.
- Less half a 1½" ridge along the slope: 0.75 × 1.118 = 0.84 inches. Plus a 12" overhang: 12 × 1.118 = 13.42 inches.
- Rafter length: 173.57 inches, or 14' 5 9/16". A 16 ft board covers it.
- The roof angle is 26.6°, and the birdsmouth over a 2×4 wall has a 1.75" heel cut.
Marking and cutting a rafter
- Plumb cuts at the ridge and the tail are vertical once the rafter is in place. Hold the speed square's pivot point against the top edge of the rafter and turn the square until the rise number (6 for a 6/12 roof) on the COMMON scale lines up with that same edge. Draw along the square's straight edge.
- The seat cut is square to the plumb cut and sits flat on the wall plate. It needs at least 1½ inches of bearing, and the notch should take no more than a quarter of the rafter's depth, the IRC's limit for notches at the ends of a rafter. On steep roofs that means a seat shorter than the wall is wide; the calculator shortens it for you.
- Cut one pattern rafter and test it at both ends of the building before cutting the rest. Walls are rarely perfectly straight, and an error repeats on every rafter.
- Pick crowns up. Sight down each board and install it with the bow facing the sky so the roof load straightens it.
Code points to know
- The International Residential Code (IRC) section R802.3 calls for a ridge board at least 1 inch nominal thick and no shallower than the cut end of the rafter. A rafter's plumb cut is always deeper than the board itself (8.1 inches for a 2×8 at 6/12), so the ridge is normally one size up: 2×8 rafters get a 2×10 ridge.
- Rafter size and spacing come from your code's rafter span tables, which depend on snow load, roof weight and lumber grade. This calculator works out lengths and cuts, not sizes.
- Opposing rafters need ties or ceiling joists low in the attic to stop the walls from spreading, unless the ridge is a structural beam.
Frequently asked questions
How do I find the pitch of my roof?
Hold a level horizontally against the underside of a rafter or the roof surface, measure 12 inches along the level, and measure straight up from that point to the rafter. That number of inches is the rise, so 6 inches means a 6/12 pitch.
What angle is a 6/12 roof?
About 26.6°. A 4/12 roof is 18.4°, an 8/12 roof is 33.7° and a 12/12 roof is 45°.
Is rafter length measured on the top or bottom edge?
With plumb cuts at both ends, the length is the same along either edge between the cuts. We measure along the bottom edge from the ridge cut to the building line at the outside of the wall, then add the overhang.
How big should a birdsmouth be?
The seat needs at least 1½ inches of bearing on the wall, and the notch should take no more than a quarter of the rafter's depth, the IRC's limit for notches at the ends of rafters. On steep roofs the seat ends up shorter than the wall is wide; the calculator works out the seat length and notch depth for you.
How many rafters do I need?
Divide the length of the roof (along the ridge) by the rafter spacing, round up and add one, then double it for the two sides of a gable. A 30 ft long roof with rafters 16 inches on center needs 24 rafters per side, 48 in all.
Last reviewed 2026-10-23. See how we calculate for our sources and assumptions.