Skip to main content
CalcMax

Rafter Length Calculator

Range: 2 ft – 60 ft

Range: 1 – 24

Range: 0 ft – 5 ft

Range: 0 in – 12 in

Result

15.02 ft

Rafter length in feet

Rafter run in feet
11.94 ft
Total rise in feet
5.97 ft
Pitch angle in degrees
26.57 °

Rafter length calculator: work out how long one rafter is from the building width, the roof pitch, the overhang and the thickness of the ridge. The rafter run is half the span once the ridge is taken off, the rise follows from the pitch, and the sloped length is the diagonal of those two plus the overhang carried up the same slope. The angle is a property of the pitch alone, so it does not move when the building gets wider. The defaults — a 24 ft wide building at 6/12 with an 18 in overhang and a 1.5 in ridge — give a rafter of 15.02 ft cut at 26.57°, with 11.94 ft of run and 5.97 ft of rise.

Pitch, angle and rafter length per foot of run

Roof pitchAngleRafter per foot of run (in)
3/1214.0412.37
4/1218.4312.65
5/1222.6213
6/1226.5713.42
8/1233.6914.42
10/1239.8115.62
12/124516.97

The third column is the slope factor in inches: multiply the run in feet by it and you have the sloped length in inches, before the overhang. The pairs are worth reading together — 5/12 gives exactly 13 in per foot while 6/12 gives 13.42, and the angle column gains 4.4° from 3/12 to 4/12 but only 2.6° from 10/12 to 12/12, so the angle flattens out as the pitch climbs. Note what does not appear here: the building width. Every number in this table is a property of the pitch alone, which is why the same row serves a porch and a warehouse.

Formula

run = ( span − ridge ) ÷ 2 rise = run × pitch ÷ 12 rafter = √( run² + rise² ) + overhang × √( 1 + ( pitch ÷ 12 )² ) angle = arctan( pitch ÷ 12 )

span
Building width from outside face to outside face, in feet — the full span the roof crosses, not half of it
pitch
Roof pitch as rise per 12 in of run, in inches — 6 means 6 in of rise for every 12 in across, which is the same as a 50% slope
ridge
Thickness of the ridge board in inches, subtracted from the span because the two rafters meet on either side of it
overhang
Horizontal projection of the eave beyond the wall in feet — a horizontal distance, which is why it is carried up the slope rather than added as it is
run
Horizontal run of one rafter, from the outside of the wall to the face of the ridge
rise
Vertical rise of one rafter, which is the run multiplied by the pitch over 12 — rise and run are the two sides whose diagonal is the sloped length
rafter length per foot of run
The slope factor, in inches of rafter per foot of run: 12.65 at 4/12, 13.42 at 6/12, 16.97 at 12/12 — multiply the run by it and add the overhang

Measure the building across its width first — the full span, because the page halves it — then settle the pitch, which is the one input that is a design decision rather than a measurement: 4/12 is the low end for asphalt shingles, 6/12 is the residential default, and anything above 9/12 is usually a look rather than a necessity. Enter the ridge thickness if you know it, since a 1.5 in ridge moves the rafter by 3/4 in at each end. The overhang is worth a moment as well: it is a horizontal distance, so 18 in of eave on a 6/12 roof is 20.1 in of rafter, and the page does that conversion for you. Read the outputs as a cutting list for one rafter: the length is measured along the top edge, the angle is what you set a mitre saw or a speed square to, and the run and rise are there to check the arithmetic against the roof you are looking at. Then count how many you need — and remember the common rafter is the easy one; hips, valleys and jacks each have their own length.

Worked examples

  1. A 24 ft wide building at 6/12, 18 in overhang, 1.5 in ridge

    1. Ridge in feet: 1.5 in = 0.125 ft, so the run is (24 − 0.125) ÷ 2 = 11.9375 ft
    2. Rise: 11.9375 × 6 ÷ 12 = 5.96875 ft
    3. Sloped length over the run: √(11.9375² + 5.96875²) = 13.3465 ft
    4. Slope factor: √(1 + (6 ÷ 12)²) = 1.11803, so the overhang adds 1.5 × 1.11803 = 1.6771 ft
    5. Rafter: 13.3465 + 1.6771 = 15.0236, reported as 15.02 ft
    6. Angle: arctan(6 ÷ 12) = 26.565°

    The defaults, and the two places where this page differs from a quick online answer. Taking the ridge off the span costs 3/4 in of rafter at each end — small, and on a 6/12 roof it is 0.84 in of length, but a rafter cut long sits proud of the ridge and one cut short leaves a gap. And the overhang is a horizontal 18 in, which is 20.1 in along the rafter: carrying it up the slope rather than adding it flat is worth about 2 in on this roof and more on a steep one.

  2. A 32 ft wide building at 8/12, 2 ft overhang

    1. Run: (32 − 0.125) ÷ 2 = 15.9375 ft
    2. Rise: 15.9375 × 8 ÷ 12 = 10.625 ft
    3. Sloped length: √(15.9375² + 10.625²) = 19.1545 ft
    4. Slope factor at 8/12: 1.20185, so the overhang adds 2 × 1.20185 = 2.4037 ft
    5. Rafter: 19.1545 + 2.4037 = 21.5582, reported as 21.56 ft

    A steeper roof on a wider building, and the rise is now most of the run: 10.63 ft up against 15.94 ft across. That is the point where a rafter stops being something you carry and becomes something you lift with two people and a rope, and it is also the point where a 2 ft overhang adds 2.4 ft of board. Note the run is what the span halves to, not what the building is: entering 32 as the run would give a rafter for a 64 ft building.

  3. A 20 ft wide building at 12/12, no overhang, no ridge

    1. Run: 20 ÷ 2 = 10 ft, with no ridge to subtract
    2. Rise: 10 × 12 ÷ 12 = 10 ft
    3. Sloped length: √(10² + 10²) = 14.1421 ft
    4. Overhang is zero, so nothing is added
    5. Angle: arctan(12 ÷ 12) = 45°

    A 12/12 pitch is a 45° roof, and the arithmetic turns into the one case everybody can check by hand: the rise equals the run and the rafter is that times √2. Both zero inputs are legal here and neither is legal everywhere — a zero ridge is a roof framed against a beam rather than a board, and a zero overhang is a wall-flush eave. Note that the angle depends only on the pitch: at 12/12 it is 45° whether the building is 20 ft wide or 200.

Limitations

This page cuts one common rafter and does not frame a roof. It does not design anything: it will happily give you a 21 ft rafter for a 32 ft span, and whether that rafter in that size can carry the snow load is a question for a span table and a code book, not this page. It does not model hips, valleys, jack rafters, ridge beams or the birdsmouth notch at the wall plate — the notch in particular shortens the effective rafter and changes the seat cut, and every one of those is a separate calculation. The pitch is a single constant slope, so a roof that changes pitch at a break has two answers and needs two runs of this page. It has no opinion on sheathing, underlayment, ventilation or eave details, and it does not convert a rafter length into a lumber order: a 15.02 ft rafter comes out of a 16 ft board, and the offcut is waste.

Frequently asked questions

How do you work out rafter length?
Halve the span, subtract half the ridge thickness, and that is the run. Multiply the run by the pitch over 12 to get the rise, then take the diagonal of the run and the rise — or multiply the run by the slope factor, which is the same thing. Add the overhang multiplied by that same factor and you have the rafter. For a 24 ft building at 6/12 with an 18 in overhang: run 11.94 ft, rise 5.97 ft, rafter 15.02 ft.
Why do you subtract the ridge thickness?
Because the ridge takes up part of the span. Two rafters meet on opposite faces of it, so each one runs to the face of the ridge rather than to the centre line — which makes the run (span − ridge) ÷ 2. On a 1.5 in ridge that is 3/4 in per side, worth about 0.84 in of rafter length at 6/12. It is small, and it is the difference between a rafter that sits tight against the ridge and one that has to be trimmed in place.
Is the overhang measured horizontally or along the rafter?
Horizontally, and the page converts it: an 18 in overhang on a 6/12 roof adds 20.1 in to the rafter, because the rafter runs up the slope. Enter the horizontal projection — the distance from the wall face to the outside of the fascia, measured level — and let the slope factor do the rest. On a 12/12 roof an 18 in overhang adds 25.5 in, so the steeper the roof the more the eave costs.
What does 6/12 mean?
Six inches of rise for every 12 in of horizontal run, which is a 50% slope — the same as saying i = 0.5 in metric drawings. It is the residential default: steep enough to shed water with ordinary shingles, shallow enough to walk on. This page takes the pitch as the number over 12, so enter 6 for 6/12, and the angle it reports (26.57°) is what a mitre saw or a speed square is set to.
Does the building width change the angle?
No — the angle is a property of the pitch alone. A 12/12 roof is cut at 45° whether it spans 20 ft or 200, and a 6/12 is 26.57° either way. What the width changes is the run, the rise and the length of the board. That is why the angle is worth setting the saw to once and reusing, while the length has to be worked out for every span on the drawing.
What pitch do I need for a gable roof?
There is no single answer, because pitch is chosen by what covers the roof rather than by the roof itself: 4/12 is about the minimum for asphalt shingles, 3/12 and below needs a membrane or standing seam, and 6/12 to 8/12 covers most houses. Anything above 9/12 is usually a design decision, and it costs material — a 12/12 roof has 41% more surface than the floor beneath it, while a 3/12 has only 3%.

References

Related calculators