# Roof Rafter Calculator

Roof rafter calculator finds rafter length, cut angles, birdsmouth depth, and total rafter count for gable and shed roofs. Includes roof rafter length calculator math and plumb/seat cuts.

## What this calculates

This roof rafter calculator sizes every rafter in your frame: total length (ridge to tail), plumb cut angle at the ridge, seat cut angle for the birdsmouth, and total rafter count across the building. It handles gable and shed roofs, accounts for ridge board thickness, and outputs the birdsmouth depth so you can mark each rafter with a framing square.

## Inputs

- **Roof Type** — options: Gable roof (two sides), Shed roof (single slope)
- **Building Span** (ft) — min 4, max 60 — Full wall-to-wall width. For a shed, this is the full run.
- **Building Length** (ft) — min 4, max 100 — Perpendicular to span; used to count total rafters.
- **Roof Pitch** (:12) — min 0.5, max 18 — Rise per 12 units of run. A 6:12 pitch is standard residential.
- **Eave Overhang** (in) — min 0, max 48 — Typical: 12-24 inches horizontal overhang.
- **Ridge Board Thickness** (in) — min 0, max 3 — Standard 2x ridge = 1.5 in. Use 0 for shed roofs without ridge.
- **Rafter Spacing** — options: 12 in on-center, 16 in on-center (standard), 19.2 in on-center, 24 in on-center
- **Birdsmouth Seat Depth** (in) — min 0, max 6 — Seat bearing length on the top plate. 3.5 in for a 2x4 plate.

## Outputs

- **Rafter Run** (ft)
- **Rafter Rise** (ft)
- **Common Rafter Length** (ft) — Ridge to wall plate (before overhang).
- **Total Rafter Length (with overhang)** (ft) — Order this length of lumber for each rafter.
- **Total Length (ft / in)** — formatted as text
- **Plumb Cut Angle** (°) — Cut at ridge and tail.
- **Seat Cut Angle** (°) — Cut on bottom of birdsmouth (sits flat on top plate).
- **Total Rafters Needed** — Both sides of gable, or single side for shed.
- **Birdsmouth Plumb Depth** (in) — Vertical depth of birdsmouth notch from top of rafter.

## Details

## How the Roof Rafter Calculator Works

For any rafter, the layout is a right triangle:

- **Run** = horizontal distance from the wall plate to the ridge (half the span on a gable, full span on a shed, minus half the ridge board thickness)
- **Rise** = vertical distance from the wall plate to the ridge
- **Rafter length** = square root of (run squared + rise squared)

The roof pitch connects run and rise: **rise = run x (pitch / 12)**. A 6:12 pitch means 6 inches of rise per 12 inches of run.

## Roof Rafter Length Calculator Example

For a 24-foot-wide building with a 6:12 pitch and 1.5 in (2x) ridge board:

- Run = 24/2 - 1.5/24 = 11.9375 ft
- Rise = 11.9375 x (6/12) = 5.97 ft
- Common rafter length = sqrt(11.9375^2 + 5.97^2) = 13.34 ft
- With 12 in overhang (1 ft): overhang rafter = sqrt(1 + 0.25) = 1.118 ft
- Total rafter length = 13.34 + 1.118 = 14.46 ft per rafter

You'd order 16 ft lumber to have waste margin.

## Shed Roof Rafter Calculator

A shed roof rafter calculator uses the same math but with the full building span as the run (no ridge, slope goes from low wall to high wall). For a 12 ft wide shed at 4:12 pitch:

- Run = 12 ft
- Rise = 12 x (4/12) = 4 ft
- Common rafter = sqrt(144 + 16) = 12.65 ft
- Add 12 in overhang on low end = 13.77 ft total

## Roof Rafter Calculator with Birdsmouth

The birdsmouth is the L-shaped notch at the bottom of the rafter that sits on the top plate of the wall. It has two cuts:

- **Seat cut** (horizontal): bearing surface that sits flat on the wall plate. Minimum 1.5 in for a 2x4 plate, 3.5 in is standard, 5.5 in for a 2x6 plate.
- **Plumb cut** (vertical): back of the notch that faces inward. Depth = seat length x (pitch / 12). For 3.5 in seat at 6:12 pitch: 3.5 x 0.5 = 1.75 in plumb depth.

IRC code requires you leave at least 2/3 of the rafter depth uncut above the birdsmouth. For a 2x8 rafter (7.25 in actual depth), max birdsmouth depth is 7.25 - (7.25 * 2/3) = 2.42 in.

## Plumb Cut and Seat Cut Angles

- **Plumb cut angle** (at the ridge and tail) = arctan(pitch / 12)
- **Seat cut angle** = 90 minus plumb cut angle

For common pitches:

| Pitch | Plumb Cut | Seat Cut |
|-------|-----------|----------|
| 3:12 | 14.0 deg | 76.0 deg |
| 4:12 | 18.4 deg | 71.6 deg |
| 6:12 | 26.6 deg | 63.4 deg |
| 8:12 | 33.7 deg | 56.3 deg |
| 10:12 | 39.8 deg | 50.2 deg |
| 12:12 | 45.0 deg | 45.0 deg |

## Roof Rafter Calculator App - What to Use

Several free roof rafter calculator app options exist for phones (Ridgid, Construction Master Pro). They give similar outputs to this calculator. For quick field math, a Speed Square (combination rafter square) with the pitch scribed gives plumb and seat cuts without any app at all. Set the Speed Square to the pitch, slide along a board, mark the cut line.

## How Many Rafters Do You Need?

Count = (building length in inches / spacing in inches) + 1, times two for gable (both sides).

For a 40 ft long building at 16 in on-center:

- 40 x 12 / 16 = 30 spaces
- 30 + 1 = 31 rafters per side
- Gable roof: 31 x 2 = 62 rafters total
- Add 2-3 extras for waste and swap pieces

## Rafter Sizing Tables (Span Limits)

Maximum rafter spans at 16 in on-center, live load 30 psf, SPF grade #2:

| Rafter | 3:12-6:12 | 7:12-12:12 |
|--------|-----------|------------|
| 2x6 | 13 ft 2 in | 14 ft 4 in |
| 2x8 | 17 ft 5 in | 18 ft 11 in |
| 2x10 | 22 ft 2 in | 24 ft 1 in |
| 2x12 | 26 ft 0 in | 28 ft 4 in |

Always verify with your local code and a span calculator before buying lumber. Snow loads in cold climates require larger rafters.

## Frequently Asked Questions

**Q: How does a roof rafter calculator work?**

A: A roof rafter calculator uses the Pythagorean theorem on the right triangle formed by the rafter, the run (half the building span), and the rise (run times pitch/12). Total rafter length = sqrt(run^2 + rise^2) plus the overhang rafter length. The calculator also outputs plumb cut angle (arctan of pitch/12) and seat cut angle (90 minus plumb cut).

**Q: What does a roof rafter length calculator need as input?**

A: A roof rafter length calculator needs building span (wall-to-wall width), roof pitch (rise per 12 in of run, like 4:12 or 6:12), eave overhang (12-24 in typical), and ridge board thickness (1.5 in for a standard 2x ridge). With these four inputs, you get total rafter length, plumb and seat cut angles, and rafter count when building length is added.

**Q: How is a shed roof rafter calculator different?**

A: A shed roof rafter calculator uses the full span as the run (no ridge on a shed, slope goes from low wall to high wall) instead of half the span. Other math is the same: rafter length = sqrt(run^2 + rise^2), plumb cut angle = arctan(pitch/12). Shed rafters often have overhang on both the high and low ends, so add both to get order length.

**Q: How do I use a roof rafter calculator with birdsmouth?**

A: Enter the birdsmouth seat depth (3.5 in is standard for a 2x4 top plate, 5.5 in for a 2x6). The roof rafter calculator with birdsmouth output shows the plumb depth of the notch, which is seat depth times (pitch/12). For a 3.5 in seat at 6:12, plumb depth is 1.75 in. IRC code limits birdsmouth cut to 2/3 of rafter depth max.

**Q: Is there a good roof rafter calculator app?**

A: Popular roof rafter calculator app options include Construction Master Pro ($25), Ridgid Rafter Calculator (free), and Roof Framing Geometry (free). All give similar outputs to this web calculator. For in-field quick math without an app, use a Speed Square with the pitch scribed into it; set pitch, slide along rafter, mark plumb or seat cut.

**Q: How many rafters do I need for a 24x40 building?**

A: For 24 ft span, 40 ft long building with 16 in on-center rafter spacing: 40 ft / 16 in = 30 spaces, 31 rafters per side, 62 total rafters for a gable roof. Add 2-3 extras for waste and swap-outs. Order lumber at least 1 ft longer than the calculated rafter length to allow for cut marks and squaring.

---

Source: https://vastcalc.com/calculators/construction/roof-rafter
Category: Construction
Last updated: 2026-04-08
