MaterialCalc — Rafter Length & Cut Calculator
Estimate prepared 10/31/2026. Estimates only; verify against your plans before ordering.
Rafter Length & Cut Calculator
Enter your measurements and get both numbers: how much material the job takes, and what it costs in your state.
01 / 03Measurements
How big is it?
Measure to the outside. Round to the nearest half foot — nothing on a job site is exact.
Outside to outside. The run is half of this on a gable roof.
The ridge direction — sets how many rafters you need.
A rafter is the hypotenuse of a triangle whose base is half the building width and whose height is set by the pitch. That makes the length easy; what catches people is the ridge deduction and the overhang, both of which change the board you have to buy. This gives you the length, the plumb cut angle, the rafter count and the stock size.
Assumptions used
These are the numbers behind the result. Where one of them is soft, the cost range widens rather than pretending to a precision the data does not have.
- Pitch run base
- 12 in
- Stud spacing, 16 in on center
- 16 in o.c.
- Eave overhang
- 12 in
Roof pitch is always written as rise over a 12 in run.
SolidPublished product dataStandard roofing convention, checked 09/01/2026
SolidPublished product dataInternational Residential Code (2021), checked 09/01/2026
StandardIndustry standard, varies by supplierTypical residential detail, checked 09/01/2026
Prices verified 09/01/2026 (US national average, big-box retail shelf price and regional ready-mix quotes). Regional adjustment: Blended from RSMeans city cost index bands and BLS construction wage differentials.
The formula
Run = building width ÷ 2. Rafter length = run × √(1 + (pitch ÷ 12)²). The overhang is calculated the same way on its own run and added. Plumb cut angle = arctan(pitch ÷ 12). Rafter count = (roof length ÷ spacing + 1) × 2 for a gable roof.
Worked examples
24 ft wide building, 6/12 pitch, 12 in overhang
- Building width 24
- Roof pitch (rise per 12) 6
- Eave overhang 12
- Roof length 40
- Waste 10
12 ft of run gives a 13.42 ft body plus 1.12 ft of overhang — 14.54 ft total, so 16 ft stock. Plumb cut 26.6°.
28 ft wide, 8/12 pitch
- Building width 28
- Roof pitch (rise per 12) 8
- Eave overhang 16
- Roof length 48
- Waste 10
A steeper pitch lengthens every rafter — 14 ft of run becomes 16.8 ft of rafter. Pitch costs lumber, not just headroom.
20 ft wide shed roof at 4/12
- Building width 20
- Roof pitch (rise per 12) 4
- Eave overhang 12
- Roof length 24
- Waste 10
A shallow pitch is the cheapest roof to frame but sits right at the limit for conventional asphalt shingles.
Choosing materials
- Deduct half the ridge board thickness from the run before you cut — 3/4 in for a standard 1.5 in ridge. Every rafter is otherwise 3/4 in too long, and the roof ends up wider than the walls.
- Cut one rafter, test-fit it against the actual ridge and wall, then use it as the pattern. Buildings are never as square as the plan.
- The plumb cut at the ridge and the seat cut at the wall are both set by the same angle. A framing square or a speed square with the pitch marked does both without arithmetic.
- Pitch drives everything downstream. Above 4/12 you can use asphalt shingles conventionally; below that you need a low-slope underlayment or a different roofing material entirely.
- Buy the next stock length up, not the exact figure. Rafters need the tail cut after the seat cut is fitted, and there is no recovering from a board cut short.
Common questions
How do I calculate rafter length?
Take half the building width as the run, then multiply by the square root of 1 plus (pitch ÷ 12) squared. For a 24 ft building at 6/12 that is 12 × 1.118 = 13.42 ft, before the overhang and before deducting half the ridge thickness.
What is the plumb cut angle for a 6/12 roof?
26.6 degrees from vertical, which is arctan(6 ÷ 12). The same angle applies at the ridge plumb cut and in laying out the seat cut at the wall plate.
Do I subtract the ridge board from the rafter?
Yes — half its thickness, so 3/4 in for a standard 1.5 in ridge board. Measure the run from the outside of the wall to the centerline of the ridge, then take off that 3/4 in before cutting.
How far apart should rafters be?
Sixteen or 24 inches on center. Twenty-four uses a third fewer rafters but needs 5/8 in sheathing rather than 1/2 in, and gives a less rigid roof under snow load. Span tables set the maximum for your rafter size and load.
How many rafters do I need?
Divide the roof length by the spacing, add one for the closing rafter, then double it for a gable roof with rafters on both sides. A 40 ft roof at 16 in on center is 31 pairs — 62 rafters.
What size rafters do I need?
It depends on span, spacing, species and snow load. As a rough guide, 2x8 at 16 in on center spans about 13 ft in southern pine under moderate snow. Check the IRC rafter span tables for your actual conditions rather than guessing.
In this topic
Roof Framing Calculators — 2 calculators
Related guides
- Roof Trusses vs RaftersEngineered trusses are faster and cheaper on most roofs; stick framing wins where the attic has to be usable or the plan is complicated. What decides it.
- What Is a Roofing Square, and How Many Do I Need?A square is 100 square feet of roof — not of house. The pitch multiplier, three bundles per square, and why a 2,000 sq ft home has far more than 20 squares.
Related calculators
- Roof Truss Count & Cost CalculatorTruss count, bracing and delivered cost for a roof.
- 16 vs 24 On-Center Stud Cost CalculatorWhat wider stud spacing saves, and what it costs elsewhere.
- Floor Joist Span CalculatorThe smallest joist that clears your span, and what it costs.
- Framing Lumber Cost EstimatorBoard feet, piece count and cost for a framing order.
- Stair Stringer Layout CalculatorRiser height, tread depth, stringer length and lumber cost.
- Wall Stud Count & Lumber Cost CalculatorStud count, plates and lumber cost for a framed wall.