The formula, your substituted values, and the evaluated result are shown below.
This is a planning estimate. Confirm dimensions, allowances, material specifications, applicable codes, and supplier requirements before purchasing or construction.
Recommended resources
Products that may help
Recommended
Udemy Education
Udemy is an AI-powered skills acceleration platform transforming how companies and individuals across the world build the capabilities needed to thrive in a rapidly evolving workplace.
View offerAffiliate link — we may earn a commission at no extra cost to you.
How the Rafter Length Calculator works
Calculate rafter length using the Pythagorean theorem.
Before using the result
This is a planning estimate. Confirm dimensions, allowances, material specifications, applicable codes, and supplier requirements before purchasing or construction.
Calculate rafter length using the Pythagorean theorem.
Calculator guide
How the rafter length calculator works
A rafter is the hypotenuse of a right-angled triangle formed by the roof's horizontal run and vertical rise. The calculator uses Pythagoras' theorem:
Rafter length = √(run² + rise²)
Rise and run must be in the same unit, and the answer comes out in that unit. The run is measured horizontally, normally from the outside of the wall plate to the centre of the ridge.
Worked example: a 7.2 m span gable roof
Half the span gives the run: 7.2 ÷ 2 = 3.6 m
Rise to ridge: 1.5 m (a pitch of about 22.6°)
Rafter length: √(3.6² + 1.5²) = √15.21 = 3.9 m
Add the overhang and the ridge deduction
Eave overhang: a 450 mm horizontal overhang adds 0.45 × (3.9 ÷ 3.6) = 0.49 m along the slope.
Ridge board: strictly, deduct half the ridge thickness from the run. For a 45 mm ridge board, that is about 23 mm of run.
Total: roughly 3.9 + 0.49 ≈ 4.39 m, so you'd order 4.5 m lengths (timber is usually sold in 0.3 m steps).
Framing notes
Rafter size and spacing depend on span, roof load (tiles are much heavier than sheet metal), wind zone and timber grade. In Australia, these come from AS 1684 span tables or your truss or frame designer. Don't size rafters from length alone. Most new houses use prefabricated trusses, so check your plans before cutting rafters.
Common mistakes
Using the full span instead of half the span as the run.
Mixing units, such as rise in millimetres and run in metres.
Forgetting the overhang, then ending up with rafters too short at the eaves.
How do I work out rafter length without the rise?
If you know the pitch, rise = run × tan(pitch). A 3.6 m run at 22.5° has a rise of about 1.49 m.
What is the difference between run and span?
Span is the full width between the outer walls. Run is the horizontal distance one rafter covers, usually half the span.
What timber size do I need for rafters?
It depends on span, spacing, roof weight and wind loads. Use your local span tables (AS 1684 in Australia) or ask an engineer.