Framing & Lumber Calculator

Studs per wall, rafter length, header size, board feet and lumber cost - the foundational math behind any framing or carpentry project.

How many studs do I need for a 20 ft wall? How do I calculate rafter length from rise and run? What size header for a 4 ft window opening? These framing and lumber calculators cover the foundational math for every framing job and project lumber takeoff: stud count by wall length and on-center spacing, rafter length and angles from pitch, IRC header sizing tables, board feet for hardwood and rough lumber, and total lumber cost across all common dimensional sizes. Use them for room additions, garage builds, shed framing, roof repairs or just to budget a Home Depot run before you go.

Frequently asked questions

At 16 in on-center spacing, 16 field studs (240 in / 16 + 1 starter). Add 4 studs per opening (king + jack each side, plus cripples) - one door + two windows adds 12. Plus 3 corner studs. Total: 31 studs. Round up to 35 to allow for cut waste and culled bows.

Rafter length = sqrt(run^2 + rise^2). For a 12 ft run with 6/12 pitch (6 ft rise): rafter = sqrt(144 + 36) = 13.42 ft. Subtract half the ridge board thickness from the run first, then add the eave overhang length along the slope. The calculator handles all of this plus the plumb and seat cut angles.

Non-load-bearing or single-floor load-bearing wall: two 2x8. Two-story load-bearing with floor and roof above: two 2x10. Per IRC R602.7 prescriptive tables (Doug fir-larch #2, 28 ft building width). For openings over 8 ft or unusual loads, use an engineered LVL beam.

Board feet = (thickness in inches × width in inches × length in feet) ÷ 12. A 1x6x8 ft board = (1 × 6 × 8) / 12 = 4 board feet. A 2x4x8 ft stud = 5.33 board feet. Hardwood is almost always priced per board foot; construction lumber by the piece.

In normal markets: 2x4x8 ft SPF $4-6, 2x6x8 ft $7-10, 2x8x8 ft $10-14, 2x10x12 ft $18-25, 2x12x16 ft $35-45. Pressure-treated is 30-50% more than untreated. Prices spike during housing booms. The lumber cost calculator totals your specific order at current prices and computes the implied cost per board foot.

All framing & lumber tools

Need other tools? Explore our recipe scaling calculator, pan size converter, ingredient substitution calculator, cooking time converter and ingredient weight calculator, or browse our length converter, weight converter and temperature converter.