RoofingRafter Calculator

Rafter Calculator

Calculate common rafter length, cut length, spacing count and board feet.

Span, pitch and layout

Common roofs

Span is wall face to wall face across the building. The run is half of it.

Span check

24 ft across, 2x8 at 16 in OC. Past the 18 ft 2 in table limit for SPF #2 at 20 psf live and 10 psf dead. See the full table.

Common rafters only

One span, one pitch, a ridge board down the centre. Hips, valleys and jacks run on a different base and need their own layout.

Estimates only. Not professional advice.

Common rafter, cut to cut

14.47 ft

13.35 ft to the ridge plus 1.12 ft of tail, marked along the top edge of a 2x8.

12 ftrun
6 ftrise
26.6°roof angle
62rafters
Hypotenuse, run and rise√(12 ft² + 6 ft²)
13.42 ft
Ridge deductionhalf of 1.5 in
− 0.75 in
Tail along the slope12 in ÷ cos 26.6°
+ 1.12 ft
Ridge board40 ft long
1.5 in
Board feet per rafter2x8
13.1
Board feet, whole roof62 rafters
813
SPF stock, planning range
$407 to $651

Length and quantity only. Whether a 2x8 carries this span is a span table question, answered in the chart below.

Last updated August 12, 2026. Reviewed by our expert review team.

Plumb cut to tail

The rafter you cut is not the triangle you measured

The hypotenuse of the roof triangle is 13.42 ft on this roof, and it is not a length you ever mark. The ridge board takes some off the top, the tail adds more at the bottom, and the birdsmouth in between takes depth rather than length.

Rafter section, to scale

6/12 · 26.6° · 2x8 on a 2x4 wall

WALL26.6°CUT 14.47 ftPLUMB CUTRIDGE 1.5 inBIRDSMOUTHTAILRUN 12 ftEAVE 12 inRISE6 ft

Run, rise, board depth, ridge and eave all share one scale, so the drawn slope is the slope you will cut. The dashed line is the measuring line, from the heel of the birdsmouth to the ridge centreline.

Cut sheet, 2x8 on a 2x4 wallIRC R802.7.1 · R502.8.1 · R802.6
63.4°plumb cut off the edge
26.6°seat cut off the edge
6.36 inheight above plate
1.57 inseat notch, end limit 1.81 in

The two angles are complements, so one framing square setting of 6 on the tongue and 12 on the blade marks both. On a mitre saw the plumb cut is 26.6° off square, not 63.4°.

Birdsmouth detail, 6.2× the section above

The dashed line is the end-notch limit, one quarter of the rafter depth. The looser one third framers usually quote sits 0.61 in above it, too close to draw twice, so both figures are in the rows instead.

¼ DNOTCH 1.57 inSEAT 3.5 inHEELHAP
2x4 wall, full seatclears both limits
1.57 in
2x6 wall, full seatpast both limits
2.46 in
Longest seat at 6/12still needs 1.5 in of bearing
4.05 in
Height above plateevery rafter on the roof shares it
6.36 in

Depth and span

Rafter span limits by size: how far a 2x8 reaches

Length is arithmetic. Depth is a table. These are maximum horizontal spans at 16 in OC, and your 24 ft span is checked against every row. Span here means the horizontal projection, which the AWC span tables (PDF) spell out and which is twice the run above, not the rafter itself.

SizeSPF #2Doug fir #2End notch limitYour span, SPF
2x614 ft 4 in14 ft 7 in1.38 intoo far
2x8yours18 ft 2 in18 ft 5 in1.81 intoo far
2x1022 ft 3 in22 ft 6 in2.31 intoo far
2x1225 ft 9 in26 ft2.81 infits

A 2x8 in SPF #2 stops at 18 ft 2 in at 16 in OC, and this roof asks for 24 ft. Go deeper, come in to 16 in OC, change species, or put a purlin or a ridge beam under it.

The fourth column is the end notch limit for that depth, and it grows with the size in the same direction the span does. Going up a size to clear the span buys you a deeper legal seat as well, which is why a marginal 2x6 on a 2x6 wall is rarely fixed by anything except a bigger rafter.

Grade #2, 20 psf roof live load, 10 psf dead load, ceiling not attached to the rafters, deflection limit L/180, from IRC 2021 Table R802.4.1(1). The table also assumes the rafter ties sit at the bottom of the attic: raise them and the spans come down. End notch limit is one quarter of the depth, per R802.7.1 and R502.8.1.

Cut list

Shed, ranch and garage: four rafter takeoffs

The four presets in the calculator, each cut with a 12 in eave and a 1.5 in ridge board in 2x8. Watch what pitch does to the tail: the shed and the garage share it, and the steep roof pays a third again for the same eave.

12 ft · 4/12 · 16 in OC

7.32 ft

1.05 ft tail · 20 rafters

Shed

Comes off 8 ft stock with 0.68 ft of drop, 6.6 board feet a rafter.

24 ft · 6/12 · 16 in OC

14.47 ft

1.12 ft tail · 62 rafters

Ranch

Comes off 16 ft stock with 1.53 ft of drop, 13.1 board feet a rafter.

24 ft · 4/12 · 24 in OC

13.64 ft

1.05 ft tail · 30 rafters

Garage

Comes off 14 ft stock with 0.36 ft of drop, 12.4 board feet a rafter.

20 ft · 12/12 · 16 in OC

15.49 ft

1.41 ft tail · 48 rafters

Steep roof

Comes off 16 ft stock with 0.51 ft of drop, 14 board feet a rafter.

Every figure here comes out of the same four lines the calculator runs. Load the preset above to see the rest of its takeoff.

Framing square

Marking a common rafter: ridge cut, birdsmouth, tail

One board, four marks and a test fit, in the order a framer makes them. Everything below happens on the pattern rafter, on sawhorses, before anything goes up.

Common rafter layout: the building span halved into the run, the rise found from the pitch, the rafter length across the triangle, the overhang tail past the wall, and the rafter spacing along the building.
The takeoff path from span to spacing. It stops where the span table starts, which is the one step on this page nobody should take from a drawing.

Set the square and mark the ridge cut

Hold 6 on the tongue and 12 on the blade against the top edge of the board and scribe down the tongue. That line is the plumb cut, 26.6 degrees off square on the saw. Mark it near one end and leave yourself the offcut.

Step the length off, then shorten at the ridge

Measure 13.42 ft down the top edge from the plumb line, square to the line rather than along the board's diagonal. Then come back 0.75 in, half the ridge board, and redraw the plumb cut there. Nothing else on the rafter moves.

Lay out the birdsmouth at the wall face

At the far end of that measurement, scribe a second plumb line: that is the heel, and it lands on the outside face of the wall. Square off it for the seat, up to 3.5 in on a 2x4 wall, and check the notch against 1.81 in before you cut.

Carry on past the heel for the tail

The eave keeps going down the same slope. From the heel line, run 1.12 ft further and cut the tail plumb, square, or on a bevel to suit the fascia. Notch the tail for a lookout or a gutter board and R802.7.1.1 wants 3.5 in of rafter left below the cut, on an overhang no longer than 24 in.

Fit it, then trace it

Take the pattern up and try it at both gable ends. Once it sits down on the plate and stands against the ridge with no daylight, use it as the template for every other common rafter and keep it off the roof.

Pattern rafter

What framers check before cutting the pattern rafter

None of these change the arithmetic. All of them change whether the roof goes together, and every one of them is cheaper to catch on the first board than on the fortieth.

Cut one pattern rafter and test it before the rest. Carry it up, set it against the ridge and drop it onto the plate at both ends of the building. A pattern that fits at one gable and not the other is telling you the walls are out of parallel, and that is cheaper to find on one board than on 62.

Run is half the span, measured to the outside of the wall. Not to the inside, not to the stud face. The sheathing hangs past it and the rafter tail passes over it, so the wall face is the only line both the plan and the roof agree on.

Every rafter shares one HAP. The depth left above the plate, 6.36 in on this roof, is what holds the plane flat. Cut a deeper seat on one rafter to make it sit down and that rafter now sits low forever.

Crown the stock before you trace it. Sight each board, mark the high edge, and lay every rafter crown up. Mixed crowns give a ridge line that reads as a wave from the street, and no amount of sheathing pulls it out.

Order the board, not the rafter. A cut length of 14.47 ft comes off a 16 ft board and leaves 1.53 ft of drop. Take the drop into the blocking and the ridge fill rather than the skip.

The birdsmouth locates the rafter, it does not hold it down. Uplift is a connector job. Read your local requirement and pick the tie from a manufacturer's table, for instance Simpson Strong-Tie.

Framing first, cover second. Once the rafters are up, the roofing calculator takes the same span and pitch through to squares and bundles, and the board foot calculator prices the stack you just cut.

Scope

What this rafter number settles, and what it does not

Everything down to the rafter count is decided on this page. The last two rows are not, and no calculator on any site can decide them for you.

Runhalf the span you entered12 ft
Rafter to the ridgehypotenuse less half the ridge board13.35 ft
Tail past the platehorizontal eave divided by cos of the angle1.12 ft
Board length, cut to cutwhat you mark on the stock14.47 ft
Seat notch, end limitIRC R802.7.1 to R502.8.1, one quarter of the depth1.81 in
Rafters at your spacingbuilding length, both slopes, plus the end pair62
Species, grade and snow loadnot decided here, read a span tablespan table
Uplift and connectorsnot decided here, local requirementconnector table

At the ridge

Ridge boards, birdsmouths and hips: rafter questions

Nine answers, all against the same geometry the calculator runs, starting with the one everybody arrives with.

How do I calculate common rafter length?

Halve the building span to get the run, multiply the run by the pitch over 12 to get the rise, then take the square root of run squared plus rise squared. On a 24 ft span at 6/12 that is a 12 ft run, a 6 ft rise and a 13.42 ft rafter before the ridge deduction.

Why is the run half the building span?

A common rafter on a gable roof reaches from the outside face of the wall to the ridge, and the ridge sits on the centerline. Each rafter therefore covers half the span. Using the full span doubles both the rise and the length.

What is the ridge deduction, and do I really need it?

The ridge board takes up its own thickness on the centerline, so each rafter stops half a ridge thickness short of it. On a 1.5 in ridge that is 0.75 in off every rafter. Skip it and the two rafters fight for the same space, which pushes the ridge up and the walls out.

Does the birdsmouth make the rafter shorter?

No. The ridge cut and the heel cut of the birdsmouth are both plumb, so the distance between them along the top edge is the same whether the notch is cut or not. The birdsmouth costs you depth over the plate, not length.

How deep can a birdsmouth be cut?

Two limits get quoted. The trade rule of thumb is one third of the rafter depth, or 2.42 in on a 2x8. Read strictly, IRC R802.7.1 sends you to R502.8.1, where a notch at the end of a member is capped at one quarter of the depth, or 1.81 in on a 2x8. A seat run the full width of a 2x6 plate breaks the stricter figure on anything past about 4/12.

What is HAP, or height above plate?

The plumb depth of rafter left above the plate once the birdsmouth is cut. It sets where the top of the rafter lands, so every rafter on the roof has to share one HAP or the roof plane waves.

Why does a 12 in overhang add more than 12 in of rafter?

The overhang input is horizontal eave projection, and the tail runs down the slope. Divide the horizontal projection by the cosine of the roof angle: at 6/12 a 12 in eave is a 13.4 in tail, and at 12/12 it is 17 in.

Does this calculator size the rafters?

No. It gives length, count and board feet. Size comes from a span table read for your species, grade, spacing and snow load. The chart on this page covers one common load case only.

Can I use this for hip, valley or jack rafters?

Common rafters only. A hip or valley runs on a 17 unit base rather than 12 and needs compound cuts at both ends, and jacks shorten by a fixed step down the hip. Those are a separate layout.

Scrap pile

Six ways a rafter ends up too short to use

In the order they happen: the tape, the triangle, the eave, the seat, the size, the count. A rafter cut long can be trimmed. Every failure below produces one cut short.

01

Running the tape across the whole span

A 24 ft span is a 12 ft run. Feed the span in as the run and the rafter comes out roughly twice as long, and the rise with it.

Halve the span first, every time, then let the pitch act on that half.

02

Cutting to the bare hypotenuse

The plain triangle gives 13.42 ft here. That length has no ridge deduction taken off it and no tail on it, so it is the one number on this page you never mark.

Take 0.75 in off at the ridge, then add 1.12 ft of tail.

03

Measuring the overhang along the rafter

The eave projection is horizontal. At 6/12 a 12 in projection is 13.44 in of board, and the gap widens with every step of pitch.

Enter the horizontal projection and let the slope conversion happen once, in the arithmetic.

04

Seating the birdsmouth on the full plate

The notch square to the rafter is the seat length times the sine of the angle. On this roof a 5.5 in seat cuts 2.46 in deep, against 2.42 in for the one third rule and 1.81 in for the end-notch limit.

Stop the seat at 4.05 in or less and leave the rafter proud of the inside plate edge. The seat still needs 1.5 in of bearing.

05

Reading board feet as an engineering sign off

Board feet is volume. It knows nothing about species, grade, snow load or deflection, and it will happily price a 2x6 across a span no 2x6 should cross.

Check the size against a span table for your own load case before you price anything.

06

Assuming the count survives the gable ends

Openings, outlookers, gable ladders and a doubled rafter at each end all move the layout, and none of them are in a division.

Lay the roof out on the plate in pencil and count what you actually drew.

Line by line

The rafter arithmetic, one line at a time

Seven lines, each one feeding the next, with this roof's own value beside it. The order matters: the ridge comes off before the tail goes on, because the tail is measured from the heel and not from the ridge.

RunThe ridge sits on the centreline, so each common rafter covers half the span.12 ft
RiseRun multiplied by the pitch over 12. Pitch is a ratio, so it is the same number in metres.6 ft
Roof angleArctangent of the pitch over 12. The plumb cut is its complement off the rafter edge.26.6°
Theoretical rafterSquare root of run squared plus rise squared, measured along the measuring line from the heel to the ridge centreline.13.42 ft
Ridge deductionThe ridge board occupies its own thickness on the centreline, so each rafter stops half a thickness short of it.− 0.75 in
TailThe eave projection is horizontal, so divide it by the cosine of the roof angle to get board along the slope.+ 1.12 ft
Rafter countBuilding length divided by spacing, rounded up, plus one for the closing pair, doubled for both slopes.62

Why the birdsmouth adds no length

The ridge cut and the heel cut of the birdsmouth are both plumb, which means both are vertical planes. The distance between two vertical planes measured along any line at the roof angle is the same line to line, so the top edge of the rafter and the measuring line through the heel give the identical figure. Cutting the notch removes material below that line and moves neither end.

What the seat does change is depth. The notch square to the rafter is the seat length times the sine of the roof angle, so it deepens with pitch and with plate width while the limit stays put at a fraction of the rafter depth. That is the constraint that bites, and it is why this page reports a seat notch alongside a length. On a 2x4 wall at 6/12 a full seat cuts 1.57 in into a 2x8.

Where this page rounds, and where it stops

  • The ridge deduction comes straight off the length. Measured exactly along the top edge it is half the thickness divided by the cosine of the angle, so on a 1.5 in ridge it is 0.09 in short at 6/12 and 0.31 in short at 12/12.
  • The seat notch has two limits in circulation: 2.42 in on a 2x8 by the one third rule of thumb, 1.81 in by the end-notch cap the code chain actually lands on. This page shows the stricter figure and the drawing shows both.
  • The tail is cut plumb in the arithmetic. A square or bevelled tail cut changes the fascia detail, not the length along the top edge.
  • Board feet uses the full cut length, so the birdsmouth and the two end cuts are paid for as waste rather than deducted.
  • Nothing here checks deflection, snow load, ceiling load, grade stamp or connector schedule, and none of those are optional.

Disclaimer

These estimates are for planning purposes only. Actual costs vary by location, material availability, and project complexity. Always get at least 3 local quotes. This calculator does not replace professional advice.