Nails & Numbers

HomeStructural › Rafter Calculator

Rafter Calculator

IRC R802.4.1: the span is the horizontal projection, not the rafter

There are two lengths in every rafter and the code wants the shorter one. R802.4.1 says rafter spans shall be measured along the horizontal projection, which is the run from the wall to under the ridge, not the timber you cut. On a 12 in 12 roof the rafter is 41% longer than its own span, and reading the table with the wrong one is the most common mistake on the subject.

Rafter geometry

ft
in
in
in
ft

Enter the horizontal run. Everything else is derived, including the length you actually cut.

Specification summary

Generated from on . Reopen that address to reproduce these figures exactly.

Entered

Result

The table wants the horizontal projection, not the rafter

Worked example

A 28 ft wide house, so a 14 ft run each side, at 6 in 12, with a 16 in overhang, rafters at 16 in on centre over a 40 ft length.

  1. The span the table wants. 14 ft, the horizontal run. Not the rafter.
  2. The rafter. 14 × 1.1180 = 15.65 ft, which is 12% longer than the span.
  3. The overhang. 16 in horizontally becomes 1.49 ft along the slope, not 1.33.
  4. Order length. 17.14 ft before any cuts, so 18 ft stock.
  5. At 12 in 12 instead, the rafter is 41% longer than the span. That is a different table row and a different piece of timber.

The percentage is the thing to internalise. It is 12% at 6 in 12 and 41% at 12 in 12, and it is why a rafter cut to the span comes up short every time.

The formula

One factor does all the work, and it is the hypotenuse of the pitch triangle:

f = √(1 + (p/12)²)    rafter = run × f    rise = run × p/12
run
the horizontal projection, ft. This is what R802.4.1 calls the span
p
pitch, rise in 12
f
the slope factor. 1.1180 at 6 in 12, 1.4142 at 12 in 12
overhang
also multiplied by f, because it runs down the slope too

The overhang is where hand takeoffs go wrong twice: once for forgetting the factor, and once for measuring the overhang along the slope in the first place and then multiplying it again.

Two lengths, and the code only wants one of them

A rafter has a length and a span, and they are not the same number. The length is the timber. The span, for the purpose of every rafter table in the IRC, is its horizontal projection: the run from the wall plate to a point under the ridge.

Massachusetts states it in the plainest terms of any reproduction found: rafter spans shall be measured along the horizontal projection of the rafter. The same sentence appears in R802.4.1 in the base code.

The consequence is that the number you tape off a cut rafter is the wrong number to take to the table, and it is wrong in the direction that looks conservative but is not, because you may end up buying a deeper section than the code requires while still having got the load case wrong.

This page therefore asks for the run and derives everything else, including the length you actually cut, so both numbers are visible at once and it is obvious which is which.

This page does not size the rafter

Sizing is Tables R802.4.1(1) through (8), and there are eight of them because the answer depends on roof live load, ground snow load, whether the ceiling is attached to the rafter, species, grade and spacing. Massachusetts and other states amend them outright.

What this page gives you is the input those tables need, which is the horizontal span, plus the geometry to order and cut the timber. Take the span to the table your jurisdiction has adopted, or to the AWC span calculator for species and grades the tables do not cover.

The deflection limit for rafters with no attached ceiling is L/180, which is looser than a floor at L/360, and it is why a rafter that feels bouncy can still be compliant.

The ridge is not always a beam

A ridge board is a nailing surface. It carries no load, and it works because the rafters on each side push against each other and the outward thrust is taken by ceiling joists or rafter ties acting as a tension member across the bottom.

A ridge beam is structural. It carries the rafters, and it needs support at each end down to a foundation. You need one where there is no ceiling joist or rafter tie to take the thrust, which is to say on every cathedral ceiling.

Confusing the two is how walls get pushed out. If you are removing ceiling joists to open up a room, the ridge board becomes a ridge beam and that is a designed member, not a swap.

Hip and valley rafters are longer again

A common rafter runs straight up the slope. A hip or valley rafter runs diagonally, so its run is the diagonal of the plan square, and its slope factor uses 17 rather than 12 as the base: the unit rise per 17 in of diagonal run.

This calculator handles common rafters. For a hip roof, the commons are what you get here and the hips need the 17 factor, which is a different and longer cut with a compound bevel at each end.

The roof area figure above is right for a gable. A hip roof of the same footprint and pitch has the same area, which surprises people, because the triangles you gain at the ends equal the trapezoids you lose from the sides.

Frequently asked questions

How do I measure rafter span for the code tables?
Along the horizontal projection: the run from the wall plate to a point under the ridge, not the length of the rafter. IRC R802.4.1 states this explicitly, and it is the single most common error in reading rafter tables.
How long is a rafter for a 28 foot wide house?
With a 14 ft run at 6 in 12, the rafter is 15.65 ft plus the overhang along the slope, so about 17.14 ft before cuts. The span you take to the table is still 14 ft.
How much longer is a rafter than its span?
It depends entirely on pitch. 4% at 3 in 12, 12% at 6 in 12, 25% at 9 in 12 and 41% at 12 in 12. The multiplier is the square root of one plus the pitch ratio squared.
Does the overhang count in the rafter span?
No. The span is from the wall plate inward. The overhang is a cantilever beyond it and adds to the length you cut, not to the span you look up.
What size rafters do I need?
That is Tables R802.4.1(1) through (8), which vary by roof live load, ground snow, species, grade, spacing and whether the ceiling is attached. Several states amend them. This page gives you the horizontal span those tables need.
What is the difference between a ridge board and a ridge beam?
A ridge board is a nailing surface and carries no load, which works only when ceiling joists or rafter ties take the outward thrust. A ridge beam carries the rafters and must be supported at each end down to a foundation. Cathedral ceilings need a beam.
Why is the rafter deflection limit L/180?
Because a rafter with no ceiling attached is not supporting a finish that cracks. Where a ceiling is attached, the tables tighten it. It is looser than the L/360 used for floors, which is why a compliant rafter can still feel springy.

Check these numbers yourself

How every figure here is verified: Sources & Method. Who builds this: About. Found something wrong? Tell us and it gets fixed or removed.

Figures on this page last checked against the source documents on 2026-09-08. Codes are amended locally; confirm against the edition your jurisdiction enforces.

Related calculators

Geometry, not sizing. This page gives the horizontal span the rafter tables require and the lengths you cut. It does not size the member: that is Tables R802.4.1(1) through (8), which several states amend. Order lengths carry no allowance for birdsmouth, plumb or tail cuts.