Linear Cut Optimizer

Cut boards, pipe, tube and extrusions to length with the fewest bars and the least scrap. Type your stock and your pieces, press Calculate, and take the cut list to the saw.

Units

Stock lengths (in)

Leave Qty empty if you will buy as many as you need. Enter a price for every length and the plan goes for the lowest cost. Give offcuts you already own a price of 0 and they get used first.

Pieces (in)

Feet and inches work: 8', 6' 2 1/2", 34 1/2. In mm you can type 6m. Paste rows from a spreadsheet (name, length, qty) into any piece field.

Press Calculate to see the cutting plan.

How to use it

  1. Enter what you buy or have on the rack. An 8 ft stud is 96", a stick of steel tube is usually 20 or 24 ft, and most aluminium extrusion comes in 6 m lengths. Leave Qty empty if the store has plenty.
  2. List the pieces with their finished lengths. 6' 2 1/2", 74.5 and 74 1/2 all mean the same thing.
  3. Set the kerf. A regular miter saw or table saw blade takes 1/8". A metal bandsaw is closer to 1/16", an abrasive chop saw about 3/32".
  4. Press Calculate. Each bar is drawn to scale with its pieces in cutting order, followed by a table with where each cut falls.

A real example

The example loaded above is the frame for a basic workbench out of 8 ft 2x4s: four 34 1/2" legs, four 57" long rails, four 21" short rails and six 19 1/4" shelf cleats. That adds up to 565 1/2". Divide by 96" and you would expect six studs. You can't do it in six. Every 57" rail needs its own stud, and what is left beside it (38 7/8" after the kerf) only takes two cleats or one leg. The optimizer says seven and proves that no plan does better. The seventh stud gives up one short rail and leaves a 74 7/8" piece for the next job.

Cutting as you go, it is easy to get this wrong. Start with the legs, two to a stud, and the 26" ends look handy until you notice nothing on the list fits them twice. On a small job that costs a stud and a trip back. On a steel job with 20 ft sticks of 2" square tube, one extra stick can be $60 or more.

Tips from the shop

  • Measure the real stock. A "16 ft" board is often 16' 1/2" and steel sticks run long by an inch or two. Enter what your tape says, then use end trim to clean up the first end.
  • Do not guess the kerf low. If the plan has a piece that ends right at the end of the bar, a kerf that is too small means that piece comes up short.
  • Cut the longest pieces on each bar first. The table lists them in that order, so the off-cut is always at the far end and stays in one piece.
  • Set a stop block when one length repeats across several bars. The "same cuts ×3" tag tells you how many bars share a pattern.
  • Buy one spare length on any job where a miscut would mean another trip to the yard.

How the plan is worked out

This is the cutting stock problem, and for 1D it is well studied. The optimizer starts with a quick plan that fills every bar as tightly as an exact subset-sum search allows, then improves it for about a second and a half. For jobs with one stock length it also computes a lower bound: if the plan reaches it, nothing better exists and the status line says so. Every plan is checked again before it is shown. Each piece must be there the right number of times, and no bar may come out longer than its stock once kerf and trim are added.

Cutting sheet goods instead? Use the cut list optimizer for plywood and sheets.

Questions people ask

What is a linear cut optimizer?

It works out how to cut a list of pieces from stock that only has a length: 2x4s, trim, pipe, square tube, angle, rebar or aluminium extrusion. You get the number of bars to buy and which pieces come out of each bar.

Does it count the saw kerf?

Yes. Enter your blade width and the plan leaves that much between every pair of pieces. The last piece may run right to the end of the bar, because no cut is needed there.

What is end trim for?

Lumber often has split or out-of-square ends, and steel from the yard can have a rough torch cut. End trim takes that much off the start of every length before the first piece. Leave it at 0 if your ends are clean.

Can I use offcuts I already have?

Yes. Add them as their own stock length with the quantity you have and a price of 0, and give new stock its real price. The plan uses the free pieces first and buys only what is missing.

Can I mix 8, 10 and 12 foot boards?

Yes. Add each length the store sells with its price. The optimizer then picks the cheapest mix. Without prices it uses the least total length.

Is the plan the best possible?

For most jobs, yes. When the plan uses as many bars as a proven lower bound, the status line says "proven". Otherwise you get the best plan found in about a second and a half, which is usually the optimum or one bar off it on very large lists.

Is my list sent anywhere?

No. The calculation runs in your browser. Your lengths and names stay on your device unless you share the link yourself.

Last reviewed 2026-11-04.