About the Rafter Length Calculator
Rafters are the sloping timbers that carry a pitched roof. On a simple gable roof every common rafter is the same: it sits on the wall plate at one end, runs up to the ridge board at the other, and usually continues past the wall to form the overhang at the eaves. Getting their length right is the first step in framing a roof — and a mistake is repeated on every rafter.
The length depends on the building's span, the roof's pitch, the overhang, and one detail that is easy to forget: the ridge board. The rafters butt against its faces, not its centre line, so each one is a little shorter than half the span alone suggests.
This rafter length calculator works out the length along the rafter from the ridge to the tail, the standard stock length to buy, the angle for the plumb cuts and how high the ridge will sit.
How to Use the Rafter Length Calculator
Choose imperial or metric.
Enter the building's span — outside of wall to outside of wall.
Enter the pitch, as rise in 12 or in degrees. The roof pitch calculator can convert a measurement.
Enter the overhang, measured horizontally from the outside of the wall to the end of the rafter tail.
Enter the ridge board thickness: 1½ in (38 mm) is typical for a 2× ridge.
How the Rafter Is Worked Out
run = span ÷ 2 − ridge thickness ÷ 2
pitch factor = √(1 + (rise ÷ 12)²)
main length = run × pitch factor
overhang = overhang × pitch factor
rafter = main length + overhang
Step-by-Step Example
A 24 ft span, 6 in 12 pitch, 1 ft overhang, 1½ in ridge board.
Run: 12 ft − ¾ in = 11.9375 ft
Pitch factor: √(1 + (6 ÷ 12)²) = 1.1180
Main length: 11.9375 × 1.1180 = 13.35 ft
Overhang: 1 × 1.1180 = 1.12 ft
Rafter: 13.35 + 1.12 = 14.46 ft (14 ft 5½ in)
Buy: 16 ft lengths
The ridge sits 6 ft above the wall plate at the centre line, and the plumb cut is at 26.6°. In metric, a 7.2 m span at 35° with a 300 mm overhang and 38 mm ridge gives rafters of 4.738 m, cut from 4.8 m stock.
Where the Length Is Measured
Rafter lengths are traditionally measured along a measuring line — the top edge of the rafter on a line running from the outside face of the wall to the face of the ridge. The birdsmouth seat cut at the wall plate is cut into the underside of the rafter, so the depth of the rafter and the size of the birdsmouth affect how high the finished roof sits but not this length.
The Cuts on a Common Rafter
Plumb cut at the ridge: the top of the rafter is cut so that, once in place, the end is vertical and sits flat against the ridge board. It is marked at the roof angle from the rafter's edge — 26.6° for a 6 in 12 roof — or with a framing square set at 6 and 12.
Birdsmouth at the wall plate: a notch with a horizontal seat cut, which bears on the plate, and a vertical plumb cut against its outside edge. The seat should not remove more than about a third of the rafter's depth.
Tail cut at the eaves: usually a plumb cut, sometimes with a level cut below it, to receive the fascia board.
Choosing Stock Lengths
Rafters are cut from the next standard length above the calculated figure. In North America, lumber comes in 2 ft steps — 8, 10, 12, 14, 16 ft and so on to 24 ft. In the UK and Europe, carcassing timber typically comes in 300 mm steps up to 7.2 m or so. The calculator leaves a little spare for the cuts. Spans needing longer rafters than standard timber use engineered lumber such as LVL, or intermediate supports like purlins.
Sizing and Spacing
This calculator gives the length only. The rafter's size — 2×6, 2×8, 47×150 mm and so on — and its spacing, typically 16 or 24 in (400 or 600 mm), depend on the span, the roof covering's weight, snow and wind loads and the timber grade. They come from span tables in the building code or from a structural engineer, and must be checked before building.
Using a Framing Square
Carpenters traditionally lay out rafters with a framing square rather than a calculator. Holding the square with the rise (6) on the tongue and 12 on the blade against the rafter's edge marks the plumb and level lines, and "stepping off" the square along the board once per foot of run gives the length. The calculator's figure is a check on that layout, and much quicker for unusual pitches or metric work where the square's markings do not help.
Understanding Your Result
Rafter length is the total, along the rafter, from the ridge to the tail.
Main and overhang splits it into the part from wall to ridge and the overhang.
Stock to buy gives the standard length to cut each rafter from.
Cuts and ridge height gives the plumb cut angle and the rise at the centre.
Worth knowing explains the measuring line and pattern rafters.
When Should You Use This Calculator?
Framing a new roof on a shed, garage, extension or house.
Ordering timber, to buy the right lengths.
Checking a design before drawings are finalised.
With the roof pitch calculator, to convert a measured slope.
Common Mistakes
Forgetting the ridge board. Each rafter is half its thickness shorter.
Measuring the overhang along the slope. Enter it horizontally.
Cutting every rafter from the first measurement. Make and test a pattern rafter first.
Over-cutting the birdsmouth. Keep it to a third of the depth.
Choosing rafter size by length alone. Use the span tables.