The Carpentry Calculator

Rafter calculator

Enter the building width and the roof pitch. You get the rafter length, the cuts to make, how many rafters to buy and the roof area.

Type it the way you measure it: 9' 2", 110 or 7 1/2.

 

Rafter lengthridge cut to the outside of the wall
–
Board lengthwith the tail, before you buy
–
Roof risewall line up to the ridge
–
Plumb cut angle
–
Birdsmouthseat cut / heel cut
–
Raftersboth sides of the roof
–
Ridge boardas deep as the rafter's plumb cut
–
Roof areaboth sides, with overhang
–

What to buy

    What the rafter calculator works out

    It lays out the common rafters for a gable roof, the kind with two sloping sides that meet at a ridge. You get the rafter length, the angle and position of every cut, the number of rafters, the ridge board size and the roof area for sheathing.

    Why rafter length is worth calculating

    Every rafter on a roof is a copy of the first one. If the pattern rafter is 1/4 inch out, the ridge ends up too high or too low along the whole building, and the birdsmouths do not sit on the wall. Working the length out from the pitch gives you a pattern you can trust before you cut 40 more.

    Where to measure for rafters

    Measure the building width across the top plates, from the outside of one wall to the outside of the other. Measure it at both ends, because walls are rarely parallel. The overhang is measured level, straight out from the wall, not along the slope. Building length is measured along the ridge.

    How rafter length is calculated

    The run is half the building width, less half the thickness of the ridge board. The rafter is the long side of a right triangle with the run along the bottom and the rise up the side. For any pitch, that long side is the run times a fixed pitch factor.

    Run = (building width − ridge thickness) ÷ 2

    Rafter length = run × √(pitch² + 12²) ÷ 12

    Roof rise = run × pitch ÷ 12

    Worked example

    A building 24 feet wide with a 6 in 12 roof and a 1 1/2 inch ridge board: the run is (288 − 1 1/2) ÷ 2 = 143 1/4 inches. The pitch factor for 6 in 12 is 1.118, so the rafter is 160 3/16 inches, or 13 feet 4 3/16 inches, from the ridge cut to the outside of the wall. A 12 inch overhang adds 13 7/16 inches of tail. With the plumb cut at the tail, each rafter needs a board 14 feet 9 3/16 inches long, so buy 16 foot boards.

    Pitch factors

    PitchAngleFactorRafter per foot of run
    3 in 1214.0°1.03112 3/8"
    4 in 1218.4°1.05412 5/8"
    5 in 1222.6°1.08313"
    6 in 1226.6°1.11813 7/16"
    8 in 1233.7°1.20214 7/16"
    10 in 1239.8°1.30215 5/8"
    12 in 1245.0°1.41417"

    Good to know

    • This calculator does not size the rafters. A rafter that is long enough can still be too weak for the span and the snow load. Check the IRC rafter span tables or your building department.
    • It covers common rafters on a plain gable roof. Hip, valley and jack rafters have different lengths and cuts.
    • Lengths are measured along the top edge of the rafter, between plumb lines.
    • The rafter count is one pair at every layout mark plus the pair at the end. Add extra for a gable overhang.

    Questions people ask

    How do you calculate rafter length?

    Take the run, which is half the building width less half the ridge board. Multiply it by the pitch factor: the square root of (pitch squared plus 144), divided by 12. For a 6 in 12 roof the factor is 1.118, so a run of 143 1/4 inches gives a rafter of 160 3/16 inches from the ridge to the outside of the wall.

    What is roof pitch?

    Pitch is how many inches the roof rises for every 12 inches it runs. A 6 in 12 roof, written 6/12, rises 6 inches per foot of run and sits at 26.6 degrees.

    How do I convert roof pitch to degrees?

    The angle is the arctangent of pitch divided by 12. A 4/12 roof is 18.4 degrees, 6/12 is 26.6, 8/12 is 33.7 and 12/12 is 45.

    What is a birdsmouth cut?

    A birdsmouth is the notch that lets a rafter sit flat on top of the wall. The level part is the seat cut and the plumb part is the heel cut. The IRC limits a notch at the end of a rafter to one quarter of its depth.

    How big should the ridge board be?

    The IRC (R802.3) asks for a ridge board at least as deep as the cut end of the rafters. A plumb cut is taller than the board is wide, so the ridge is usually one size larger: a 2x10 ridge for 2x8 rafters at 6/12.

    Did this get it right?

    If you used a calculator on this page, your measurements are sent with your note so we can check the math.