Roof Rafter Calculator
Enter building span, ridge board thickness, pitch, and overhang to get common rafter length, plumb cut angle, and bird's-mouth geometry.
Cut accurate rafters the first time. Enter your building span, pitch, and overhang below to get exact rafter length and cut angles.
Total width from exterior wall to exterior wall. Run = span ÷ 2.
Standard 2x lumber ridge = 1.5″. LVL ridge = 1.75″.
The X value in X:12 pitch notation.
Horizontal distance the rafter extends beyond the wall plate.
Horizontal seat cut of the bird’s-mouth resting on the wall plate. Typically 3.5″ (2×4 plate).
Enter span and pitch
to calculate rafter length
Related Roofing Calculators
Roofing area, pitch, cost, and material estimation tools for residential and commercial projects.
Rafter length formula
A common rafter runs from the ridge board to the wall plate, then extends further as the tail that forms the eave overhang. The formula uses the adjusted run (accounting for ridge thickness) and the roof angle derived from the pitch.
Adjusted Run
X = (Building Span − Ridge Thickness) ÷ 2
Segment Length (ridge to wall plate)
Lseg = X ÷ cos(θ)
Total Rafter Length
Ltotal = Lseg + (Overhang ÷ cos(θ))
Worked example. Building span = 24 ft, ridge = 1.5″, pitch = 6:12 (26.57°), overhang = 12″. X = (288 − 1.5) ÷ 2 = 143.25″. Lseg = 143.25 ÷ cos(26.57°) = 160.16″. Overhang = 12 ÷ cos(26.57°) = 13.42″. Total = 173.58″. The most common mistake is using the full span instead of the run, causing every rafter to be cut approximately 0.75 inches too long and bowing the ridge board. Use the roof pitch calculator to verify your pitch angle before cutting.
Bird’s-mouth and plumb cut
The bird’s-mouth is the notch cut where the rafter sits on the wall plate. It has two components: the plumb cut (vertical, parallel to the building walls) and the seat cut (horizontal, resting on the top of the wall plate). The heel height — how tall the plumb cut is — must not exceed 25% of the rafter depth or structural integrity is compromised per IRC R802.7.
Heel Cut Height
ch = cs × tan(θ)
| Rafter size | Actual depth | Max heel cut (25%) |
|---|---|---|
| 2×6 | 5.5″ | 1.375″ |
| 2×8 | 7.25″ | 1.8125″ |
| 2×10 | 9.25″ | 2.3125″ |
| 2×12 | 11.25″ | 2.8125″ |
Rafter span tables
Rafter size is not just a length calculation — it is a code compliance check against bending stress and deflection. IRC Table R802.5.2 specifies the maximum rafter span by size, species, spacing, and snow/live load. The calculated rafter length must be within the table’s maximum allowable span for the selected size. Use the roof slope calculator to cross-check your pitch in degrees for structural drawings. For the full material take-off, the roof area calculator converts your rafter geometry into squares.
| Rafter size | 12″ OC | 16″ OC | 24″ OC |
|---|---|---|---|
| 2×6 | 14′-4″ | 13′-0″ | 10′-8″ |
| 2×8 | 18′-11″ | 17′-2″ | 14′-0″ |
| 2×10 | 24′-2″ | 21′-11″ | 17′-10″ |
| 2×12 | 27′-11″ | 25′-4″ | 20′-9″ |
Frequently asked questions
What is the difference between span and run for rafter calculations?
Span is the total building width from exterior wall to exterior wall. Run is the horizontal distance a single rafter covers — from the outside of the wall to the center of the ridge. For a standard symmetric gable or hip roof, run equals exactly half the span. Using the full span instead of the run is the most common rafter calculation mistake.
Why do I subtract half the ridge board thickness from the run?
The ridge board has physical thickness that occupies space at the peak. Each rafter must be shortened by half the ridge thickness so the assembled rafters meet at the centerline, not past it. A 1.5-inch ridge board means each rafter run is reduced by 0.75 inches. Skipping this adjustment pushes the ridge board out of plumb.
What angle do I set my circular saw for the plumb cut?
Set your bevel to match the pitch angle in degrees. For a 6:12 pitch, the angle is 26.57 degrees. For a 4:12, it is 18.43 degrees. The calculator outputs the exact degree for your pitch. Many carpenters round to the nearest half degree — for a 6:12, set to 26.5 degrees.
What is a bird's-mouth cut on a rafter?
A bird's-mouth is a notch cut into the underside of the rafter where it sits on the wall plate. It consists of a vertical plumb cut and a horizontal seat cut. The seat cut provides a flat bearing surface on the top of the wall plate. The plumb cut faces the exterior. Together they lock the rafter in place and transfer the load into the wall.
How deep can I cut the bird's-mouth without weakening the rafter?
IRC R802.7.1 limits the notch to 25 percent of the rafter's actual depth at any cross-section. For a 2x8 (actual 7.25 inches), the maximum heel cut depth is 1.8125 inches. Exceeding this creates a weak cross-section that can fracture under heavy snow load, creating a hinge point at the bearing.
How do I calculate rafter count for a gable roof?
Rafter count follows the same formula as trusses: (building length in inches divided by rafter spacing in inches) plus 1. For a 32-foot gable at 16 inches OC: (384 divided by 16) plus 1 equals 25 rafters on each side of the ridge, totaling 50 common rafters. Add ridge board length plus any hip or valley rafters separately.
What size rafter do I need for a 20-foot span?
A 20-foot horizontal run (40-foot total span) at 16-inch OC in Southern Pine requires a 2x10 at minimum — it spans up to 21 feet 11 inches per IRC Table R802.5.2 at 20 psf snow load. In a high-snow zone (40 psf), a 2x12 may be required. Always check the applicable IRC table for your species, spacing, and local snow load.
References
International Code Council. (2021). International Residential Code, Table R802.5.2: Rafter Spans. ICC.
American Wood Council. (2021). Prescriptive Residential Wood Deck Construction Guide (DCA6). AWC. awc.org
National Roofing Contractors Association. (2024). The NRCA Roofing Manual: Steep-slope Roof Systems. NRCA.