How to use the rafter length calculator
- Enter the building span (outside wall to outside wall), or the rafter run if you already know it.
- Enter the roof pitch as rise per 12 (like 6/12) or as an angle in degrees.
- Add the ridge board thickness and the overhang, then read the rafter length in feet and inches, the cut angles and the lumber length to buy.
Rafter length formula
Rise = run × pitch ÷ 12
Rafter (line) length = √(run² + rise²) = run × √(1 + (pitch/12)²)
Overhang length = horizontal overhang × √(1 + (pitch/12)²)
The rafter is the hypotenuse of a right triangle whose legs are the run and the rise. The same math powers the hypotenuse calculator and the right triangle calculator.
Example: 24 ft span, 6/12 pitch
Slope factor = √(1 + 0.5²) = 1.1180
Line length = 11.9375 × 1.1180 = 13.347 ft = 13′ 4 3/16″
12 in overhang × 1.1180 = 1′ 1 7/16″ → total 14′ 5 9/16″ (buy 16 ft)
The rise at the ridge is 5′ 11 5/8″ and the plumb cuts are at 26.6°.
Roof pitch to angle and slope factor
| Pitch | Angle | Slope factor | Rafter per 10 ft of run |
|---|---|---|---|
| 3/12 | 14.0° | 1.031 | 10.31 ft |
| 4/12 | 18.4° | 1.054 | 10.54 ft |
| 5/12 | 22.6° | 1.083 | 10.83 ft |
| 6/12 | 26.6° | 1.118 | 11.18 ft |
| 7/12 | 30.3° | 1.158 | 11.58 ft |
| 8/12 | 33.7° | 1.202 | 12.02 ft |
| 9/12 | 36.9° | 1.250 | 12.50 ft |
| 10/12 | 39.8° | 1.302 | 13.02 ft |
| 12/12 | 45.0° | 1.414 | 14.14 ft |
Multiply the slope factor by a roof's footprint area to estimate the actual roof surface for shingles or sheathing. Get the footprint with the square footage calculator.
Rafter terms
- Span: the width of the building between the outside of the walls.
- Run: the horizontal distance a rafter covers, normally half the span.
- Rise: the vertical height from the top of the wall plate to the ridge.
- Birdsmouth: the notch where the rafter sits on the wall plate: a level seat cut and a plumb heel cut.
- Tail: the part that extends past the wall to form the overhang (eave).
Tips
- Cut one pattern rafter, test-fit it at both ends of the building, then use it to mark the rest.
- Check the walls are parallel: measure the span at each end, since out-of-square walls change rafter lengths.
- Building stairs too? The stair calculator uses the same rise-and-run geometry for stringers.
Geometry only, not a structural design. Rafter size, spacing and connections must meet your local building code. More construction calculators.
Frequently asked questions
How do you calculate rafter length?
Find the run (half the building span, minus half the ridge board), then use the Pythagorean theorem: rafter length = √(run² + rise²), where rise = run × pitch ÷ 12. Equivalently, multiply the run by the slope factor √(1 + (pitch/12)²). For a 12 ft run at 6/12 pitch, that's 12 × 1.118 = 13.42 ft before overhang.
What is roof pitch?
Pitch is the inches of vertical rise for every 12 inches of horizontal run, written like 6/12 ("six in twelve"). A 6/12 roof rises 6 inches per foot and has an angle of about 26.6°; 12/12 is 45°.
Do I subtract the ridge board?
Yes. Rafters stop at the face of the ridge board, so each rafter's run is shortened by half the ridge thickness. For a 1½-inch ridge that's ¾ inch of run, which shortens a 6/12 rafter by about 13/16 inch.
How do I add the overhang?
Multiply the horizontal overhang by the same slope factor and add it to the rafter. A 12-inch overhang on a 6/12 roof adds 12 × 1.118 = 13.4 inches of rafter length.
What angle do I cut the rafter ends?
The plumb cuts at the ridge and tail are at the roof angle (26.6° for 6/12), which you can set on a speed square using its pitch scale. The seat cut of the birdsmouth is level, at 90° to the plumb cut.
How do I calculate a hip or valley rafter?
For a regular hip roof with equal pitches, the hip rafter's run is the common run × √2 (about 1.414), and its rise is the same as the common rafter's. Its length is √(hip run² + rise²). Hip and valley rafters also need extra deductions and side cuts, so check a framing guide.
What size lumber do I need for rafters?
That depends on span, spacing, wood species and grade, and roof and snow loads. Building codes provide span tables for rafters. This calculator gives the length; check the size with your local code or an engineer.