easycalc

Roofing

Rafter Calculator

Enter the building width, overhang and pitch to get the rafter length, rise, slope factor and plumb cut angle.

Rafter length is measured along the top edge from the outside of the wall to the tip, including the overhang.

Enter the width and pitch to see rafter length and cut angle.

What a rafter length actually is

A rafter is the hypotenuse of a right triangle. The run is half the building width, the rise comes from the pitch, and the rafter length is the square root of run squared plus rise squared. A 24 foot wide building has a 12 foot run. At a 6/12 pitch the rise is 6 inches per foot of run, so 6 feet. The rafter length is the square root of 144 plus 36, which is 13.4 feet.

The calculator does the same thing with the slope factor: length = run x slope factor. At 6/12 the factor is 1.118, and 12 x 1.118 = 13.4. Same answer, faster once you know the factors.

Slope factor by pitch

  • 3/12 — 1.031
  • 4/12 — 1.054
  • 5/12 — 1.083
  • 6/12 — 1.118
  • 7/12 — 1.158
  • 8/12 — 1.202
  • 9/12 — 1.250
  • 10/12 — 1.302
  • 12/12 — 1.414

Those factors are worth writing on the saw bench. Multiply the run once and you have every rafter on the roof, regardless of span.

Plumb cut, seat cut and the birdsmouth

The plumb cut at the ridge is set by the pitch: at 6/12 it is 26.6 degrees off vertical, which most framing squares mark as 6 on the common scale and 12 on the hip scale. The same angle appears at the tail, only upside down.

The birdsmouth is two cuts: a horizontal seat cut that sits on the top plate and a vertical plumb cut down the face of the wall. Keep the seat cut to a third of the rafter depth or less — a 2 x 8 rafter gets a seat no deeper than 2-5/8 inches. Over-cut it and the remaining depth at the notch is what carries the roof.

Ridge, overhang and the real order length

The theoretical length stops at the ridge board. Add the ridge half-thickness, then the overhang, then subtract for the plumb cut. On a 2x ridge and a 12 inch overhang that adds roughly 1.5 feet to the 13.4 foot number, so you cut 14.9 and the finished rafter looks like 13.4 over the wall.

Cut one rafter as a pattern, test-fit it, then use it as the template for the rest. Cutting all 20 at once from a calculated number is how a roof ends up an inch and a half out of square.

How many rafters

Rafters are spaced 16 or 24 inches on centre, measured along the wall, on each side of the ridge. A 24 foot long roof at 24 inch spacing needs 13 per side, or 26 total, plus two for the gable ends if the rake overhangs need backing. At 16 inch spacing it is 19 per side.

Add one rafter for every opening — a chimney, a skylight, a dormer — because the opening has to be framed with doubled rafters, not just a gap. Ceiling joists follow the same count and the same spacing, and they matter for the next job: boarding the ceiling needs the same footprint, which is what the drywall calculator wants as input.

Span, depth and when you need an engineer

A 2 x 6 rafter spans about 9 feet 11 inches at 16 inch spacing and a 20 psf roof load; a 2 x 8 about 13 feet, a 2 x 10 about 16 feet. Those are standard tables for a normal snow load. They stop applying when you have heavy tile, deep snow, an open ceiling with no ties, or a rafter run over about 20 feet without a support.

This is the one part of a roofing job where the calculator gives the geometry and not the engineering. It tells you the length to cut, not the depth to buy. Sizing the member is a span table or an engineer, and the difference between the two is a sagging roof.

Squaring and layout

Before any rafter is cut, the walls have to be square: measure both diagonals of the footprint and adjust until they match. A 24 x 36 foot rectangle should read 43.3 feet on both diagonals. Being an inch out at the plates becomes an inch and a half at the ridge and a visible wave in the sheathing.

Mark the rafter positions on the top plate with a tape and a square, not by eye. Every 16 or 24 inches, from the same end, on both walls. The plates and the studs under them are counted in the stud calculator.

From rafters to the roof surface

Once the frame is up, the next calculation is area, and that is where the roofing calculator takes over: it turns the footprint and pitch into roof squares, shingle bundles and underlayment rolls. Ordering shingles before the rafters are up is how people end up with bundles in the driveway and a roof that is still a frame in three weeks.

What this estimate assumes

A simple gable roof, a single pitch across the whole run, 2x lumber and standard spacing. It does not cover hips, valleys, dormers, curved or unequal pitches, or a structural ridge. For anything with a valley, lay out the valley rafter separately — its run is the diagonal of the two runs, not either one.

Last reviewed November 2026. Angles and slope factors are standard framing values; span figures are for a 20 psf roof load and must be checked against local code and snow load.

Related calculators

Back to the roofing calculator — every material list runs in your browser, with no account.

How long is a rafter for a 24 foot wide roof at 7/12?

The run is 12 feet, the slope factor at 7/12 is 1.155, so the rafter is 13 feet 10 inches before you add the overhang: about 15 feet with a 12 inch overhang.

What angle do I cut the rafter at?

For a 7/12 pitch the plumb cut is about 30.3 degrees from vertical. Set the framing square with 7 on the tongue and 12 on the blade and mark the cut.

How do I measure the overhang?

Horizontally, from the outside of the wall to the outer edge of the fascia. It is included in the run, so it adds to the rafter length once the slope factor is applied.

Can this calculator size the rafter?

No. It gives length and angles only. Span depends on wood species, grade, spacing and snow load, so use a span table or an engineer for the size.