· Timber & Framing
How to Calculate Rafter Length from Span and Pitch
How to calculate rafter length from span and pitch: the formula, a worked example in metric with imperial equivalents, how the ridge and eaves overhang change the cut length, and the mistakes that most often leave rafters short.
A roof spanning 8.0 m (26.2 ft) at a 35° pitch needs common rafters 5.35 m (17.5 ft) long once a 400 mm (15.7 in) eaves overhang is included. Knowing how to calculate rafter length from span and pitch takes one right-angled triangle and a cosine, and a rafter length calculator does the arithmetic and gives the cut angles too.
What is rafter length?
Rafter length is the distance along the slope of a roof from the ridge down to the end of the rafter at the eaves. It is a sloping length, longer than the horizontal distance it covers, and it is the figure you cut timber to. A common rafter is the plain sloping member that runs from the ridge to the wall, as opposed to the hip, valley and jack rafters of a more complex roof.
Terms vary. The wall plate in the UK, Ireland, Australia, New Zealand and South Africa is the top plate in North America, and the notch where a rafter sits on it is a birdsmouth in the UK and a bird's mouth, seat cut or heel cut in the US.
Why rafter length matters
Knowing how to calculate rafter length matters because a roof is dozens of identical pieces cut from one measurement, so a small error repeats everywhere. A rafter cut long can be trimmed. One cut short is scrap.
Length also ties into design. Span tables size rafters from the span, and some measure it horizontally while others measure along the slope, so read each table's definition. Pitch matters for the covering as well, because every covering from tiles to sheeting has a minimum pitch.
How to calculate rafter length
Half the span is the horizontal run, and the rise is the height the roof gains over that run. The rafter is the sloping side of the right-angled triangle they form, so its length is the run divided by the cosine of the pitch. That gives the line length, measured from the centreline of the ridge to the outer face of the wall plate.
Two adjustments turn the line length into the length to cut. Rafters meet on either side of a ridge board, so half its thickness is deducted from each. The eaves overhang, measured horizontally, is lengthened by the same slope factor and added on.
Run = span / 2
Rise = run x tan(pitch)
Line length = run / cos(pitch) = sqrt(run^2 + rise^2)
Ridge deduction = (ridge thickness / 2) / cos(pitch)
Overhang along slope = horizontal overhang / cos(pitch)
Net rafter length = line length - ridge deduction + overhang along slope
Order length = net rafter length x (1 + wastage)
Where:
- Span = horizontal distance between the outside faces of the wall plates, in m (ft)
- Pitch = angle of the roof from horizontal, in degrees
- Ridge thickness = thickness of the ridge board, in mm (in)
- Horizontal overhang = projection of the rafter beyond the wall plate, in mm (in)
- Wastage = allowance for offcuts and spoiled pieces, a dimensionless fraction
The factor 1 / cos(pitch) is a roof slope multiplier. It is 1.118 at 26.57°, which is a 6 in 12 roof, 1.202 at 33.69° (8 in 12) and 1.414 at 45° (12 in 12). Multiply any horizontal distance on the roof by it to get the length along the slope.
A worked example
This example shows how to calculate rafter length for a plain gable roof. The building has a span of 8.0 m (26.2 ft) between the outside faces of the wall plates and a ridge 10.0 m (32.8 ft) long. The pitch is 35°, the horizontal overhang 400 mm (15.7 in) and the ridge board 38 mm (1.5 in) thick. Rafters are at 400 mm (15.7 in) centres.
- Run: 8.0 / 2 = 4.000 m (13.1 ft)
- Rise: 4.000 x tan 35° = 4.000 x 0.7002 = 2.801 m (9.19 ft)
- Line length: 4.000 / cos 35° = 4.000 / 0.8192 = 4.883 m (16.02 ft)
- Ridge deduction: (0.038 / 2) / 0.8192 = 23 mm (0.91 in)
- Overhang along the slope: 0.400 / 0.8192 = 488 mm (19.2 in)
- Net rafter length: 4.883 - 0.023 + 0.488 = 5.348 m (17.55 ft)
The plumb cut at the ridge is 35° from vertical, and the seat cut on the wall plate is 90° - 35° = 55°.
Now the order. A 10.0 m ridge at 400 mm centres has 10.0 / 0.400 = 25 spaces, so 26 rafters on each slope and 52 in all, or 52 x 5.348 = 278.1 m (912 ft) of timber. A 7.5% wastage allowance on the count gives 52 x 1.075 = 55.9, so order 56. A 5.348 m piece needs a 5.4 m (17.7 ft) stock length, which leaves 52 mm (2 in) of offcut, so 56 pieces come to 302.4 m (992 ft). That is 8.7% over the net length, inside the 5 to 10% range.
How to use the rafter length calculator
The rafter length and set-out calculator takes four inputs: the roof span in m, measured across the outside of the wall plates, the pitch in degrees, the horizontal eaves overhang in mm, and the ridge board thickness in mm. It returns the common rafter length per side, the run, the rise, the line length, the ridge deduction, the overhang along the rafter and the plumb and seat cut angles.
Entering the worked example (8.0 m, 35°, 400 mm, 38 mm) gives 5.35 m (17.55 ft), a 23 mm ridge deduction and a 488 mm overhang along the rafter, with cuts of 35° and 55°. It follows the same steps for how to calculate rafter length as the example. The tool gives one rafter and does not count rafters, add wastage or choose stock lengths, so apply those by hand as above. It also takes the pitch in degrees. If you only have a rise and a run, the roof pitch calculator converts them, so a 2.8 m rise over a 4.0 m run is 35.0°.
Common scenarios
Pitch quoted in degrees
The UK, Ireland, Australia, New Zealand and South Africa usually quote pitch in degrees, so how to calculate rafter length is a direct application of the formula. The same 1 / cos(pitch) factor converts plan area to roof area: an 80 m² (861 sq ft) footprint at 35° is 80 x 1.2208 = 97.7 m² (1,051 sq ft) of slope, which the roof area calculator handles for the covering.
Pitch quoted as rise per 12 inches
US and Canadian drawings give the rise per 12 in of run, so a 6 in 12 roof rises 6 in for every 12 in across. The rafter then measures 13.42 in along the slope for each foot of run, because the square root of 6² + 12² is 13.416. A 12 ft (3.66 m) run is 13.42 ft (4.09 m) of rafter before overhang and ridge. Convert to degrees (26.57°) for a calculator.
Overhang given along the slope
Some drawings give the eaves projection along the rafter and not horizontally. If so, add it directly, because dividing by cos(pitch) again overstates it by about 22% at 35°.
Hips, valleys and trusses
These formulas cover common rafters on a straightforward gable roof. Hip and valley rafters run diagonally, are longer and have compound cuts, and trusses are engineered components whose lengths come from the truss drawing.
Common mistakes
- Measuring span along the slope: the formula wants the horizontal span between wall plates, not a tape run up the roof.
- Using the full span: each rafter covers half of it.
- Dropping the slope factor from the overhang: a 400 mm horizontal overhang is 488 mm along a 35° rafter, a difference of 88 mm on every rafter.
- Forgetting the ridge deduction: skipping it leaves each rafter about 23 mm long here and pushes the ridge apart.
- Entering a ratio as degrees: typing 6 for a 6 in 12 roof gives a 6° pitch, not 26.57°, and a rafter about 10% too short.
Sources and methodology
The method for how to calculate rafter length is right-angled trigonometry applied to the dimensions entered, so no national table is involved. Sizing the rafter section is a separate design task.
- Eurocode 5 (EN 1995-1-1), design of timber structures, the European standard for timber roof members, adapted by national annexes
- Wood Handbook: Wood as an Engineering Material, from the US Forest Products Laboratory, an engineering reference on timber properties
National codes are examples only: Approved Document A in the UK, the International Residential Code in the US, AS 1684 in Australia and NZS 3604 in New Zealand. Rafter sizes, spans, notch limits and fixings come from whichever applies where the work is carried out.
Putting it together
How to calculate rafter length comes down to one right-angled triangle. Half the span is the run, the pitch sets the rise, and dividing the run by the cosine gives the sloping line. The ridge deduction and the overhang then adjust that line to the piece you actually cut, and the overhang only works once it has been scaled by the same slope factor.
In the example, an 8.0 m span at 35° gave a 5.348 m rafter, 52 of them for the roof and 56 once the allowance is added. Work the geometry once by hand, then use the calculator for rafter length to confirm it, and check the stock length against what the yard carries before you order.
Frequently asked questions
How to calculate rafter length from span and pitch?
Halve the span to get the horizontal run, then divide the run by the cosine of the pitch. That gives the line length from the ridge to the wall plate. For an 8.0 m (26.2 ft) span at 35°, the run is 4.000 m (13.1 ft) and the line length is 4.000 / 0.8192 = 4.883 m (16.02 ft). Deduct half the ridge board thickness along the slope and add the overhang, also divided by the cosine, to get the length to cut. An equivalent route is the square root of run squared plus rise squared, where rise is the run times the tangent of the pitch.
Is the overhang added before or after the slope factor?
Add it after you convert it, if it is measured horizontally. An eaves overhang is usually the horizontal projection beyond the wall plate, so its length along the rafter is the overhang divided by the cosine of the pitch. At 35°, 400 mm (15.7 in) of horizontal overhang becomes 488 mm (19.2 in) of rafter. If a drawing gives the tail length along the slope, add it as it is. Mixing the two conventions is a common reason for rafters that finish short at the eaves, so check which one your drawing uses before cutting.
What is the rafter length for a 6 in 12 pitch?
A 6 in 12 roof is 26.57° and its slope factor is 1.118, so the rafter measures 13.42 in along the slope for every 12 in of run, or 13.42 ft per 12 ft (3.66 m) of run. For a 24 ft (7.3 m) span, the run is 12 ft (3.66 m), the rise is 6 ft (1.83 m) and the line length is 13.42 ft (4.09 m). Add the overhang, scaled by 1.118, and deduct half the ridge board thickness, scaled the same way, to get the cut length. Rounding up to the next stock length gives the length to order.
How much extra should I order for rafters?
As a rule of thumb, allow 5 to 10% on the rafter count for spoiled pieces and offcuts, then round each piece up to a stock length. In the worked example a 5.348 m (17.55 ft) rafter needs a 5.4 m (17.7 ft) length, leaving 52 mm (2 in) of offcut, so 56 pieces at 5.4 m come to 302.4 m (992 ft) against 278.1 m (912 ft) of net length. Stock lengths vary by supplier and country, so confirm what is sold locally. Hips, valleys, collar ties and extra rafters at openings are additional and come from the roof plan.