Roof calculators
Rafter length and roof pitch.
Convert pitch formats on the roof pitch calculator when your plan shows 6/12, degrees, or percent slope. The rafter length calculator takes span, pitch, overhang, and birdsmouth depth to mark plumb and seat cuts on common rafters. It links back to board feet when you price the rafter stock you order.
Calculators
Featured guide
Common rafter length, pitch, and overhang Two roofs, worked from the span and the pitch to the board you pick up at the yard.What a roof order actually needs
A common-rafter order starts from three measurements you can take on the building, not from a pitch written on a napkin. For a gable roof the span is the level distance from the outside face of one wall to the outside face of the other. The pitch is the inches of rise in 12 inches of level run. The overhang is the level distance from that outside face to the plumb cut at the tail. Those three numbers, plus the ridge thickness and the wall-plate width, are enough for the rafter length calculator to print the line length, the birdsmouth, and the stock board to buy.
Take a 24 foot gable, a 6/12 pitch, a 1.5 inch ridge, a 12 inch level overhang, a 2x8 rafter, and a 2x4 wall plate. The run to the ridge is half the span minus half the ridge, which is 143.25 inches. The slope factor for 6/12 is 1.118. The common rafter, from the ridge plumb line to the building line, is 160.16 inches. The sloping overhang is 13.42 inches. The line length is 173.57 inches. After the page adds wood for the plumb cuts and a 2 inch allowance, the cut length is 179.20 inches, and the board to buy is 16 feet. The same inputs are the worked example on the calculator page. If your result differs, the input that moved is the one to remeasure.
Read the pitch before you trust the length
Pitch is not an angle until you convert it. A 6/12 roof rises 6 inches for every 12 inches of horizontal run. That is 26.57 degrees and a 50 percent slope. A 4/12 roof is 18.43 degrees. A 12/12 roof is 45 degrees. The roof pitch calculator turns a rise and a run, a degree reading, or a percent into the other forms and prints the slope factor the rafter length uses. Enter the pitch you measured. Do not enter the angle the speed square showed unless you have checked that the calculator’s degree matches it.
The slope factor is the square root of 144 plus the pitch squared, divided by 12. For 6/12 that is the square root of 180, divided by 12, which is 1.118. Multiply the horizontal run by that factor and you have the sloping length. The same factor stretches the level overhang into the tail. A steeper pitch does not change the span. It changes only this multiplier, and the board gets longer.
On the 24 foot gable above, dropping the pitch from 6/12 to 4/12 shortens the common rafter from 160.16 inches to about 151.00 inches before the overhang is added. That is more than 9 inches on the rafter alone. Ordering 6/12 stock for a 4/12 roof wastes the difference on every rafter. Ordering 4/12 stock for a 6/12 roof leaves every board short at the tail. Convert the pitch on the pitch calculator, then carry that pitch into the length calculator. Do not round 6/12 to “a bit over 25 degrees” and retype the angle from memory.
The ridge and the overhang change the run
Half of a 24 foot span is 144 inches. A 1.5 inch ridge takes 0.75 inch off that half, so the run the rafter actually covers is 143.25 inches. Leave the ridge at zero and the line length grows by the missing half-ridge times the slope factor. On a shed roof the run is the whole span minus the whole ridge, not half of either. A shed with no ridge board should be entered with the ridge at zero. Leaving the gable default of 1.5 inches on a shed shortens the run and the board.
Overhang is a level measurement. A 12 inch overhang means the tail lands 12 inches outside the wall, measured horizontally. Along a 6/12 slope that tail is 13.42 inches of wood. If you measure the sloping soffit and type that longer number in as the overhang, the calculator treats it as level and the tail comes out too long. Measure to the outside of the wall framing, not to the outside of the siding, and keep the tape level.
The birdsmouth on this rafter
The seat follows the wall plate until you edit it. A 2x4 plate is 3.5 inches wide, so the seat is 3.5 inches. The heel, the vertical face of the notch, is the seat times the pitch divided by 12. At 6/12 that heel is 1.75 inches. The notch depth is the seat times the sine of the slope angle, 1.57 inches on this rafter. A 2x8 is 7.25 inches deep, and one quarter of that depth is 1.81 inches. The 2021 IRC check on the calculator, R802.7.1, passes when the notch is not deeper than that quarter. This 1.57 inch notch passes. A deeper seat, or a shallower rafter, can fail the same check. The page does not decide that a 2x8 can carry the roof load. It only checks the notch and the bearing against the limits it prints.
The plumb cut the page prints for this 6/12 rafter is 63.43 degrees, which is 90 degrees minus the 26.57 degree slope. Mark the ridge plumb and the tail plumb with that relationship. The cut length adds the stock width times the tangent of the angle, plus 2 inches, to the line length, so the board covers both plumb cuts. Buying the 173.57 inch line length and ignoring that extra leaves the tail short. The 16 foot board covers the 179.20 inch cut length. Stock lengths on the page stop at 20 feet. A longer rafter shows no buy length.
What these calculators do not size
Span, species, grade, snow, and spacing decide whether a 2x8 at 16 inches on center is enough. This site does not publish a rafter span table and does not invent one. Use the span table in the code edition your city has adopted, or the table from the lumber association that matches the species you are buying. The calculator’s passing rows are the birdsmouth depth and the bearing checks it labels. A pass is not a permit, and it is not a statement that the rafter can carry the roof.
Count the rafters from the building length and the spacing only after the length of one rafter is settled. Price that stock on the board foot calculator when the yard sells by the board foot. The full layout, including a second worked roof, is written out in common rafter length, pitch, and overhang.
Mistakes that change the board
- Measuring the span inside the rooms, or to the outside of the siding, instead of outside face of framing to outside face of framing.
- Typing the sloping tail as if it were the level overhang.
- Leaving a 1.5 inch ridge on a shed that has no ridge board.
- Changing the pitch on one page and ordering from a length you calculated at the old pitch.
- Buying the line length and skipping the extra wood for the plumb cuts.
Last checked against the rafter solver used on the calculator: 24 foot span, 6/12, 1.5 inch ridge, 12 inch overhang, 2x8, 2x4 plate.
By Lumber Calc Editorial Team · Checked against the 2021 IRC & AWC DCA 6 · 2024 sections not yet verified · Last updated Nov 6, 2026