Skip to content

Rafter Length Calculator

The run is half the span less half the ridge.

The run is half the span less half the ridge. Common rafter length from span and pitch, with the ridge deduction and the overhang converted along the slope.

Written and maintained by Mohit PatelLast checked August 4, 2026How we build these
mm

Outside to outside of the wall plates

mm
mm
mm
mm

Rafter length including overhang

4,782 mm

26.57° · 6.00 in 12 · rise 1,989 mm

Run (half span less half the ridge)3,977.5 mm
Rise1,988.8 mm
Pitch26.565°
As a ratio6.00 in 12
Rafter, ridge to wall plate4,447 mm
Overhang along the rafter335.4 mm
Total rafter length4,782.4 mm
Rafters for both slopes36

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:

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.

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.

The one-line version
<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