Skip to content

How to Calculate Rafter Length

Reviewed by Shashikant YadavUpdated How we calculate1 sources

Calculate it nowRafter Length Calculator
On this page(10)
  1. 1The example roof used in this guide
  2. 2Measure the span and run on site
  3. 3Method 1: rise and run with a tape measure
  4. 4Method 2: the rafter table on a framing square
  5. 5Method 3: stepping off with a speed square
  6. 6Mark the plumb cut and the birdsmouth
  7. 7Lean-to and shed rafters
  8. 8Cut and test a pattern rafter
  9. 9Order the lumber
  10. 10Common mistakes

To calculate rafter length, find the run (half the building width less half the ridge board), then get the sloped length over that run in one of three ways: the Pythagorean theorem with rise and run, the rafter table on a framing square, or stepping off the run on the board with a square. Add the overhang tail the same way. All three give the same number. On a 22 ft gable at 7/12 with a 1½ in ridge and a 16 in level overhang, each rafter is 14′ 2½″ long.

If you want the number before you pick up a pencil, the rafter length calculator below gives the length, board size and cut angles in one go. It opens with its own example, so enter 22 ft, 7/12, a 1½ in ridge and a 16 in overhang to match the numbers in this guide. The rest of this guide covers the hands-on part: measuring the building, working the length out three ways, marking the plumb cut and the birdsmouth, and testing a pattern rafter before you cut the rest.

Units
Roof type
ft

Outside of wall to outside of wall

26.6° roof angle

in

How far the roof sticks out past the wall, measured level

More options
in
in
ft
  • 13′ 4 1/8″ to the wall + 1′ 1 3/8″ overhang tail
  • Speed square: pivot on the top edge and line up 6 on the COMMON scale.
  • Hip or valley rafter: 1.5 × the run
  • This gives the length only. Lumber size and spacing must come from span tables or local code.

Estimates only. Confirm sizes, grades and prices with your lumberyard.

Show the math
  1. Run24.0000 ft ÷ 2 − 0.0625 ft = 11.9375 ft
  2. Length(11.9375 ft × 1.1180) + 1.1180 ft = 14.4646 ft
  3. Cut anglesatan(6/12) = 26.6°; 90° − 26.6° = 63.4°

The example roof used in this guide

Every method below works through the same garage roof, so you can check one against another.

MeasurementValue
Span (outside of wall plate to outside of wall plate)22 ft
Pitch7/12
Ridge board1½ in (a 2× board)
Eaves overhang, measured level16 in
Rafters2×6 on a 2×4 wall, 16 in on center, 30 ft wall
Run after the ridge deduction10′ 11¼″ (10.9375 ft)
Rise over that run6′ 4⅝″
Rafter over the building12′ 8″
Overhang tail1′ 6½″
Full rafter length14′ 2½″, cut from a 16 ft board
Rafters for a 30 ft wall48

Measure the span and run on site

The run is the number that matters, and it starts with a good span measurement.

  1. Measure the span at the top plates. Hook the tape on the outside edge of one top plate and read the outside edge of the other. If the sheathing is already on, note whether your overhang will be measured from the sheathing or the framing, and stay consistent.
  2. Measure at both gable ends and in the middle. Walls bow and lean. If the readings differ by more than a fraction of an inch, straighten or brace the walls before framing, or plan to fit the rafters at each spot.
  3. Halve the span. 22 ft becomes 11 ft. That is the run to the center of the ridge.
  4. Take off half the ridge board. Rafters stop at the ridge face, not its center. Half of 1½ in is ¾ in, so the run is 10′ 11¼″.
  5. Decide the overhang. Measure it level, from the outside of the wall to where the tail ends. A 16 in eave here.

On a shed or lean-to roof there is no ridge in the middle. The run is the whole width from the low wall to the high wall, so do not halve it.

Method 1: rise and run with a tape measure

This is the Pythagorean theorem, the rule behind the 3-4-5 check for a square corner. The rafter is the long side of a right triangle, and the run and the rise are the other two sides.

  1. Convert the run to inches: 10′ 11¼″ = 131.25 in.
  2. Work out the rise: run × pitch ÷ 12. 131.25 × 7 ÷ 12 = 76.5625 in, which is 6′ 4⅝″.
  3. Square both and add them: 17,226.56 + 5,861.82 = 23,088.38.
  4. Take the square root: 151.95 in, which is 12′ 8″ to the nearest ⅛ in.
  5. Do the same for the overhang. 16 in of level run rises 9⅓ in, and the tail along the rafter is 1′ 6½″.
  6. Add them: 12′ 8″ + 1′ 6½″ = 14′ 2½″.

Convert everything to inches first so you are not adding feet to inches. A phone calculator is enough. Use this method when you can measure an existing rise, such as a ridge that is already up, but you don’t know the pitch.

Method 2: the rafter table on a framing square

A steel framing square has a rafter table stamped on the blade. Under each inch mark from 2 to 18 are several lines; the first one reads length common rafters per foot run.

  1. Find the inch mark that matches the pitch. For 7/12, look under 7.
  2. Read the first line: 13.89. Every foot of level run needs 13.89 in of rafter.
  3. Multiply by the run to the center of the ridge: 11 × 13.89 = 152.79 in, or 12′ 8 13/16″.
  4. Take off the ridge deduction measured along the rafter. Half a 1½ in ridge is ¾ in level, which is ⅞ in along a 7/12 rafter. That leaves 12′ 8″ to the nearest ⅛ in.
  5. For the tail, multiply the overhang in feet: 1⅓ × 13.89 gives 1′ 6½″.

The table assumes a 12 in unit of run, so it pairs naturally with pitches written as x/12. Other lines on the same table (hip and valley per foot, jack rafter differences, side cuts) are for hip roofs. You can ignore them for a gable or shed.

Method 3: stepping off with a speed square

Stepping off lays the rafter out on the board one foot of run at a time, so you never have to write down a length. It works with a speed square or a framing square.

Step-off diagram for a 7/12 rafter: 11 steps of 13⅞ in, ridge cut moved ¾ in, 1′ 6½″ tail, 14′ 2½″ total
  1. Pick a straight board and crown it. Sight down the edge and mark the high side. The crown goes up, so it becomes the top edge.
  2. Mark the ridge plumb line. Near the top end, hold the speed square’s pivot on the top edge, swing it until 7 on the COMMON scale lines up with the same edge, and draw along the square. With a framing square, hold 12 on the body and 7 on the tongue at the top edge and draw along the tongue.
  3. Step one foot of run. Slide the square down the board until it meets the line you just drew at the top edge, and mark again. Each mark is one foot of level run and 13⅞ in along the board at 7/12.
  4. Repeat for each full foot. For 11 ft of run, step 11 times. The last line is the plumb line over the outside of the wall. Small errors in each step add up, so use a sharp pencil and press the square firmly against the edge every time.
  5. Mark any part foot. If the run were 11 ft 4 in, you would hold the square on the last line and measure 4 in level along its edge, then draw a new plumb line there.
  6. Take off the ridge. Go back to the first plumb line and move it ¾ in toward the tail, measured square to the plumb line. That new line is the ridge cut.
  7. Step off the tail. From the wall line, step one full foot, then 4 in level, for the 16 in overhang. Mark the tail plumb line there.

Stepping off gives 12′ 8″ over the building and a 1′ 6½″ tail, matching the other two methods. Measure the finished layout with a tape as a cross-check before you cut.

Which method to use

MethodToolsGood forWhere it goes wrong
Rise and run (Pythagorean)Tape, calculatorExisting ridges, odd pitches, checking any other methodMixing feet and inches; using the full span as the run
Framing square tableFraming square, calculatorPitches in whole inches per footForgetting the ridge deduction, which the table ignores
Stepping offSpeed square or framing squareLaying out the pattern rafter directly on the boardSmall errors on each step adding up over a long run

Mark the plumb cut and the birdsmouth

The length is measured along the measuring line: a line parallel to the rafter’s edges that runs through the inside corner of the birdsmouth, where the heel cut meets the seat cut. That corner sits on the outside top edge of the wall plate. So:

  1. From the ridge plumb line, measure 12′ 8″ along the measuring line and mark the heel cut, a plumb line at the wall.
  2. Draw the seat cut square to the heel cut, as long as the wall plate is wide. On a 2×4 wall that is 3½ in.
  3. The heel cut is only as tall as the seat needs. On a 7/12 rafter with a 3½ in seat, it comes out 2 1/16 in tall.
  4. Mark the tail plumb line 1′ 6½″ past the heel cut, measured along the same line.
Rafter detail: measuring line through the birdsmouth, 3½ in seat, 2 1/16 in heel, 4 5/16 in above plate

On a 2×6 rafter at 7/12 the plumb cut at the ridge is 6⅜ in deep, deeper than the 5½ in board width, because it crosses the board at an angle. A 2×6 ridge would leave part of the cut hanging, so a ridge board one size up is common practice. Check what your code requires.

The wood left above the seat, measured plumb, is the height above plate. On the example rafter it is 4 5/16 in. Keep it the same on every rafter, or the roof plane will be wavy even if every length is right. The table gives these layout numbers for other pitches.

Layout numbers for a 2×6 rafter and a 1½ in ridge board
PitchRidge deduction along rafterHeel cut, 3½ in seat (2×4 wall)Heel cut, 5½ in seat (2×6 wall)Plumb cut depth, 2×6Height above plate, 2×6 on 2×4 wall
4/1213/16″1 3/16″1 13/16″5 13/16″4 5/8″
5/1213/16″1 7/16″2 5/16″5 15/16″4 1/2″
6/1213/16″1 3/4″2 3/4″6 1/8″4 3/8″
7/127/8″2 1/16″3 3/16″6 3/8″4 5/16″
8/127/8″2 5/16″3 11/16″6 5/8″4 1/4″
9/1215/16″2 5/8″4 1/8″6 7/8″4 1/4″
10/121″2 15/16″4 9/16″7 3/16″4 1/4″
12/121 1/16″3 1/2″5 1/2″7 3/4″4 1/4″

Wider seats and steeper pitches cut deeper notches. Your local code limits how much of the rafter a birdsmouth may remove, so check before cutting a deep seat on a 2×6 wall.

Lean-to and shed rafters

A shed roof uses the same three methods with the full width as the run. Take a 9 ft lean-to at 4/12 with a 12 in overhang at the low wall:

  • Run: 9 ft, no ridge to deduct.
  • Step off 9 times at 4 on the COMMON scale. Each step is 1′ ⅝″ along the board.
  • Rafter over the building: 9′ 5⅞″. Rise from low wall to high wall: 3 ft.
  • Tail: one more step, 1′ ⅝″.
  • Rafter length: 10′ 6½″, cut from a 12 ft board.

At the high wall the rafter gets a second birdsmouth, or a plumb cut against a ledger, depending on how it is supported. Lay that out from the high-side measuring line in the same way.

Cut and test a pattern rafter

Cut one rafter, test it on the walls, then use it as the template for the rest.

  1. Cut the pattern rafter with a circular saw set square for the plumb cuts. Finish the corners of the birdsmouth with a handsaw so you don’t over-cut into the rafter.
  2. Make a ridge test block. A short offcut of the ridge board, held plumb, stands in for the ridge.
  3. Test it at both gable ends. Set the birdsmouth on the wall plate and hold the plumb cut against the block. The seat should sit flat on the plate, the heel should touch the outside of the plate, and the plumb cut should bear across its full face.
  4. Check the height. On the example roof, the top edge of the rafter at the ridge face should sit about 6′ 8⅞″ above the top of the wall plate: the 6′ 4⅝″ rise plus the 4 5/16 in height above plate. If it reads high or low, the span, the step-off or the birdsmouth is off.
  5. Test a mirror pair. Hold a second rafter cut from the pattern on the opposite wall. The two plumb cuts should meet the ridge block at the same height.
  6. Mark it PATTERN and trace it onto every other board, crown up. Cut a second pattern if the first one gets chewed up.

If the building is out of square or the walls are not parallel, test the pattern at several spots along the wall. Where it does not fit, adjust that rafter’s seat or length rather than recutting the whole set.

Order the lumber

Once the pattern fits, add about 2 in for trimming both ends and buy the shortest standard board that covers it. The example rafter is 14′ 2½″, so it needs 16 ft boards. At 16 in on center, a 30 ft wall needs 48 rafters across both slopes, before ladder framing at the gables and a few spares for crowned or twisted boards you reject. If your yard quotes by the board foot, the board foot calculator turns that count into a price.

Common mistakes

  • Using the full span as the run on a gable roof. Every rafter comes out about twice as long as it should.
  • Forgetting the ridge deduction, or taking off ¾ in along the rafter instead of ¾ in level. At 7/12 the gap is about ⅛ in per rafter, enough to push the ridge up.
  • Stepping off from the bottom edge. Steps run along the top edge, and length runs along the measuring line.
  • Laying out with the crown down. The roof will sag between rafters.
  • Cutting each rafter from its own measurement. Trace every one from the tested pattern so they match.
  • Notching the birdsmouth deeper on some rafters than others. The height above plate must stay the same.

To check your layout before you cut, enter your span, pitch and overhang in the rafter length calculator. It shows the full length, the part over the building, the tail and the cut angles, so you can compare them with your marks.

Frequently asked questions

How do you calculate rafter length by hand?

Measure the span, halve it and take off half the ridge board to get the run. Then either use √(rise² + run²), multiply the run by the length per foot on a framing square, or step off the run with a square, one 12 in step at a time. Add the overhang tail the same way. A 22 ft gable at 7/12 with a 1½ in ridge and a 16 in overhang gives 14′ 2½″.

How do you step off a rafter with a speed square?

Hold the pivot on the top edge, line up the pitch number on the COMMON scale and mark a plumb line. Slide the square so the pivot sits where the last line met the edge and mark again. Each mark is one foot of run. Step once per foot of run, then mark any part foot as a level distance along the square and draw the final plumb line.

How do you read the rafter table on a framing square?

Find the inch mark on the blade that matches your pitch (7 for 7/12). The first line under it, length of common rafters per foot of run, gives the rafter length for each foot of run: 13.89 in at 7/12. Multiply that by the run in feet, then take off the ridge deduction.

Where on the rafter is the length measured?

Along the measuring line, a line parallel to the edges that passes through the corner of the birdsmouth where the heel cut meets the seat cut. Measure from the plumb cut at the ridge to that corner for the length over the building, then on past it for the tail.

How do you take the ridge board off when stepping off?

Step off the full run to the center of the ridge. Then move the plumb line back toward the tail by half the ridge thickness, measured level (square to the plumb line). For a 1½ in ridge that is ¾ in level, which works out to about ⅞ in along a 7/12 rafter.

How deep can a birdsmouth cut be?

That limit comes from your local building code, so check it before you cut. As a guide, a 2×6 rafter at 7/12 with a 3½ in seat leaves about 4 5/16 in of wood above the seat, measured plumb. Wider seats and steeper pitches cut deeper notches.

Do I need to know the pitch to calculate rafter length?

No. If you can measure the rise and the run, the rafter is √(rise² + run²). You still need the pitch to mark the cuts, and you can work it out from the same rise and run.

Sources & methodology

How we calculate

Shashikant Yadav

Writes practical DIY guides for home and yard projects and checks every calculator against published sources.

Spotted an error? Report it