Rafter Length Calculator
The length of a common rafter from wall to ridge and out to the tail…
The length of a common rafter from wall to ridge and out to the tail, with the plumb cut, the birdsmouth seat and how many rafters the roof takes.
Pitch
Rafter
More options1½ in ridge board · 3½ in plate · 16 in on centre
Rafter spacing, on centre
ExampleEach rafter
14 ft 5 9/16 in
13 ft 4 3/16 in from the wall to the ridge plus a 1 ft 1 7/16 in tail: 62 2×8 rafters, 16 ft each.
Enter yours to see your result.
- Plumb cut
- 26.6°, square on 6
- Height above plate
- 6⅜ in
- Rafter top at the ridge line
- 6 ft 6⅜ in up
An estimate of materials to buy, not engineering or code advice. Check sizes with your supplier and local building department. Terms
My shopping list
Add each part of a job and print one list. It stays on this device.
How this works: 2 sources,
How this works
Method
A common rafter runs from the wall plate to the ridge at the roof’s pitch. Its run is half the span, measured from the outside of the wall, less half the ridge board’s thickness, since each rafter stops at the face of the ridge. Multiply the run by the slope factor, √(1 + (pitch ÷ 12)²), and you have the rafter’s length along its measuring line, from the outside corner of the birdsmouth to the plumb cut at the ridge. The overhang, measured level past the wall, gets the same factor for the tail. Full method
Sources
- Voluntary Product Standard PS 20-25, American Softwood Lumber Standard (dressed sizes, standard lengths) (National Institute of Standards and Technology, 2025)
- 2025 California Residential Code, Section R905 Requirements for roof coverings (the IRC’s section numbers) (California Building Standards Commission, 2025)
How it’s tested
3 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.
Limits
An estimate of materials to buy, not engineering or code advice. Check sizes with your supplier and local building department.
Privacy
On your device. Nothing you enter or open leaves this browser. About privacy labels
Changes
- First published: roof pitch from a rise, a span or an angle, drawn as a gable you can drag, with rafter length, pitch to degrees and hip rafter pages.
How the rafter length is worked out
A common rafter runs from the wall plate to the ridge at the roof’s pitch. Its run is half the span, measured from the outside of the wall, less half the ridge board’s thickness, since each rafter stops at the face of the ridge. Multiply the run by the slope factor, √(1 + (pitch ÷ 12)²), and you have the rafter’s length along its measuring line, from the outside corner of the birdsmouth to the plumb cut at the ridge. The overhang, measured level past the wall, gets the same factor for the tail.
A worked example: a 30 ft garage at 8/12 with 16 in overhangs, a 1½ in ridge and 2×10 rafters on 2×6 walls. The run is 180 − 0.75 = 179.25 in; × 1.202 = 17 ft 11 7/16 in to the ridge, plus a 1 ft 7¼ in tail, 19 ft 6 11/16 in in all, so 22 ft boards. The birdsmouth seat is the plate’s 5½ in, its heel drops 3 11/16 in, and 7 7/16 in of rafter stays above the plate.
The plumb cuts at the ridge and the tail are both at the roof angle from square: set a speed square’s pivot on the edge and swing it to the pitch on the common scale, or set a miter saw to the angle in degrees. Rafters are counted one per spacing along the roof plus one at the end, for both sides. This is the geometry; the rafter size for your span and loads comes from the span tables your building department uses.
rafter = (span ÷ 2 − ridge ÷ 2 + overhang) × √(1 + (pitch ÷ 12)²)
- Dimension lumber is named by its nominal size but dressed smaller: a 2×8 rafter is 1½ × 7¼ in, a 2×10 1½ × 9¼ in and a 2×12 1½ × 11¼ in, dry. Source: Voluntary Product Standard PS 20-25, American Softwood Lumber Standard (dressed sizes, standard lengths).
A quick check
Take the run in feet and multiply by the slope factor: 1.054 at 4/12, 1.118 at 6/12, 1.202 at 8/12, 1.414 at 12/12. A 12 ft run at 6/12 is about 13.4 ft of rafter before the tail.
Common rafter lengths by span and pitch
Including a 12 in level overhang, less half a 1½ in ridge board.
| Span | 4/12 | 6/12 | 8/12 | 12/12 |
|---|---|---|---|---|
| 12 ft | 7 ft 3¾ in | 7 ft 9 1/16 in | 8 ft 4 1/16 in | 9 ft 9¾ in |
| 16 ft | 9 ft 5 1/16 in | 9 ft 11 15/16 in | 10 ft 8⅞ in | 12 ft 7 11/16 in |
| 20 ft | 11 ft 6⅜ in | 12 ft 2¾ in | 13 ft 1¾ in | 15 ft 5⅝ in |
| 24 ft | 13 ft 7⅝ in | 14 ft 5 9/16 in | 15 ft 6 9/16 in | 18 ft 3 9/16 in |
| 28 ft | 15 ft 8 15/16 in | 16 ft 8 7/16 in | 17 ft 11 7/16 in | 21 ft 1½ in |
| 32 ft | 17 ft 10¼ in | 18 ft 11¼ in | 20 ft 4¼ in | 23 ft 11 7/16 in |
| 36 ft | 19 ft 11 9/16 in | 21 ft 2 1/16 in | 22 ft 9⅛ in | 26 ft 9⅜ in |
Sources
The geometry is exact trigonometry. Code minimum slopes are informational: the roofing maker’s instructions and the code your town adopts decide.
Common questions
How do you calculate rafter length?
Halve the span, take off half the ridge board, and multiply by the slope factor √(1 + (pitch ÷ 12)²). Add the overhang times the same factor for the tail. A 24 ft span at 6/12 with a 12 in overhang is about 14 ft 5½ in.
What is a birdsmouth cut?
The notch that lets a rafter sit on the wall plate: a level seat cut as long as the plate is wide and a plumb heel cut at the outside of the wall. The wood above the seat, the height above plate, stays the same on every rafter so the roof plane is flat.
How many rafters do I need?
The roof’s length divided by the spacing, plus one, for each side. A 40 ft roof at 16 in on centre takes 31 a side, 62 in all; gable-end overhangs and openings change the count.
What angle is the plumb cut on a rafter?
The roof’s angle from square: 26.57° for a 6/12 roof, 33.69° for 8/12. With a speed square, pivot it on the rafter’s edge until the pitch number on the common scale lines up.