Rafter Length Calculator
The run is half the span less half the ridge.
Work out Rafter Length. The run is half the span less half the ridge. Rounds up to whole units, as you have to buy them.
Outside to outside of the wall plates
Rafter length including overhang
4,782 mm
26.57° · 6.00 in 12 · rise 1,989 mm
The run is half the span less half the ridge board thickness, because the rafter stops at the face of the ridge rather than the centreline. Forgetting that shortfall makes every rafter too long by half the ridge thickness — small, consistent, and enough to push the roof out of square. Note also that the overhang measured horizontally becomes a longer distance along the sloping rafter, which is why it is converted rather than simply added.
How the Rafter Length Calculator works
Common rafter length from span and pitch, with the ridge deduction and the overhang converted along the slope. Pitch can be given as a rise in twelve, in degrees or as a percentage — all describe the same triangle.
Also known as: how long should a rafter be · roof pitch to rafter length · common rafter calculator · 6 in 12 pitch rafter length
The ridge deduction
The run is half the span less half the ridge board thickness, because the rafter stops at the face of the ridge rather than its centreline. Forgetting it makes every rafter too long by half the ridge thickness.
That error is small — 22.5 mm on a 45 mm ridge — and it is consistent across every rafter, which is what makes it damaging. A roof cut half a ridge too long pushes the walls out at the plate and never comes square.
The rafter length itself is the hypotenuse: run divided by the cosine of the pitch angle. The rise is run times the tangent. It is straightforward trigonometry, and the ridge deduction is the part that gets missed rather than the geometry.
Overhang runs along the slope
An overhang specified horizontally — 300 mm past the wall — becomes a longer distance measured along the sloping rafter. It has to be divided by the cosine of the pitch before adding, exactly as the run is.
On a shallow roof the difference is small. On a steep one it is substantial: at 45 degrees a 300 mm horizontal overhang is 424 mm of rafter, and cutting to 300 leaves the eaves short by a third.
Overhang size is a design decision with real consequences. Larger overhangs throw water further from the wall and shade windows in summer; they also catch far more wind uplift, which the rafter-to-wall connection has to resist.
Ridge boards, ridge beams and spreading
A ridge board is a spacer that rafters bear against; it carries no significant load. A ridge beam is structural and supports the rafters. Substituting one for the other is a serious structural error and not a matter of terminology.
With a ridge board, the rafters push outwards at the wall plate and something must resist that thrust — collar ties, ceiling joists acting as ties, or a structural tie. Without it the walls spread and the ridge sags.
A birdsmouth is the notch where the rafter sits on the plate, with a seat cut and a plumb cut. Codes typically limit its depth to a third of the rafter, because it removes material from the loaded section at the point of support.
Where to go next
The Rafter Length question rarely arrives on its own. These are the ones that usually come with it:
- Joist Spacing Calculator — Depth beats width — stiffness goes with the cube.
- Attic Ventilation Calculator — Intake must exceed exhaust, not the reverse.
- Plywood Sheet Calculator — Sheets have to break on a support, not where the area ends.
- Ring Size Calculator — Finger measurement to US, UK, EU and Japanese sizes.
Frequently asked questions
How do I calculate rafter length?
The run is half the span less half the ridge thickness. Rafter length is the run divided by the cosine of the pitch angle, which is the hypotenuse of the run-and-rise triangle.
Why subtract half the ridge board?
Because the rafter stops at the face of the ridge, not its centreline. Forgetting it makes every rafter too long by half the ridge thickness — a small, consistent error that pushes the roof out of square.
What does a 6 in 12 pitch mean?
Six units of rise for every twelve of horizontal run, which is 26.57 degrees. The rise-in-twelve notation is standard in North America; degrees and percentages are more common elsewhere.
Does the overhang just add to the length?
Not directly. An overhang measured horizontally becomes a longer distance along the sloping rafter, so it has to be divided by the cosine of the pitch before adding.
What is a birdsmouth cut?
The notch where the rafter sits on the wall plate, with a seat cut and a plumb cut. Codes typically limit its depth to a third of the rafter, because it removes material from the loaded section.
How many rafters do I need?
Divide the roof length by the spacing, add one, and double it for both slopes. Hip and valley rafters are additional and are cut differently.
What roof pitch should I use?
It depends on the covering — some tiles have a minimum pitch below which they leak, and some membranes suit very low pitches. The covering manufacturer's minimum is the binding constraint.
What is a hip rafter?
The rafter running diagonally from corner to ridge on a hipped roof. It is longer than a common rafter and cut at compound angles, and its length uses the diagonal run rather than the plain one.
How do I lay out a birdsmouth?
Mark the plumb cut and the seat cut using the pitch, keeping the notch within about a third of the rafter depth. Cutting deeper removes material from the loaded section and is generally not permitted.
Do I need collar ties?
Usually, to stop the rafters spreading and pushing the walls out. Where they are omitted the roof needs another way to resist that thrust — a ridge beam or a structural ceiling tie.
What is the difference between a ridge board and a ridge beam?
A ridge board is a spacer that rafters bear against; a ridge beam is structural and carries the rafter loads. Substituting one for the other is a serious structural error.
How much overhang should a roof have?
Enough to throw water clear of the wall — 300 to 600 mm is common. Larger overhangs shade walls and windows in summer and catch more wind uplift, which the fixings have to resist.
Put this calculator on your own site
Free to use, on any site, commercial or not. Paste this where you want it to appear. It is a plain iframe, so it works in WordPress, Squarespace, Wix, Webflow, Ghost and anything else that accepts HTML.
<iframe src="https://www.thecalclibrary.com/embed/rafter-length-calculator" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px" loading="lazy" title="Rafter Length Calculator"></iframe>
<p style="font:13px/1.5 system-ui,sans-serif;margin:6px 0 0;color:#64748b">Powered by <a href="https://www.thecalclibrary.com/rafter-length-calculator" style="color:#64748b">Rafter Length Calculator</a> from The Calc Library</p>The only condition is that the credit line below the frame stays in place. That one line is what pays for the tool being free — it is how anyone else finds it.
Related calculators
Joist Spacing Calculator
Depth beats width — stiffness goes with the cube.
OpenAttic Ventilation Calculator
Intake must exceed exhaust, not the reverse.
OpenPlywood Sheet Calculator
Sheets have to break on a support, not where the area ends.
OpenRing Size Calculator
Finger measurement to US, UK, EU and Japanese sizes.
Open