Rafter Length Calculator
Calculate common rafter length from the building span and roof pitch, including the ridge board deduction and overhang, plus the rise, cut angle and board length to buy.
By CalcBuilt Editorial TeamUpdated September 9, 2026Formulas checked against manufacturer specs, see how we calculate.
Results
- Rafter length
- 14.46 ft
- Ridge to tail along the top edge, including 1.12 ft for the overhang
- Length without overhang
- 13.35 ft
- Run of 11.94 ft x pitch factor 1.118
- Rise
- 5.97 ft
- Height of the ridge above the top plate, before the heel stand
- Board length to buy
- 16 ft
- Rounded up to the next even 2 ft lumber length
- Roof angle
- 26.6 degrees
- Lay out plumb and seat cuts with a framing square at 6 in rise over 12 in run
Rafter Length formula
Run (ft) = (Span - ridge thickness / 12) / 2
Pitch factor = sqrt(1 + (rise / 12)^2)
Rafter length = Run x Pitch factor + Overhang x Pitch factor
Rise = Run x rise / 12Worked example
A 28 ft wide garage with an 8/12 roof, a 2x ridge (1.5 in) and 1.5 ft overhangs: run = (28 - 0.125) / 2 = 13.94 ft. The 8/12 pitch factor is 1.202, so the line length is 13.94 x 1.202 = 16.75 ft. The overhang adds 1.5 x 1.202 = 1.80 ft, for a total rafter of 18.55 ft. Buy 20 ft boards.
The rise is 13.94 x 8 / 12 = 9.29 ft, and the roof angle is atan(8 / 12) = 33.7 degrees. Mark the plumb cut at the ridge, measure 16.75 ft along the top edge to the building line for the birdsmouth, then continue 1.80 ft to the tail cut.
Quick reference
| Span | 4/12 | 6/12 | 8/12 |
|---|---|---|---|
| 20 ft | 10.54 ft | 11.18 ft | 12.02 ft |
| 22 ft | 11.60 ft | 12.30 ft | 13.22 ft |
| 24 ft | 12.65 ft | 13.42 ft | 14.42 ft |
| 26 ft | 13.70 ft | 14.53 ft | 15.62 ft |
| 28 ft | 14.76 ft | 15.65 ft | 16.83 ft |
| 30 ft | 15.81 ft | 16.77 ft | 18.03 ft |
| 32 ft | 16.87 ft | 17.89 ft | 19.23 ft |
How to calculate rafter length
A common rafter is the hypotenuse of a right triangle whose base is the run and whose height is the rise. The run is half the building span, less half the thickness of the ridge board. Multiply the run by the pitch factor, sqrt(1 + (rise/12)²), to get the line length from the ridge to the outside of the wall plate. Then add the overhang times the same factor for the tail.
This line length is measured along the top edge of the rafter from the long point of the plumb cut to the heel of the birdsmouth. It does not include the depth of the rafter or the heel stand, so a 2x8 and a 2x10 cut to the same numbers will land in the same place on the wall. Buy lumber in the next even length; a 14.46 ft rafter comes out of a 16 ft board with little waste.
Cutting and sizing rafters
Set a framing square to the pitch, rise on the tongue and 12 on the blade, and mark the plumb cut at the ridge end. Step off or measure the line length along the top edge, mark the plumb line for the birdsmouth, then square off the seat cut so it sits flat on the plate. Cut one rafter, test it on the building, and use it as the pattern for the rest.
Rafter size comes from the span tables in the code, not from the length alone. A 2x8 at 16 in on center may be fine for one span and species and undersized for another, and snow load changes everything. These results are for planning and layout; the local building code and inspector govern rafter size, spacing, connections and the size of the birdsmouth.
Key facts
- Rafter tables stamped on a framing square give the rafter length per foot of run for each pitch: 13.42 in at 6/12, 14.42 in at 8/12, 16.97 in at 12/12.
- Pitch factors: 4/12 = 1.054, 6/12 = 1.118, 8/12 = 1.202, 10/12 = 1.302, 12/12 = 1.414.
- Half the ridge board thickness is deducted from each rafter run, because the rafters bear on the faces of the ridge, not its center.
- Under the IRC, the birdsmouth notch at the end of a rafter may not exceed one quarter of the rafter depth.
- Rafter size and spacing depend on span, species, grade and snow load; IRC Table R802.4.1 lists allowable spans for 2x6 through 2x12 rafters.
Frequently asked questions
How long should rafters be for a 24 ft wide house?
At a 6/12 pitch with a 1.5 in ridge and no overhang, the run is 11.94 ft and the rafter is 13.35 ft. With a 1 ft overhang it is 14.46 ft, so buy 16 ft lumber.
Do you subtract the ridge board when calculating rafter length?
Yes. Subtract half the ridge thickness from the run of each rafter, since the rafters bear against the faces of the ridge board. For a 2x ridge that is 3/4 in per rafter.
What size lumber do I need for rafters?
It depends on span, spacing, species, grade and snow load. IRC Table R802.4.1 gives allowable spans; for many houses a 2x8 or 2x10 at 16 in on center works, but check the table or ask your building department.
How do I cut the angle on a rafter?
Use a framing square set to the pitch, for example 6 on the tongue and 12 on the blade, and mark along the tongue for plumb cuts and along the blade for the seat cut. A speed square set to the roof angle in degrees does the same job.
Sources and references
- Chapter 8 Roof-Ceiling Construction, 2021 IRC (ICC)
- 2024 Span Tables for Joists and Rafters (American Wood Council)
- Span Options Calculator for Wood Joists and Rafters (American Wood Council)
- Tutorial for Understanding Loads and Using Span Tables (American Wood Council)
Next steps for this project
The usual order for a roofing & siding project. See all roofing & siding calculators.
Results are estimates based on standard formulas and typical product specifications. Confirm quantities with your supplier and local code before ordering.