Framing

Lumber Calculator

Work out how many pieces of lumber a framing run needs, and the cost.

ft
in
ft
Leave at zero to skip the cost estimate.
Pieces needed
Estimated cost
Total linear feet ft

What you'll need to order

Prices vary by region and haul distance. Get quotes from at least two local suppliers.

How this calculator works

pieces = (run × 12 ÷ spacing) + 1

This counts members in a repeating run — studs, joists, rafters or purlins. It does not include the extra pieces needed at openings, corners and intersections.

Switch the site to metric — the control is in the footer — and your inputs, your results and the tables below follow. The formula, the constants, the guidance text and the sources stay in US units on purpose: that is how the standards they come from are written, and restating them would detach each figure from the document you are meant to be able to check it against.

Where these numbers come from

Standards are revised on a cycle. The edition above is the one this figure was checked against — confirm it against the edition your jurisdiction has adopted.

Worked example

With total run 24 ft, spacing on centre 16 in, length of each piece 10 ft, price per piece 8 , this calculator returns 19 .

Pieces needed for common repeating runs

Click through any row to load those measurements. The address bar keeps them, which makes the result something you can paste into a message.

JobSizePieces needed
Wall studs, 16 in centres 24 ft × 16 in × 8 ft × 6 19.00
Wall studs, 24 in centres 24 ft × 24 in × 8 ft × 6 13.00
Floor joists 30 ft × 16 in × 12 ft × 22 23.50
Rafters 40 ft × 24 in × 16 ft × 28 21.00
Fence rails 100 ft × 96 in × 8 ft × 7 13.50

This counts the repeating members only. Openings, corners and intersections need their own pieces on top.

Frequently asked questions

What are the actual dimensions of a 2x4?

One and a half by three and a half inches. Softwood is named by its rough sawn size before drying and surfacing, so every dimension loses half an inch. A 2x10 is really 1.5 by 9.25.

How much extra lumber should I order?

Around 10% on a framing package. Some boards will be too crowned, twisted or split to use, and offcuts rarely land where you need them. It is cheaper than a second delivery.

What lumber grade should I use for framing?

Stud grade for wall studs, and #2 or better for joists, rafters and beams. Span tables assume a specific grade — using a lower one invalidates the span you designed around.

Should I use pressure-treated lumber?

Anywhere in contact with concrete or soil, outdoors, or within 8 inches of grade. Sill plates on a foundation must be treated. Use fasteners rated for treated lumber or they will corrode through.

Put the lumber calculator on your own site

Free to use, on any site, commercial or not. No account, no tracking script, no expiry. Paste this where you want the calculator to appear:

<iframe id="calcpit-lumber-calculator" src="https://www.calcpit.com/embed/lumber-calculator/"
        title="Lumber Calculator" width="100%" height="870"
        style="border:1px solid #e2e2e2;border-radius:8px" loading="lazy"></iframe>
<p><a href="https://www.calcpit.com/calculators/lumber-calculator/">Lumber Calculator</a> by CalcPit</p>

<!-- Optional: shrinks the frame to fit. Safe to delete — the height above works without it. -->
<script>addEventListener("message",function(e){
  if(e.origin!=="https://www.calcpit.com"||!e.data||e.data.calcpit!=="lumber-calculator")return;
  var f=document.getElementById("calcpit-lumber-calculator");if(f)f.style.height=e.data.height+"px";
});</script>

Keep the credit line below the frame and we are square. That link is the whole payment.