Rafter Length Calculator

Twelve feet of run at six in twelve gives a common rafter of 13 feet 5 inches. The seventeen inches that appear out of nowhere between the run and the rafter are the reason nobody orders roof lumber by pacing the building.

X-in-12 mode. 6 means 6 in 12. Half-steps and decimals are fine for reading an existing roof.
Degrees mode. Measured from horizontal.
Rise and run mode only. Vertical height gained over the run below.
For a common rafter on a gable this is half the building width, measured to the centre of the ridge, not the full span.
How far the eave sticks out past the wall measured level, not along the slope. Set to 0 for no overhang.
Half of this is taken off the rafter at the top, because the run was measured to the ridge centreline. A 2x ridge is 1.5 in. Set to 0 if the rafters meet each other.
Optional — only used to total the lumber
Rafter Length Calculator — Common Rafter, Roof Pitch and Plumb Cut AnglesBuildFigure

Run, rise and why the rafter is always longer than both

Roof geometry is one right triangle repeated. The run is the horizontal distance the rafter covers, the rise is the height it gains over that distance, and the rafter itself is the hypotenuse. For a common rafter on a plain gable, the run is half the building width measured to the centre of the ridge, not the full span, and getting that wrong doubles everything downstream.

Pitch is written as a rise in inches over a run of twelve inches. Six in twelve means the roof climbs six inches for every foot it travels sideways. That gives an angle of 26.565 degrees, and a rafter of 13.4164 inches for every twelve inches of run, because the square root of twelve squared plus six squared is 13.4164. Framers call that the unit length, and the whole calculation is that one number scaled up: twelve feet of run at six in twelve is 12 x 1.118034, which is 13.4164 feet, or 13 feet 5 inches to the nearest sixteenth.

PitchAngleRafter per 12 in of runRafter per foot of runGrade
2 in 129.46°12.1655 in1.0138 ft16.7%
3 in 1214.04°12.3693 in1.0308 ft25.0%
4 in 1218.43°12.6491 in1.0541 ft33.3%
5 in 1222.62°13.0000 in1.0833 ft41.7%
6 in 1226.57°13.4164 in1.1180 ft50.0%
7 in 1230.26°13.8924 in1.1577 ft58.3%
8 in 1233.69°14.4222 in1.2019 ft66.7%
9 in 1236.87°15.0000 in1.2500 ft75.0%
10 in 1239.81°15.6205 in1.3017 ft83.3%
12 in 1245.00°16.9706 in1.4142 ft100.0%

Two rows in that table are worth memorising because they come out exact. Five in twelve gives a rafter of exactly 13 inches per foot of run, and nine in twelve gives exactly 15, both of them 3-4-5 triangles in disguise. Twelve in twelve is 45 degrees and the rafter is the run times the square root of two.

The ridge deduction and the overhang

The line length is measured from the centreline of the ridge to the outside face of the wall, because that is where the theoretical triangle has its corners. Neither end of the real rafter lands there. At the top, half the ridge board thickness has to come off, and it comes off measured along the slope, not level: half of a 1.5 inch ridge is 0.75 inches of level distance, which is 0.84 inches of rafter at six in twelve. At the bottom, the overhang is added, and it is specified level almost every time, because what people care about is how far the eave projects past the wall. Same conversion, other direction.

Mixing up level and slope measurements at these two ends is the single most common arithmetic error in rafter layout, and it is not a rounding error. On a twelve in twelve roof, a level foot of overhang is seventeen inches of rafter.

Plumb cuts, seat cuts and the birdsmouth

A rafter has two cuts that matter and they are square to each other. The plumb cut is vertical once the rafter is in place, and it makes an angle with a line square across the rafter equal to the pitch angle: 26.57 degrees at six in twelve. That is the cut at the ridge, and it is also the cut at the tail if you want a vertical fascia. The seat cut is horizontal in place, which is the complement, 63.43 degrees from square, and that number is past the swing of most mitre saws. This is why rafters are laid out with a framing square or a speed square and cut with a circular saw rather than set up on a chop saw.

The birdsmouth is where the plumb and seat cuts meet to let the rafter sit down on the top plate. The seat length is normally the width of the plate, and the traditional caution is that the notch should not eat more than about a third of the rafter depth, because everything left above the notch is what carries the load down the slope. That proportion is a rule of thumb from carpentry practice, not a number this page can decide for you, and on an engineered rafter or a truss it does not apply at all: trusses are not notched, and cutting one voids its rating.

The same triangle, standing on its end

Every number on this page comes from rise, run and hypotenuse, which means the calculator does not actually know it is looking at a roof. Feed it a rise of 9 feet and a run of 10.83 feet and it will report the diagonal of a stair carriage. Feed it the rise and reach of a knee brace and it will report the brace length and both end cuts. The bare triangle section near the bottom of the results exists for that reason. If you are laying out stairs specifically, the stair stringer calculator handles the part that roof geometry does not: dividing a total rise into equal risers, which is where stairs get their own set of problems.

What none of this covers is whether the rafter is strong enough. Length, angle and cut settings are pure geometry and they are exactly right. Depth, species, grade, spacing, and what the roof carries in snow and wind are load questions, they vary by where you are building, and they belong with a span table published for your area or with someone qualified to size the member. A roof that is cut perfectly and sized wrongly still fails.

Questions people ask

What is the rafter length for a 6/12 pitch over a 12 foot run?

Thirteen feet five inches, or 13.4164 feet to be exact, measured as the line length from the ridge centreline to the outside of the wall. The arithmetic is 12 x the square root of 1 + 0.5 squared, which is 12 x 1.118034. Off that you deduct half the ridge board thickness measured along the slope, which is about 0.84 inches for a 1.5 inch ridge, and to it you add the overhang converted the same way, which is 13.42 inches of rafter for a level foot of eave. A twelve foot run at 6/12 with a foot of overhang and a 2x ridge therefore takes a rafter about 14 feet 6 inches long, which means buying 16 foot stock.

How do I convert roof pitch to degrees?

Take the arctangent of the rise divided by the run. A 6 in 12 pitch is arctan(6/12), which is 26.565 degrees. A 4 in 12 is 18.435, an 8 in 12 is 33.69, and a 12 in 12 is exactly 45. Going the other way, multiply the tangent of the angle by 12 to get the rise per foot: a 30 degree roof is tan(30) x 12, which is 6.93 in 12, close to but not the same as a 7 in 12. That gap is why roofs get specified in twelfths rather than degrees on this side of the Atlantic. The mode selector on this page takes either one.

Is the run the whole width of the building?

No, and this is the mistake that costs people a truckload of lumber. For a common rafter on a symmetrical gable, the run is half the total span, measured from the outside of the wall to the centreline of the ridge. A 24 foot wide building has a 12 foot run for each side. If the roof is not symmetrical, each side has its own run and the two rafters are different lengths even though the ridge is one board. Measure to the ridge centre and let the calculator take off the half thickness, rather than measuring to the face of the ridge and then wondering which half you already accounted for.

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

The plumb cut is the pitch angle from square, so 26.57 degrees at 6 in 12, and the seat cut is its complement at 63.43 degrees. In practice almost nobody sets a saw to those numbers. The plumb line is scribed with a speed square laid on the pitch mark or a framing square set to the rise and run on its two legs, and cut freehand with a circular saw, because the seat cut is beyond most mitre saw swings and because you have to mark the birdsmouth on the board anyway. The degree figures are still worth having for checking your layout and for anything you do cut on a mitre saw, such as a plumb-cut fascia.

Does this work for hip and valley rafters?

Not directly. A hip or valley runs diagonally across the plan, so its run is longer than the common rafter run by a factor that depends on the plan angle, and on a regular hip meeting at 90 degrees that factor is the square root of two. The usual shorthand is that a hip rafter has a unit run of 16.97 inches instead of 12, so a 6 in 12 roof gives a hip unit length of about 18 inches per unit run rather than 13.42. Jack rafters then step down by a constant amount along the hip. You can get the hip length out of this page by entering the diagonal run and the rise directly in rise-and-run mode, but the cheek cuts are a separate layout problem this calculator does not cover.

How much overhang should a roof have?

That is a design and exposure question rather than an arithmetic one. Common residential eaves run somewhere between 12 and 24 inches, wider in wet climates where the point is keeping water off the walls and away from the foundation, narrower where wind uplift is the bigger concern. What matters for this calculator is only that you enter the level projection, which is how eaves are almost always specified and drawn, and let it convert to the slope length. Enter a slope measurement in the level field and your rafters come out short by the pitch factor.

Related