Rafter Length Calculator
Calculate rafter length, ridge height, birdsmouth cuts, and material needs for your roof framing project. See also our Roof Pitch Calculator, Roof Truss Calculator, and Roofing Calculator.
How to Use the Rafter Length Calculator
Enter the building width (total span from exterior wall to exterior wall), roof pitch in rise-per-12-inches format (e.g., 6:12 means 6 inches of rise for every 12 inches of run), overhang length in inches, rafter spacing, and building length. The calculator determines the total rafter length including overhang, ridge board height above the top plate, number of rafters needed for both sides of the roof, total board feet of lumber, roof angle in degrees, and birdsmouth cut dimensions for proper seating on the wall plate.
Formula
Run = Building Width / 2
Rise = Run x (Pitch / 12)
Rafter Length = √(Run² + Rise²) + Overhang along slope
Overhang along slope = Overhang x √(1 + (Pitch/12)²)
Ridge Height = Rise (from top plate)
Roof Angle = arctan(Pitch / 12)
Rafters = ((Building Length x 12) / Spacing + 1) x 2
Example Calculation
Building: 24 ft wide, 6:12 pitch, 12" overhang, 16" OC, 30 ft long
Run = 24 / 2 = 12 ft
Rise = 12 x (6/12) = 6 ft
Rafter (no overhang) = √(144 + 36) = 13.42 ft
Slope factor = √(1 + 0.25) = 1.118
Overhang along slope = 1 ft x 1.118 = 1.12 ft
Total rafter length = 13.42 + 1.12 = 14.54 ft
Ridge height = 6 ft above top plate
Rafters per side = (360/16) + 1 = 24
Total rafters = 24 x 2 = 48 rafters
Reference Table: Rafter Spans (2x lumber, 16" OC)
| Rafter Size | 3:12 Pitch | 6:12 Pitch | 9:12 Pitch | 12:12 Pitch |
|---|---|---|---|---|
| 2x6 | 10'-6" | 11'-6" | 13'-0" | 14'-6" |
| 2x8 | 14'-0" | 15'-6" | 17'-0" | 19'-0" |
| 2x10 | 17'-6" | 19'-6" | 21'-6" | 24'-0" |
| 2x12 | 21'-6" | 23'-6" | 26'-0" | 29'-0" |
Maximum horizontal spans for SPF #2 grade, 20 psf live load (snow). Verify with local codes.
Frequently Asked Questions
What is a birdsmouth cut?
A birdsmouth is a notch cut into the rafter where it sits on the wall's top plate. It consists of two cuts: the seat cut (horizontal, rests on the plate) and the plumb cut (vertical, against the wall). The seat cut should be no more than 1/3 of the rafter depth. For a 2x8 rafter on a 2x4 wall, the seat cut is 3.5 inches with a corresponding plumb cut determined by the roof pitch.
How do I determine the right roof pitch?
Roof pitch depends on climate, roofing material, and aesthetics. Low slopes (2:12 to 4:12) work for modern designs and metal roofing. Medium slopes (4:12 to 8:12) are most common for residential homes with asphalt shingles. Steep slopes (8:12 to 12:12) shed snow well and create attic space. Minimum pitch for asphalt shingles is 2:12 (with special underlayment).
What size rafters do I need?
Rafter size depends on span, spacing, pitch, snow load, and species. For typical residential roofs at 16" OC: spans up to 12 ft use 2x6, 12-16 ft use 2x8, 16-20 ft use 2x10, and over 20 ft use 2x12. Higher pitches allow longer spans because the horizontal projection (run) is shorter relative to the rafter length. Always check local span tables.
How much overhang should a roof have?
Standard roof overhang (eave) is 12-18 inches. Minimum 6 inches protects walls from rain. 12 inches is standard for most homes. 18-24 inches provides better wall protection in rainy climates. Overhangs beyond 24 inches may require additional support (outriggers or lookouts). Gable end overhangs (rake) are typically 6-12 inches.
What is the difference between rafters and trusses?
Rafters are individual framing members cut and assembled on-site, allowing for open attic space or cathedral ceilings. Trusses are pre-engineered, factory-built triangular frames delivered to the site. Trusses are faster to install, span longer distances without interior bearing walls, and are more economical for simple roof shapes. Rafters offer more design flexibility.
Do I need a ridge board or ridge beam?
A ridge board (typically 1x or 2x, one size larger than rafters) is used when rafters are tied together with ceiling joists or collar ties — it provides a nailing surface but isn't structural. A ridge beam (engineered lumber or heavy timber) is structural and required when there are no ceiling joists to resist the outward thrust of the rafters, such as in cathedral ceiling designs.