Home › Home & Construction › Rafter Calculator

Rafter Calculator

Use this free rafter calculator to work out the length of a common rafter, the height of the ridge, and where the birdsmouth cut goes. Enter the building span, the roof pitch as rise over a 12-inch run, the overhang length, the building length, and the rafter spacing, and the calculator gives you the rafter length with and without the overhang, the ridge height above the wall plate, the birdsmouth position measured down the rafter from the ridge, and the total number of rafters for the whole roof.

14.53 ft rafter length
13.42 ft before overhang + 1.12 ft overhang. Ridge height 6.00 ft. Birdsmouth 13.42 ft down the rafter from the ridge. 46 rafters total (23 per side).

How it works

A common rafter runs from the ridge board at the top of the roof down to the wall plate, and its length comes from a right triangle. The horizontal leg of the triangle is the run, the vertical leg is the rise, and the rafter itself is the hypotenuse. The calculator uses the Pythagorean theorem: rafter length equals the square root of the run squared plus the rise squared. That is the whole secret of rafter math — every other number on the roof hangs off that one triangle.

The run is half the building span, measured from the outside of the wall to the center of the ridge. A 24-foot span gives a 12-foot run. The rise comes from the pitch: pitch is written as rise over a 12-inch run, so a 6/12 pitch rises 6 inches for every 12 inches of run. For a 12-foot run, the rise is 12 feet times 6 divided by 12, which is 6 feet. The ridge height is exactly that rise — the height of the ridge above the top of the wall plate.

Run = span ÷ 2  |  Rise = run × pitch ÷ 12  |  Rafter = √(run² + rise²)

The overhang, or eave, extends the rafter past the wall. The overhang adds a second small triangle with the same pitch, so the extra rafter length is the overhang times the square root of one plus the pitch ratio squared. With a 6/12 pitch and a 1-foot overhang, that adds about 1.12 feet. The calculator shows the rafter length both ways — before the overhang, which is the number framers use to lay out the birdsmouth, and the total length including the overhang, which is the length of lumber to cut.

The birdsmouth is the notch where the rafter sits on the wall plate. Its position is measured along the rafter from the ridge plumb cut: it sits exactly one rafter-length-minus-overhang down the rafter, because the wall is at the end of the run. In the worked example below, the birdsmouth is 13.42 feet down the rafter from the ridge. The seat cut of the birdsmouth rests flat on the top of the wall plate, and the heel cut sits against the outside face of the plate. Cutting the birdsmouth too deep weakens the rafter, so the seat cut should never be deeper than about one-third of the rafter depth.

The rafter count comes from the building length and the spacing. Divide the building length in inches by the spacing, round down, and add one for the rafter at the far gable end — that gives the number of rafter positions along one side, and doubling it gives the total for both sides. A 30-foot building at 16 inches on center has 23 positions per side, or 46 rafters in total. That count covers common rafters only; gable-end studs, valley rafters, hip rafters, and jack rafters on a hip roof are extra.

Pitch changes everything about the roof. A low pitch like 4/12 is easy to walk on and uses shorter rafters, but it sheds rain and snow slowly and needs careful flashing. A steep pitch like 12/12 sheds weather fast and gives headroom for a loft, but it uses much longer rafters and is harder and slower to frame and roof. The calculator accepts any pitch, so you can compare a shallow and a steep roof on the same span before deciding.

Keep in mind that these are framing layout numbers, and real lumber needs a little more. Add a small amount for the ridge plumb cut and the tail cut at the eave, and buy rafters in the next standard length up — lumber comes in 2-foot increments, so a 14.53-foot rafter needs a 16-foot board. Always check local building codes for rafter size, spacing, and snow load before cutting, because span tables limit how far a given size of lumber can reach at a given spacing.

Worked example

A gable roof covers a building with a 24-foot span, a 6/12 pitch, a 1-foot overhang, a 30-foot building length, and rafters spaced 16 inches on center.

Step 1: Find the run — 24 ÷ 2 = 12 feet.
Step 2: Find the rise — 12 × 6 ÷ 12 = 6 feet, so the ridge sits 6 feet above the wall plate.
Step 3: Find the rafter length before the overhang — √(12² + 6²) = √180 = 13.42 feet.
Step 4: Add the overhang — 1 × √(1 + (6 ÷ 12)²) = 1.12 feet, so the total rafter length is 13.42 + 1.12 = 14.53 feet.
Step 5: Find the birdsmouth — 13.42 feet down the rafter from the ridge.
Step 6: Count the rafters — (30 × 12) ÷ 16 = 22.5, rounded down to 22, plus 1 = 23 per side, or 46 rafters total.

Each common rafter is 14.53 feet long including the overhang, the ridge is 6 feet above the plates, and the job needs 46 rafters. In lumber terms, that means 46 sixteen-foot boards, since 14-foot boards would be too short.

FAQ

What is the difference between span and run?

Span is the full width of the building from one outside wall to the other. Run is half the span: the horizontal distance from the outside of the wall to the center of the ridge. A 24-foot span has a 12-foot run, and the rafter length is worked out from the run, not the span.

What is a birdsmouth cut?

The birdsmouth is the notch cut into the underside of a rafter where it sits on top of the wall plate. It has a level seat cut that rests flat on the plate and a vertical heel cut against the outside of the plate. It locks the rafter in place and transfers the roof load straight down into the wall.

How far apart should rafters be spaced?

Common rafter spacing is 16 inches or 24 inches on center. Sixteen-inch spacing is stronger and is standard for most homes, while 24-inch spacing is used on lighter roofs and outbuildings. Wider spacing needs thicker rafters or a stronger roof covering to avoid sagging.

How do I measure roof pitch?

Roof pitch is written as the rise over a 12-inch run. Hold a level flat against the roof, measure 12 inches along the level, and measure straight down from that point to the roof surface. If the drop is 6 inches, the pitch is 6 over 12. Steeper roofs shed snow and rain faster but need longer rafters.