Rafter Calculator

Work out common rafter length from the building span, roof pitch and overhang, with the ridge board deduction, birdsmouth cut and the IRC notch limit checked.

Safety: This finds lengths and cuts, not whether a rafter is strong enough. Size rafters from the IRC span tables (R802.4.1) or an engineer's design for your snow load and spacing, and follow your local building code.

Rafter length to cut —
in 12
Lumber to buy
—
Line length (plate to ridge face)
— in
Tail (overhang) length
— in
Plumb cut angle
— °
Birdsmouth depth (max ¼ depth)
—
Birdsmouth seat × heel
— in
Ridge height above wall plates
— in
Rafters for the building
— rafters
Rafter length to cut diagram

Shopping list

    Quantities are rounded up to whole bags, blocks and pieces. Prices change by region, so add your own to see a total.

    How to use the rafter calculator

    Enter the building's span (outside of one wall to outside of the other), the roof pitch, and how far the eaves overhang the wall, measured level. Choose the rafter size, the ridge board thickness and the wall the rafter sits on. The calculator gives the length of each common rafter, the length of lumber to buy, the plumb cut angle, and a birdsmouth that leaves full bearing on the plate without breaking the code's notch limit.

    The formulas

    run = span ÷ 2 − ridge thickness ÷ 2
    pitch multiplier = √(1 + (pitch ÷ 12)²)
    line length = run × multiplier; tail = overhang × multiplier
    birdsmouth depth (square to the rafter) = seat × sin(angle) ≤ rafter depth ÷ 4

    Worked example: 24 ft span, 6/12 pitch, 12 in overhang, 2 × 8 rafters

    1. Run: 144 − 0.75 = 143.25 in. Multiplier at 6/12: 1.118.
    2. Line length: 143.25 × 1.118 = 160.2 in (13 ft 4⅛ in), measured along the rafter's top edge from the plate line to the ridge face.
    3. Tail: 12 × 1.118 = 13.4 in, so the total is 173.6 in (14 ft 5⅝ in): buy 16 ft 2 × 8s.
    4. Birdsmouth on a 2 × 4 wall: a 3½ in seat makes a 1¾ in heel and a notch 1.57 in deep, under the 1.81 in limit (¼ of 7¼ in).

    Laying out a rafter

    1. Mark the plumb cut at the ridge end with a speed square set to your pitch on the common scale.
    2. Measure the line length along the top edge (or along a line parallel to it) from that cut, and mark the plate line.
    3. Lay out the birdsmouth: a plumb line at the plate line and a level seat cut the width of the wall plate. Keep the notch within ¼ of the rafter depth.
    4. Measure the tail from the plate line and mark the fascia cut.
    5. Test-fit one pair before cutting the rest; buildings are rarely perfectly square.

    Code points that apply to rafters

    • Ridge board: at least 1 in nominal thick and no shallower than the cut end of the rafter (IRC R802.3).
    • Bearing: at least 1½ in on wood or metal, 3 in on masonry or concrete (R802.6).
    • Notches: end notches no deeper than ¼ of the member (R502.8.1 via R802.7.1).
    • Ties: ceiling joists or rafter ties must resist the rafters' outward thrust; a ridge board alone doesn't hold the walls together.
    • Size: rafter size comes from the span tables or an engineer, not from this calculator.

    Questions people ask

    How do you calculate rafter length?

    Find the run (half the building span, minus half the ridge board thickness), multiply by the pitch multiplier √(1 + (pitch ÷ 12)²), and add the overhang measured the same way. For a 24 ft span at 6/12 with a 1½ in ridge board, the run is 143.25 in and the line length 160.2 in; a 12 in overhang adds 13.4 in.

    How deep can a birdsmouth cut be?

    The IRC (R802.7.1, which points to R502.8.1) limits notches at the ends of solid-sawn rafters to one-fourth of the rafter's depth: 1.81 in for a 2×8. The rafter also needs at least 1½ in of bearing on the wall plate (R802.6).

    What angle is the plumb cut?

    The plumb cut is vertical when the rafter is in place, so it's cut at the roof angle measured from the rafter's edge: 26.6° for a 6/12 pitch. On a speed square, use the 'common' scale and pivot to 6.

    Do I subtract the ridge board from rafter length?

    Yes. Each rafter stops at the face of the ridge board, so its horizontal run is shortened by half the ridge thickness (¾ in for a 1½ in board). The IRC (R802.3) requires the ridge board to be at least 1 in nominal and no shallower than the rafter's cut end.

    What size lumber do I need for rafters?

    The calculator rounds the cut length up to the next standard length. Whether a 2×6, 2×8 or larger rafter is strong enough depends on span, spacing, species, grade and snow load: check IRC Tables R802.4.1(1) through (8).

    Sources and assumptions

    Last reviewed 27 October 2026. Every formula on this page is checked against the worked example above in our automated tests. Found a problem? Tell us.