How to Calculate Rafter Length: A UK Guide with a Worked Example

    Published 20 July 2026 · Browse all tools

    Working out a rafter length is just a right-angled triangle, and yet it's where more small roofs go wrong than almost any other set-out job. The maths itself is a single line of trigonometry. The mistakes come from what you feed into it: using the span when you meant the run, forgetting the overhang, or cutting to the theoretical slope length and wondering why the rafter sits proud of the wall plate. This guide walks through the calculation in metric, works a real UK example end to end, and flags the part most rafter-length guides don't bother with: turning the length into the right timber.

    If you'd rather skip the hand-calculation, the calculator does the whole thing including overhang and birdsmouth.

    Use the Rafter Length Calculator UK

    The basic formula

    A common rafter is the sloping side of a right-angled triangle. The horizontal side is the run, the vertical side is the rise, and the rafter itself is the hypotenuse. So the whole thing comes down to one of two equivalent formulas.

    If you know the run and the pitch angle: rafter length = run ÷ cos(pitch)

    If you know the run and the rise instead: rafter length = √(run² + rise²)

    Both give the same answer. The first is quicker when you're working from a pitch in degrees, which is how most UK roofs are specified; the second is handy when you already know the rise, for instance from a fixed ridge height.

    The rise itself, if you need it, is rise = run × tan(pitch).

    Takeaway: rafter length is just the hypotenuse — the difficulty is never the trig, it's putting the right numbers in.

    Run versus span — the mistake that ruins the cut

    Here's the error that catches people out more than any other. The run is not the width of the building. On a standard dual-pitch (gable) roof, the run is half the span, because two rafters meet in the middle at the ridge.

    So if your building is 4.8 m wide externally, the span isn't what goes into the formula — the run does, and that's roughly 2.4 m, adjusted slightly for the wall plate positions and half the ridge board thickness. Put the full 4.8 m in by mistake and you'll calculate a rafter nearly twice as long as you need, order double the timber, and only spot it when the delivery looks absurd.

    Measure to the actual set-out points: from the outer face of the wall plate in to the centre line of the ridge. On a tight job you also deduct half the ridge board thickness from the run, because the rafter stops at the side of the ridge, not its centre.

    Takeaway: always halve the span to get the run on a dual-pitch roof, then trim for the ridge — this single step prevents the most expensive rafter mistake there is.

    Worked example — a 4.8 m span extension roof at 30°

    Take a single-storey rear extension in Leeds, 4.8 m wide, with a dual-pitch roof at 30 degrees, a 350 mm eaves overhang, and a 45 mm birdsmouth seat.

    Start with the run: half of 4.8 m is 2.4 m. Ignore the small ridge deduction for this estimate.

    Base rafter length: 2.4 ÷ cos(30°) = 2.4 ÷ 0.866 = 2.77 m.

    Now the overhang. A 350 mm horizontal overhang also runs down the slope, so it adds 0.35 ÷ cos(30°) = 0.40 m. Running total: 3.17 m.

    Now the birdsmouth allowance. The seat cut notches into the rafter at the wall plate, and you want a bit of extra stock length so the timber reaches cleanly. A 45 mm seat at 30 degrees adds roughly 45 ÷ sin(30°) = 90 mm, or 0.09 m. Total estimated stock length: about 3.26 m.

    So each common rafter needs a piece of timber a little over 3.25 m long. In practice you'd order 3.6 m lengths — the next standard size up — giving a bit of trimming room, and you'd cut back to the real length once you'd marked the plumb cut and seat on site. Order exactly 3.26 m and the first miscut leaves you short.

    Takeaway: the number you calculate is the minimum stock length, not the finished rafter — always buy the next stock length up and cut down.

    The overhang and birdsmouth allowances explained

    The base rafter length is only the theoretical slope from wall plate to ridge. Two things extend it in the real world.

    The overhang (the eaves) is the part of the rafter that projects past the wall to form the soffit and fascia line. Because it continues at the same pitch, you convert the horizontal overhang to a sloping length the same way you did the run: divide by cos(pitch). A common mistake is adding the horizontal overhang straight onto the slope length, which under-measures it slightly on steeper roofs.

    The birdsmouth is the small triangular notch cut into the underside of the rafter so it sits flat on the wall plate. It doesn't change the geometry of the roof, but it does mean you want a little extra stock so the timber isn't cut short at the seat. UK carpenters usually keep the birdsmouth seat cut to no more than about a third of the rafter depth, so the remaining timber above the notch still carries the load — over-notch it and you weaken the rafter exactly where it bears.

    Takeaway: convert the overhang down the slope, and keep the birdsmouth seat to a third of the rafter depth or less so you don't weaken the bearing point.

    From length to the right timber (the bit a length calculator won't tell you)

    This is the contrarian point, and it's worth saying plainly: knowing the rafter length tells you nothing about whether the rafter is strong enough. Those are two completely separate questions, and a lot of DIY roofs conflate them.

    Length is pure geometry. Strength depends on the timber's grade, its depth, the rafter spacing, the span, and the roof loading including snow and access. UK structural timber is strength-graded to BS EN 338, with C16 the everyday grade for domestic roof timber and C24 where more strength is needed. The actual size — 47 × 100, 47 × 150, 47 × 175 and so on — comes from the span tables (the ones published under the TRADA/TDA guidance and echoed in Approved Document A), not from the length calculation. A 3.26 m rafter could be 47 × 100 or 47 × 175 depending on the spacing and loading; the length alone tells you nothing about which.

    Travis Perkins and Jewson both stock the common sizes, and they'll point you at the right section if you give them span, spacing, and roofing type. But check the span table first so you know what you're asking for.

    So use a rafter length figure to price timber and check stock lengths, and use the span tables or a structural engineer to decide the section and grade. The calculator gives you the first; it deliberately does not pretend to give you the second.

    Takeaway: rafter length is geometry, rafter size is structure — never let a length calculation talk you into a timber section.

    Frequently Asked Questions

    Ready to use the Rafter Length Calculator UK?