Rafter Length Calculator
For a 24 ft span at a 6/12 pitch with a 2x ridge board and a 12 in. overhang, each common rafter is 14 ft 5-5/8 in long: 13 ft 4-1/8 in from ridge to wall plus a 1 ft 1-3/8 in tail. Buy 16 ft boards and cut the plumb ends at 26.6°. A 40 ft long building at 16 in. on center needs 62 rafters.
Formulas and figures reviewed · How we check our calculators
1 · Project Specifications
Building
A gable rafter runs half the span; a shed rafter runs the full span.
Measured across the rafters, over the top plates.
Used to count rafters. Same unit as the span. Enter 0 to skip.
Roof Slope
Used in Pitch mode. Not sure? Use the roof pitch calculator first.
Used in Angle mode. Common metric roofs are 15°, 22.5°, 30°, 35° and 45°.
Each gable rafter is shortened by half this thickness, measured level.
Overhang & Spacing
Measured horizontally, not along the slope. 12–24 in. (30–60 cm) is typical.
2 · Material Estimates
Example result for the default values. Enter your own measurements and press Calculate.
Estimation Results
Line length plus tail, measured along the top edge of the rafter.
From the ridge plumb cut to the outside of the wall (the birdsmouth heel).
Next standard length with at least 2 in. spare for cuts.
Set a speed square to this angle for the ridge and tail plumb cuts.
Measured from the rafter edge; the seat cut is square to the plumb cut.
Top plate line to ridge center line (add heel height for the actual ridge height).
✓ Recommendations
Mark the plumb cut at 26.6° on a speed square, measure 13 ft 4-1/8 in along the top edge to the heel, then 1 ft 1-3/8 in more for the tail.
Cut one pattern rafter, test it at both ends of the building, then use it to mark the rest.
Notes
Rafter size (2x6, 2x8, 2x10…) depends on span, spacing, species and snow load. Check the IRC rafter span tables (Section R802) or your local code.
Detailed Project Guide & Calculation Methodology
Calculation Formulas & Methodology
Rafter run
Run = Span ÷ 2 − Ridge thickness ÷ 2 (shed roof: Run = Span)The level distance one rafter covers, from the outside of the wall to the face of the ridge board.
Pitch multiplier
Multiplier = √(1 + (Pitch ÷ 12)²)How much longer a sloped line is than its level run. A 6/12 roof has a multiplier of 1.118.
Rafter length
Line length = Run × Multiplier; Tail = Overhang × Multiplier; Total = Line + TailLengths are measured along the top edge of the rafter. Overhang is the level projection past the wall.
Step-by-step
- 124 ft span, 6/12 pitch, 1-1/2 in. ridge: run = 12 ft − 3/4 in. = 11.9375 ft
- 2Line length = 11.9375 × 1.118 = 13.347 ft = 13 ft 4-1/8 in
- 312 in. overhang: tail = 1 × 1.118 = 1 ft 1-3/8 in
- 4Total = 14 ft 5-5/8 in → buy 16 ft boards
Cut angles and rafter count
Plumb cut = arctan(Pitch ÷ 12); Seat cut = 90° − Plumb cut; Rafters per side = ⌊Length ÷ Spacing⌋ + 1A 6/12 roof has a 26.6° plumb cut. A 40 ft building at 16 in. on center needs 31 rafters per side, 62 in total.
How It Works
- 1Pick gable or shed and enter the outside span over the top plates.
- 2Enter the pitch (X in 12) or the roof angle in degrees.
- 3Choose the ridge board thickness and the level eave overhang.
- 4Enter the building length and rafter spacing to count rafters.
- 5Press Calculate, then mark one pattern rafter and test it before cutting the rest.
Rafter length per foot of run by pitch
Multiply the level run in feet by the multiplier to get the rafter length. The table also gives the length per foot of run in inches, which is the number printed on many framing squares, and the plumb cut angle.
| Pitch | Angle / plumb cut | Multiplier | Rafter length per ft of run | Seat cut |
|---|---|---|---|---|
| 3/12 | 14.0° | 1.031 | 12.37 in. | 76.0° |
| 4/12 | 18.4° | 1.054 | 12.65 in. | 71.6° |
| 5/12 | 22.6° | 1.083 | 13.00 in. | 67.4° |
| 6/12 | 26.6° | 1.118 | 13.42 in. | 63.4° |
| 7/12 | 30.3° | 1.158 | 13.89 in. | 59.7° |
| 8/12 | 33.7° | 1.202 | 14.42 in. | 56.3° |
| 9/12 | 36.9° | 1.250 | 15.00 in. | 53.1° |
| 10/12 | 39.8° | 1.302 | 15.62 in. | 50.2° |
| 12/12 | 45.0° | 1.414 | 16.97 in. | 45.0° |
Seat cut angle is measured from the rafter edge. Multiplier = √(1 + (pitch/12)²).
Common rafter lengths for typical spans (6/12 pitch)
These assume a gable roof, a 1-1/2 in. ridge board and a 12 in. level overhang. Lengths are along the top edge, to the nearest 1/8 in.
| Span | Line length | With 12 in. overhang | Board to buy |
|---|---|---|---|
| 12 ft | 6 ft 7-5/8 in | 7 ft 9-1/8 in | 8 ft |
| 16 ft | 8 ft 10-1/2 in | 9 ft 11-7/8 in | 12 ft |
| 20 ft | 11 ft 1-3/8 in | 12 ft 2-3/4 in | 14 ft |
| 24 ft | 13 ft 4-1/8 in | 14 ft 5-5/8 in | 16 ft |
| 28 ft | 15 ft 7 in | 16 ft 8-3/8 in | 18 ft |
| 32 ft | 17 ft 9-7/8 in | 18 ft 11-1/4 in | 20 ft |
Spans of 28 ft and more usually need larger or engineered rafters, purlins or trusses. Check the span tables.
How to lay out a common rafter
- •Snap or pencil a measuring line along the face of the board, set down from the top edge by the heel height you want above the wall.
- •At the top end, mark the ridge plumb cut at the roof angle.
- •Measure the line length along the measuring line and mark a second plumb line: this is the outside face of the wall (heel of the birdsmouth).
- •Mark the seat cut square to that plumb line, as wide as the top plate, keeping the notch no deeper than about one-third of the rafter depth.
- •From the heel plumb line, measure the tail length and mark the tail plumb cut (or a level cut for a soffit).
- •Cut, test-fit at both ends of the wall, adjust if needed, then use it as the pattern for the rest.
Frequently Asked Questions
Find the run (half the span for a gable roof, minus half the ridge board thickness), multiply it by the pitch multiplier √(1 + (pitch ÷ 12)²), then add the overhang times the same multiplier. For a 24 ft span at 6/12 with a 2x ridge and 12 in. overhang: 11.9375 ft × 1.118 = 13 ft 4-1/8 in, plus a 1 ft 1-3/8 in tail = 14 ft 5-5/8 in.
The span is measured to the center of the building, but each rafter stops at the face of the ridge board, not its center line. Taking half the ridge thickness off the level run (3/4 in. for a 1-1/2 in. board) keeps the ridge at the right height. Skipping it makes the ridge sit high and the birdsmouths miss the wall plates.
The plumb cut angle equals the roof angle: 18.4° for 4/12, 22.6° for 5/12, 26.6° for 6/12, 30.3° for 7/12, 33.7° for 8/12, 39.8° for 10/12 and 45° for 12/12. On a speed square you can also pivot to the pitch number on the COMMON scale. The seat cut of the birdsmouth is square (90°) to the plumb cut.
A common carpentry rule is to cut the seat no deeper than about one-third of the rafter's depth, so enough wood remains above the wall to carry the load. The seat should bear fully on the top plate, typically 3-1/2 in. on a 2x4 wall or 5-1/2 in. on a 2x6 wall, unless the seat would get too deep. Check the rafter manufacturer or an engineer for engineered lumber.
Divide the building length in inches by the spacing, round down and add one; that is the count for one side. Double it for a gable roof. A 40 ft building at 16 in. on center needs 480 ÷ 16 + 1 = 31 rafters per side, or 62 in total. At 24 in. on center it needs 21 per side, or 42.
It depends on the rafter's horizontal span, the spacing, the wood species and grade, and the snow and dead load where you live. The IRC rafter span tables in Section R802 list allowed spans; for example, 2x8 rafters often suit spans in the low-to-mid teens of feet at 16 in. on center in light snow areas. Check the table for your exact load and grade, or ask your building department.
Rafter length from this calculator is measured along the top edge (the line through the outside of the wall at the top plate). Builders mark it on a line down the face of the board and measure along that line from the ridge plumb cut to the heel of the birdsmouth. Measuring along the bottom edge gives a shorter number and leads to cutting the rafters short.
Choose Angle mode and enter the slope in degrees, the span in meters and the overhang in centimeters. The multiplier is 1 ÷ cos(angle): 1.035 for 15°, 1.082 for 22.5°, 1.155 for 30°, 1.221 for 35° and 1.414 for 45°. For an 8 m span at 30° with a 45 mm ridge and 40 cm overhang, each rafter is about 5.06 m long.
✓ Pro Tips
- •Crown the boards: sight down each rafter and install with the bow facing up.
- •Measure the actual span at both ends of the building; walls are rarely perfectly parallel.
- •Buy one or two spare boards for test cuts and knots in the wrong place.
- •For metric roofs, use Angle mode and enter the span in meters and overhang in cm.
⚠ Common Mistakes
- •Forgetting the half-ridge deduction, which raises the ridge and opens the birdsmouth joints.
- •Measuring the overhang along the slope instead of level, which makes the tails too long.
- •Measuring rafter length along the bottom edge of the board.
- •Cutting the birdsmouth seat too deep and weakening the rafter at the wall.
Share Your Estimate
Related Calculators
Convert roof pitch between X:12, degrees and percent slope, get the pitch multiplier and rafter length, and check whether the slope is steep enough for asphalt shingles.
roofingCalculate pitched roof surface area, roofing squares, and the number of asphalt shingle bundles required.
roofingEstimate how many roofing nails, coils and boxes you need for asphalt shingles, including starter strip and ridge cap, at 4 or 6 nails per shingle.
roofingDIY Estimation Checklist
- •Measure lengths and heights twice for accuracy.
- •Check product labels for actual coverage rates.
- •Order materials with a 10% buffer for cuts and waste.
- •Account for doors, windows, and obstacles.
- •Compare quotes from at least two suppliers.