Roof Pitch and Rafter Length Calculator

Rafter length for a two-slope gable roof from its width and pitch, ridge deducted once, and the boards to buy, worked out against the lengths your own yard stocks.

Showing US units

Rafter stock to order EXAMPLE64 boards16 ft each, size not chosen: a span table sets itand 3 boards (14 ft each, depth not chosen) of ridge board

An answer marked EXAMPLE is worked out from the page’s sample values. Type your own over the values marked SAMPLE to make it yours.

ftSAMPLE

Measured from the outside face of one side wall’s framing, at the outer edge of its top plate to the same face of the other side wall, level, not up the roof surface. A tape run up the slope gives a longer board on every rafter and nothing on this page would look wrong; measuring to the inside faces gives a short one. The eave overhang is measured from this same line. THISisCarpentry’s worked example measures the width to the outside of the sheathing instead; the board comes out the same either way, as long as the eave overhang is measured from the same line.

SAMPLE

A “6 in 12” roof rises 6 inches for every 12 inches you travel level. It is a ratio, so the same number describes the roof whichever units you are working in.

in

Taken from the ridge board itself, measured across its thickness. A nominal 2x ridge is dressed to 1½ inches (38.1 mm), not 2 — entering the nominal size takes an extra half inch (13 mm) off the width, so every rafter comes out about a quarter inch (6 mm) SHORT. Enter 0 if the rafters meet without a ridge board. Starts at 1.5 in, the figure the American Wood Council publishes for a nominal 2x board, dressed.

ftSAMPLE

Measured from the outside face of the wall framing to the end of the rafter tail, level, starting from the same line the building width is measured to. It climbs the slope like the rest of the rafter. The overhang at the gable ends, the rake, is a different measurement and is not counted.

ftSAMPLE

Measured from the outside face of one gable-end wall’s framing to the outside face of the other, along the ridge line. The roof’s overhang past the gable ends, the rake, is not part of this length, and the ridge board here runs from end wall to end wall.

The four spacings the published span tables are drawn for.

Starts at 16 in — one of the four spacings the American Wood Council’s span tables are drawn for, and a starting point the calculator picked, not a recommendation: the plans or the building department decide which one a roof uses. Source

There is no national list. The standard permits one-foot and two-foot multiples and leaves the rest to the grading rules, so these are two publishers’ ranges — ask your yard.

Starts at 8 to 20 ft — the narrower of the two published length ranges, South Coast Lumber Co.’s, so the count does not assume a board a yard may not stock. Source

Applies to Rafter stock.

Starts at 0 spares — this calculator’s own starting point, not a published figure. None of the lumber publishers this calculator cites prints how many spare boards to buy, so the calculator adds none rather than invent one. Change it to how many rafters might be cut wrong.

Applies to Ridge board.

Starts at 0 spares — this calculator’s own starting point, not a published figure. None of the lumber publishers this calculator cites prints how many spare boards to buy, so the calculator adds none rather than invent one. Change it if a spare length of ridge on site is better than splicing a short one.

Result

Rafter stock to order EXAMPLE64 boards16 ft each, size not chosen: a span table sets it

Length to cut, along the edge of the board from the plumb cut at the ridge to the plumb cut at the tail, overhang included 15 ft 1/4 in

Ridge board 3 boards (14 ft each, depth not chosen)

A 24 ft wide, 40.4 ft long gable at 6 in 12 with an 18 in eave, at the rafter spacing chosen above.

Rafter stock — how the quantity was worked out
The job needs961.51 ft
Cutting64 pieces of 15 ft 1/4 in — 1 from each 16 ft board, leaving 11 11/16 in on each, enough for the slant of the plumb cuts, 5 5/8 in on a rafter as deep as a 2x12 at this pitch
Buying 64 boards (16 ft each, size not chosen: a span table sets it) yields1,024.00 ft
Left over62.49 ft: offcuts cut away from the 64 boards, not spare boards

Whole boards only, and the calculator picks the stock length that leaves the least behind once each board holds its rafters and the slant of their plumb cuts — a shorter board is not always cheaper once it stops yielding two rafters.

Counted for a two-slope gable roof, both slopes at the same pitch: 32 rafters on each slope, with one on each end wall. A roof that slopes one way only (a shed roof or lean-to) is not counted here: its rafters run the full width of the building.

Not counted in these quantities: rafters for hips, valleys and dormers; ceiling joists, rafter ties or collar ties, and the blocking between rafters; fascia; hangers, straps and other metal connectors; roof sheathing; the gable-end (rake) overhang — the barge or fly rafter at its edge, any outlookers or lookout blocks under it, and any ridge board run past the end walls.

The ridge is counted in whole boards of one length taken from the range, spliced where the run is longer — this calculator’s own choice, not a publisher’s: no lumber publisher this calculator cites prints a board length for a ridge.

Rafter line length, along the edge from the plumb cut at the ridge to the plumb line at the outside of the wall framing13 ft 4 3/16 in

Run of one rafter, level — outside of the wall framing to the face of the ridge board11 ft 11 1/4 in

Rise of one rafter, plumb — outside of the wall framing to the face of the ridge board5 ft 11 5/8 in

Rafters, both slopes64

  • This is a length and a count, not a strength check. Whether a given size, species and grade can carry the load at this spacing is a separate question, answered by published span tables such as the American Wood Council’s, in the source list below, and it is worth settling before anything is cut. Source
  • Each board has to be longer than the length to cut by the slant of the two plumb cuts: the rafter’s depth times its rise for every 12 of run, divided by 12. The size is not chosen here, so the board picked keeps that much for a 2x12, the deepest size in the American Wood Council’s span tables, and the cutting line says how much. A 2x8 at 6 in 12 needs 3 5/8 inches of it. Source

The printed list carries the cut length, the board count and the conditions they came from.

Roof Pitch and Rafter Length Calculator

ConcreteTally

EXAMPLE — not a measured job. Every quantity below is worked out from this page’s sample measurements. Enter the real measurements and print it again before anyone orders from it.

Job / customer
Deliver to

Length to cut, along the edge of the board from the plumb cut at the ridge to the plumb cut at the tail, overhang included: 15 ft 1/4 in

What to buy

MaterialBuyWhich isLeft over
Rafter stock64 boards (16 ft each, size not chosen: a span table sets it)1,024.00 ft62.49 ft: offcuts cut away from the 64 boards, not spare boards
Ridge board3 boards (14 ft each, depth not chosen)42.0 ft1.6 ft
This calculator’s own choicesThe ridge is counted in whole boards of one length taken from the range, spliced where the run is longer — this calculator’s own choice, not a publisher’s: no lumber publisher this calculator cites prints a board length for a ridge.

Rafter stock: cut 64 pieces of 15 ft 1/4 in — 1 from each 16 ft board, leaving 11 11/16 in on each, enough for the slant of the plumb cuts, 5 5/8 in on a rafter as deep as a 2x12 at this pitch.

Counted for a two-slope gable roof, both slopes at the same pitch: 32 rafters on each slope, with one on each end wall. A roof that slopes one way only (a shed roof or lean-to) is not counted here: its rafters run the full width of the building.

Not counted in these quantities: rafters for hips, valleys and dormers; ceiling joists, rafter ties or collar ties, and the blocking between rafters; fascia; hangers, straps and other metal connectors; roof sheathing; the gable-end (rake) overhang — the barge or fly rafter at its edge, any outlookers or lookout blocks under it, and any ridge board run past the end walls.

This sheet does not say what SIZE to buy — 2x8, 2x10 and so on. That is a load and span question, answered by the American Wood Council’s 2024 Span Tables for Joists and Rafters, which is in the source list at the end of this sheet; this calculator does not answer it. Write the size on before handing this over. Each board also keeps room for the slant of the plumb cuts at its ends, worked out for a rafter as deep as a 2x12.

Size to buy — this calculator does not answer it

Worked out from

Building width, across the raftersMeasured from the outside face of one side wall’s framing, at the outer edge of its top plate to the same face of the other side wall, level, not up the roof surface.24 ft (sample)
Pitch — rise for every 12 of level run6 (sample)
Ridge board thicknessTaken from the ridge board itself, measured across its thickness.1.5 in
Eave overhang, measured levelMeasured from the outside face of the wall framing to the end of the rafter tail, level, starting from the same line the building width is measured to.1.5 ft (sample)
Building length, along the ridgeMeasured from the outside face of one gable-end wall’s framing to the outside face of the other, along the ridge line.40.4 ft (sample)
Rafter spacing, on center16 in
Lengths your yard stocks8 to 20 ft — South Coast Lumber’s range
Amount needed — Rafter stock961.51 ft
Amount needed — Ridge board40.4 ft
Spare boards for a bad cut — Rafter stocknone — this calculator’s own starting point, not a published figure. None of the lumber publishers this calculator cites prints how many spare boards to buy, so the calculator adds none rather than invent one.
Spare ridge boards — Ridge boardnone — this calculator’s own starting point, not a published figure. None of the lumber publishers this calculator cites prints how many spare boards to buy, so the calculator adds none rather than invent one.

Estimates only — check quantities before you buy. Confirm with a licensed contractor or your local building official before ordering.

Where these figures come from

A number in brackets after a figure on this sheet is its entry in this list.

  1. Standard lumber lengths — multiples of one foot or two feet (Voluntary Product Standard PS 20-20, clause 5.3.1 "Standard" under 5.3 Lengths, printed page 13 (PDF page 13)) — U.S. Department of Commerce, National Institute of Standards and Technology — Voluntary Product Standard PS 20-20, American Softwood Lumber Standard, Government publication. Effective from 2020. PS 20-20 carries the year 2020 in its designation; the document cited is that edition. Retrieved August 28, 2026.
  2. A board is never shorter than the length it is sold as (Voluntary Product Standard PS 20-20, clause 5.3.2 "Trimmed", printed page 13 (PDF page 13)) — U.S. Department of Commerce, National Institute of Standards and Technology — Voluntary Product Standard PS 20-20, American Softwood Lumber Standard, Government publication. Effective from 2020. PS 20-20 carries the year 2020 in its designation. Retrieved August 28, 2026.
  3. Lengths one sawmill manufactures its green Douglas fir dimension lumber in — 8 to 20 ft (Green Doug Fir Timbers, Dimension & Studs — mill capability paragraph) — South Coast Lumber Co., Manufacturer or grower specification. A mill's product page carries no commencement date; current as of the retrieved date. Retrieved August 28, 2026.
  4. Length range a grading agency states dimension lumber is available in — 6 to 24 ft (Nominal Vs Actual Lumber Sizes — the paragraph on lumber lengths) — Southern Pine Inspection Bureau, Industry technical article. The article carries no commencement date; current as of the retrieved date. Retrieved August 28, 2026.
  5. Lengths over 20 ft need their supply confirmed before you plan around them (Span Tables for Joists and Rafters, 2024 Edition — the standing footnote printed beneath every span table (PDF page 19 is Table R-1)); A rafter's span is measured flat, not up the slope (Span Tables for Joists and Rafters, 2024 Edition — Explanation of Tables, section 5 SPAN MEASUREMENT (printed page 1, PDF page 7)) — American Wood Council, Trade association standard. Effective from 2024. The document is titled the 2024 Edition; it carries no month or day. Retrieved August 28, 2026.
  6. What a nominal 2x board actually measures, surfaced and dry (Span Tables for Joists and Rafters, 2024 Edition — Explanation of Tables, section 3 LUMBER SIZES (printed page 1, PDF page 7)); The rafter spacings the published span tables are drawn for (Span Tables for Joists and Rafters, 2024 Edition — the "Spacing (in)" column heading every rafter table (PDF page 19 is Table R-1)) — American Wood Council, Trade association standard. Effective from 2024. The document is titled the 2024 Edition; it carries no month or day. Retrieved October 11, 2026.
  7. What "6 in 12" means — inches of rise per twelve inches of level run (Framing square rafter tables — definition of roof slope); Published rafter length per foot of run at a 6 in 12 pitch — 13.42 in (Framing square rafter tables — common rafter length per foot of run); Each rafter is pushed out by half the ridge board's thickness (Framing square rafter tables — subtract half of ridge board thickness) — InspectAPedia (Daniel Friedman), Industry technical article. The article carries no commencement date; current as of the retrieved date. Retrieved August 28, 2026.
  8. Published rafter length per foot of run at a 16 in 12 pitch — exactly 20 in (Rafter Tables On A Framing Square — the worked reading of the first line of the framing-square rafter table) — Integrated Publishing (tpub.com), reproducing U.S. Army Engineer School subcourse EN5156, Industry technical article. The reproduction carries no commencement date; current as of the retrieved date. Retrieved August 28, 2026.
  9. Deducting the ridge — take the whole ridge thickness off the building width, once (Common rafter framing — working out the run); A published worked example — 6 ft 3/4 in wide, 6 in 12, 1-1/2 in ridge (Common rafter framing — the worked example on the author's construction calculator) — THISisCarpentry (article by Mike Sloggatt), Industry technical article. Effective from November 9, 2012. The article carries its own publication date. Retrieved August 28, 2026.

This list, with a link to each document: concretetally.com/roof-pitch-rafter-calculator/#sources-heading

Every table ConcreteTally reads, with its dates: concretetally.com/sources

Yards differ — check yours.

Where these figures come from

Every table ConcreteTally reads, with its dates: all sources.