Rafter Calculator

Common rafter length from span and pitch with the ridge deduction and overhang, plumb and seat cut angles, birdsmouth depth, rafter count and hip factors.

The interactive tool loads here when JavaScript runs.

About this tool

What is the Rafter Calculator?

A common rafter runs from the wall plate to the ridge at the roof pitch. Its length is the hypotenuse of a right triangle whose base is the run and whose height is the rise, but a framer also needs to take half the ridge board off the top, add the overhang tail at the bottom, cut a birdsmouth to seat it on the wall, and know the angles to set the saw. This calculator works out all of that from the span and pitch.

Enter the building span (or the run of one side), the pitch as rise per 12 or in degrees, the ridge thickness and the level overhang. Pick the rafter size and the width of the wall plate for the seat cut. Results show the rafter length along the measuring line, the plumb and seat cut settings, the heel cut and notch depth of the birdsmouth, the height above plate, and the stock length to buy.

With a roof length and spacing it counts rafters for a gable or a shed roof. A second panel gives the hip or valley line length, the hip pitch and the jack rafter difference, alongside a framing square table for pitches from 3/12 to 12/12.

  • Span or run input in feet-inches with fractions, or millimetres and metres
  • Pitch as x/12 or degrees with live conversion
  • Ridge deduction, overhang tail, plumb and seat cut settings
  • Birdsmouth heel, notch depth, height above plate and a one-third depth check
  • Rafter count, hip and valley factors and a framing square table
Read the guide: Rafter Length, Roof Pitch and the Birdsmouth Cut, Worked Out

How to use the Rafter Calculator

  1. Choose imperial or metric, then building span or run. Span is measured from the outside of one wall plate to the outside of the other.
  2. Enter the pitch as rise per 12 in of run, or switch to degrees.
  3. Enter the ridge thickness (1-1/2 in for a 2x ridge, 0 if the rafters meet), the level overhang, the rafter size and the plate width for the seat cut.
  4. Add the roof length along the ridge and the rafter spacing to count rafters; choose gable or shed.
  5. Read the rafter length, cut angles and birdsmouth, check the notch warning, then copy the cut list.

Worked examples

24 ft gable at 6/12

Input

24 ft span, 6/12, 1-1/2 in ridge, 12 in overhang, 2x8 rafters, 3-1/2 in seat, 40 ft long at 16 in

Output

Rafter 14' 5-9/16", plumb cut 26.57°, seat cut 63.43°, heel 1-3/4", 62 rafters, buy 16 ft

The line length to the ridge centre is 13' 5" (12 ft x 13.42 in). Taking 13/16 in off for the ridge and adding 1' 1-7/16" of tail gives the cut length. The notch is 1-9/16 in deep, 22% of the 7-1/4 in rafter.

30 ft span at 8/12 with 2x10s

Input

30 ft span, 8/12, 1-1/2 in ridge, 18 in overhang, 2x10, 5-1/2 in seat (2x6 wall), 50 ft long at 24 in

Output

Rafter 19' 9-1/16", 33.69°, notch 3-1/16" (33% of depth), 52 rafters, 22 ft stock

The full 5-1/2 in seat on a 2x6 wall puts the notch right at the one-third guideline. Shortening the seat to 4-1/2 in still leaves ample bearing and a shallower notch.

Metric roof at 30 degrees

Input

8 m span, 30°, 45 mm ridge, 450 mm overhang, 190 mm rafters, 90 mm plate, 12 m long at 600 mm

Output

5,112 mm rafter, heel cut 52 mm, 42 rafters (21 per side)

At 30° the slope factor is 1.1547, so the 3,977.5 mm adjusted run plus 450 mm of overhang becomes 5,112 mm along the rafter.

Background and insight

The slope factor sqrt(1 + (rise/12)²) converts any level distance into a distance along the rafter. It is the same number a framing square prints as "length of common rafter per foot of run": 13.42 in for 6/12 and 16.97 in for 12/12. For a regular hip roof, where both slopes share one pitch, the hip runs on the diagonal of a square, so its run is 16.97 in for every 12 in of common run and its length per foot is sqrt(288 + rise²), 18.00 in at 6/12. Jack rafters shorten by the spacing times the common slope factor, 17-7/8 in at 16 in centres on a 6/12 roof.

The ridge deduction is half the ridge thickness measured level, so it becomes 0.84 in along a 6/12 rafter for a 1-1/2 in ridge. Seat cut depth is limited in practice: the usual rule of thumb is to remove no more than a third of the rafter depth, and the IRC requires at least 1-1/2 in of bearing on wood (Section R802.6) and limits notches in sawn rafters. Rafter size and spacing for a given span come from the IRC R802 span tables or your local code.

Common use cases

  • Cutting a pattern rafter

    Get the plumb cut, seat cut and length to mark one rafter, test it on the building, then gang-cut the rest.

  • Ordering roof framing

    Count rafters and pick the stock length that covers the rafter plus the long point of the plumb cut.

  • Sheds, garages and porches

    Switch to shed mode for a single slope and use the run directly when the roof leans against a wall.

  • Checking hip and valley lengths

    Read the hip line length and jack rafter difference for a regular hip roof before laying out.

Tips and limitations

  • Measure the actual span at the plates. Walls are rarely exactly to plan, and the rafter follows the building, not the drawing.
  • The calculator measures along the measuring line through the outside corner of the wall plate. Mark your pattern rafter from the same line.
  • Pitch in degrees is converted to rise per 12 for the framing square, so 30° shows as 6.928/12.
  • Hip and valley figures assume equal pitches on both sides and do not include the deductions for the ridge and the side cuts.
  • Snow load, rafter spacing and species decide rafter size. Use the span table, not the length, to pick 2x8 versus 2x10.

Frequently asked questions

How do you calculate rafter length?

Divide the span by two to get the run, subtract half the ridge thickness, then multiply by the slope factor sqrt(1 + (rise/12)²). For a 24 ft span at 6/12 with a 1-1/2 in ridge that is 143.25 in x 1.118 = 160.16 in to the plate line. Add the overhang times the same factor for the tail.

What angle is a 6/12 roof pitch?

26.57 degrees, the arctangent of 6/12. Common pitches: 4/12 is 18.43°, 8/12 is 33.69°, 10/12 is 39.81° and 12/12 is 45°.

How deep can a birdsmouth cut be?

The usual guideline is no more than one third of the rafter depth, leaving two thirds above the notch. The IRC also requires at least 1-1/2 in of bearing on the plate and limits notches in sawn lumber, so check with your inspector.

What angle do I set the saw to for a plumb cut?

On a miter saw the plumb cut is the roof angle measured from a square cut, 26.57° for 6/12. The seat cut is the complement, 63.43°. With a framing square, hold the rise on the tongue and 12 on the blade and mark along the tongue.

How do you work out hip rafter length?

For a regular hip, multiply the common run in feet by sqrt(288 + rise²) inches. At 6/12 that is 18.00 in per foot of common run, so a 12 ft run gives an 18 ft hip line length before the ridge deduction.

How many rafters do I need for a gable roof?

Divide the roof length by the spacing, round up and add one for each side, then double it for a gable. A 40 ft roof at 16 in centres needs 31 rafters per side, 62 in all, before any doubled rafters at openings.

Is there an in-depth guide to the Rafter Calculator?

Yes. “Rafter Length, Roof Pitch and the Birdsmouth Cut, Worked Out” covers the background, how it works, common pitfalls and worked examples. Read the full guide.