FixHomeCost

Free tool · Cut lengths, angles & birdsmouth

Rafter Length Calculator

This rafter length calculator gives you the cut length of a common rafter in feet, inches and sixteenths, with the ridge deduction and overhang tail included. It also lays out the plumb and seat cuts, checks your birdsmouth, and works out hip, valley and jack rafters, rafter count and ridge length.

By Chowdhury, FixHomeCost editor · Last reviewed October 2026

1. Roof size and pitch

Pick what you know. Results update as you type.

Units:
Building span Outside of wall to outside of wall

2. Lumber and birdsmouth

Advanced options ridge, fascia, rakes, spacing, cuts
Common rafter, total length
–
Rafter (ridge to wall)
–
Overhang tail
–
Board to buy
–
Pitch and angle
–
Plumb cut
–
Seat (level) cut
–
Total rise
–
Ridge board
–
Common rafter drawn to scale (depth shown at least 7% of length so it stays visible).
Birdsmouth close-up.

Heel cut (plumb) height
–
Notch depth (square to edge)
–
Height above plate (HAP)
–
Rafter top at ridge
–

3. Hip, valley and jack rafters

For a regular hip or valley, where both roofs have the same pitch and meet at 45° in plan.

Hip or valley rafter
–
Hip plumb cut
–
Jack common difference
–
Jacks per side of each hip
–
JackRun from cornerLine lengthWith tail

4. Rafter count and ridge

Rafters to cut
–
Ridge length
–
Show the full calculation step by step with your numbers

    Lengths are measured along the top edge of the rafter. Results are rounded to the nearest 1/16 in (1 mm in metric). Rafter sizing for loads is not included.

    Layout math only. This tool does not size rafters. Check the rafter span tables in IRC R802.4 or your local code, or ask an engineer, for the lumber size, grade and spacing your snow load and span need.

    Cut one pattern rafter and test it on the building before you cut the rest. Nothing you enter is sent to us.

    How to calculate rafter length

    A common rafter is the sloped side of a right triangle. The run is the flat side, from the outside of the wall to the center of the ridge. The rise is how far the roof climbs over that run. The rafter is the long side. A rafter length calculator just solves that triangle and then adjusts it for the parts that real lumber has: a ridge board in the middle, an overhang at the bottom, and a notch where it sits on the wall.

    1. Find the run. For a gable or hip roof, it's half the building span. A 24-foot-wide house has a 12-foot run.
    2. Take off half the ridge. The rafters stop at the face of the ridge board, not its center. With a 1-1/2 inch ridge, take 3/4 inch off the run.
    3. Multiply by the pitch factor. The factor is √(1 + (pitch ÷ 12)²). For 6/12 it's 1.118. That gives the rafter length from the ridge plumb cut to the plumb line over the outside of the wall.
    4. Add the tail. Multiply the horizontal overhang by the same factor and add it.
    5. Buy long enough stock. A plumb-cut tail needs a little extra board, equal to the rafter depth times pitch ÷ 12. Then round up to the next standard length.

    The calculator does all five steps at once and gives the answer in feet, inches and sixteenths, the way you'd read a tape. Switch to metric if your plans are in millimeters.

    Rafter length formula with a worked example

    Pitch factor = √(1 + (pitch ÷ 12)²)
    Rafter = (span ÷ 2 − ridge ÷ 2) × factor
    Tail = overhang × factor
    Total = rafter + tail
    Board needed = total + depth × pitch ÷ 12
    Heel height = seat × pitch ÷ 12
    Notch depth = seat × sin(angle)
    HAP = depth ÷ cos(angle) − heel height

    Worked example: a 24-foot span, 6/12 gable roof, 1-1/2 inch ridge board, 12-inch overhang, 2x8 rafters on a 2x4 wall. These are the calculator's defaults.

    Plumb cuts, seat cuts and the birdsmouth cut

    Every common rafter has two angled cuts at the top and a notch at the wall.

    To mark them with a framing square, hold 12 on the body and the pitch number (6 for a 6/12 roof) on the tongue, both along the top edge of the board. Draw along the tongue for a plumb line and along the body for a level line. A speed square does the same job: pivot it on the "common" scale to the pitch number.

    The birdsmouth cut is the notch that lets the rafter sit flat on the wall. Its seat is usually as wide as the wall plate: 3-1/2 inches on a 2x4 wall, 5-1/2 on a 2x6 wall. A common rule of thumb is to keep the notch no deeper than one third of the rafter depth, so enough wood stays above it to carry the load. Steep roofs and wide seats break that rule fast. A 2x8 on a 2x6 wall at 6/12 cuts 2.46 inches deep, more than a third of 7.25 inches. When that happens, shorten the seat (the IRC still needs at least 1-1/2 inches of bearing), use a deeper rafter, or ask your engineer about a heel detail. The calculator flags it and shows the longest seat that stays within a third.

    HAP, height above plate, is the plumb distance from the top of the wall plate to the top edge of the rafter at the outside of the wall. Keep it the same on every rafter so the roof plane stays flat. It also sets how much room there is for insulation over the wall.

    Rafter length per foot of run, by pitch

    Multiply the run in feet by these numbers to get rafter length in inches. The hip column is for a regular hip or valley, measured per foot of common run.

    Common and hip rafter length per foot of run
    PitchAngleCommon per ft of runHip/valley per ft of runJack difference 16" / 24"
    3/1214.04°12.37 in17.23 in16.49 / 24.74 in
    4/1218.43°12.65 in17.44 in16.87 / 25.30 in
    5/1222.62°13.00 in17.69 in17.33 / 26.00 in
    6/1226.57°13.42 in18.00 in17.89 / 26.83 in
    7/1230.26°13.89 in18.36 in18.52 / 27.78 in
    8/1233.69°14.42 in18.76 in19.23 / 28.84 in
    9/1236.87°15.00 in19.21 in20.00 / 30.00 in
    10/1239.81°15.62 in19.70 in20.83 / 31.24 in
    12/1245.00°16.97 in20.78 in22.63 / 33.94 in

    Example: a 6/12 rafter with a 12-foot run is 12 × 13.42 = 161 inches before the ridge deduction. That's 13' 5", which matches the theory. The calculator's 13' 4-3/16" is shorter because it takes off half the ridge.

    Hip rafter length calculator: hips, valleys and jacks

    A hip rafter runs diagonally from the corner of the building up to the ridge. In plan view it crosses the corner at 45°, so its run is longer: 16.97 inches for every 12 inches of common run (that's 12 × √2). It climbs the same height as the commons, so it has a lower slope. A 6/12 roof has hips at 6 in 16.97, about 19.5°.

    Hip or valley length = common run (after ridge deduction) × √(2 + (pitch ÷ 12)²)
    Jack common difference = spacing × pitch factor

    For a 6/12 roof, √(2 + 0.25) = 1.5, so a 143.25-inch common run gives a hip of 214.88 inches, about 17' 10-7/8". Valley rafters on a roof with equal pitches use the same math. Mark the hip's plumb cut with 17 on the body of the framing square and the pitch on the tongue. The top end gets 45° side cuts (cheek cuts) to fit between the ridge and the commons.

    Jack rafters run from the wall plate up to a hip, or from a valley up to the ridge. Each one is shorter than the last by the same amount, the common difference. At 16 inches on center on a 6/12 roof that's 17.89 inches. The table in the calculator lists every jack's theoretical length. Take off half the 45° thickness of the hip (about 1-1/16 inch measured level for a 1-1/2 inch hip) before you cut, and add the same tail as the commons.

    For a hip roof, the ridge is shorter than the building: building length minus span, measured on the framing lines. A 40 by 24 foot hip roof has a 16-foot ridge.

    Rafter size and span: what this calculator doesn't do

    This is a layout tool. It tells you how long to cut a rafter, not whether that rafter is strong enough. Rafter size depends on span, spacing, lumber species and grade, roof dead load, snow load, and whether a ceiling is attached. The International Residential Code has span tables for this in section R802.4. Your local building department may have its own amendments, and many areas need an engineer for snow loads or long spans.

    A few framing rules worth knowing before you cut:

    Once the frame is up, our roof square footage calculator and roofing shingles calculator work out the sheathing area and the shingle order.

    Tips for cutting rafters

    Frequently asked questions

    How do I calculate common rafter length?

    Divide the span by 2 to get the run, subtract half the ridge thickness, and multiply by √(1 + (pitch ÷ 12)²). Then add the overhang times the same factor. For a 24-foot span at 6/12 with a 1-1/2 inch ridge and 12-inch overhang, that's 13' 4-3/16" plus a 1' 1-7/16" tail, or 14' 5-9/16" overall.

    How long is a rafter for a 6/12 pitch?

    About 13.42 inches for every foot of run, before the ridge deduction and tail. A 10-foot run needs a rafter of about 134 inches (11' 2"), and a 14-foot run about 188 inches (15' 8").

    How deep should a birdsmouth cut be?

    A common rule is no more than one third of the rafter depth, measured square to the edge. For a 2x8 (7-1/4 in) that's about 2-7/16 inches. The seat should still give at least 1-1/2 inches of bearing on the wall.

    What is the ridge deduction?

    Rafters stop at the face of the ridge board, not its center. So you take half the ridge thickness off the run, measured level. With a 1-1/2 inch ridge, that's 3/4 inch of run, or about 13/16 inch along a 6/12 rafter.

    How do I calculate hip rafter length?

    Multiply the common run by √(2 + (pitch ÷ 12)²). For a regular 6/12 hip that factor is exactly 1.5, so a 12-foot common run makes an 18-foot hip before deductions. Mark the plumb cut with 17 and 6 on the framing square.

    How many rafters do I need?

    Divide the building length in inches by the spacing and add one, then double it for a gable roof. A 40-foot building at 16 inches on center needs 31 per side, 62 total. At 24 inches it's 21 per side. Add rafters for gable overhangs, openings and doubled members.

    What size rafters do I need?

    It depends on span, spacing, lumber grade and your snow load. Use the rafter span tables in IRC R802.4 or your local code, or have an engineer size them. This calculator does the layout once you know the size.

    This is general information, not a professional inspection. See how we research costs.