How the cut list optimizer works
A plain-language description of what the calculators on this site do with your numbers, how they pick a layout, and where they can fall short.
The short version
For sheet goods, the optimizer builds dozens of complete cutting plans with different, well-studied packing rules, using only straight edge-to-edge cuts, and keeps the best plan by a fixed list of priorities. For boards it does the same with one-dimensional methods, including a search for the combination of pieces that fills each board best. Everything runs in your browser, and the same input always gives the same result.
Why it can't simply try every layout
Cutting rectangles from sheets is a version of the bin packing problem, a classic hard problem in computer science: there is no known method that finds a provably best answer quickly for every job, and the number of possible arrangements grows explosively with the number of parts. Practical optimizers, including this one, use heuristics: fast rules that produce good layouts without proving that nothing better exists. That is why this site calls its layouts near-optimal, not optimal.
Sheet goods: guillotine packing
Every layout is a guillotine layout: each cut runs straight through the piece being cut, from one edge to the opposite edge. That matches how table saws, track saws, circular saws and panel saws work, so every diagram can be cut in an ordinary shop.
The optimizer builds a sheet like this:
- Start with the usable part of the sheet (the sheet minus the edge trim) as one free rectangle.
- Take the next part and choose a free rectangle for it, using one of the placement rules below.
- Put the part in that rectangle's top-left corner and split the rest of the rectangle with one straight cut into at most two smaller free rectangles, leaving one kerf between the part and each of them.
- Repeat until no remaining part fits, then start a new sheet.
Free rectangles are never merged, because every free rectangle is a real piece of plywood you can pick up: the offcuts listed in your result are exactly these rectangles.
The rules it tries
- Where to put the next part (3 rules): the free rectangle that leaves the least area unused (best area fit), the one whose shorter leftover side is smallest (best short side fit), or the one whose longer leftover side is smallest (best long side fit). Ties go to the topmost, then leftmost, rectangle.
- How to split the space left beside a part (6 rules): cut along the shorter or the longer leftover side; cut so as to keep one large leftover or two more evenly sized ones; or always cut crosswise first, or always lengthwise first.
- Which parts to place first (4 orders): largest area, longest side, largest perimeter, or widest first.
That makes 3 × 6 × 4 = 72 strategies. These rules are described in Jukka Jylänki's survey "A Thousand Ways to Pack the Bin" (2010), a practical reference on rectangle packing.
Several stock sizes
When you list more than one sheet size, each strategy decides sheet by sheet: it fills one sheet of every available size with the remaining parts and keeps the one that places the most part area per dollar, or per unit of sheet area if any size has no price. Sheet quantities you enter are respected; parts that don't fit on the stock you have are reported as out of stock.
More than one plan per strategy
Each of the 72 strategies builds a complete plan on its own. The optimizer also builds a combined plan that, sheet by sheet, keeps the best fill any strategy found, including fills that start with a different first part, since the first piece on a sheet shapes every cut after it. For jobs of up to about 170 parts it then retries that combined plan with the part order lightly shuffled: up to 24 times for small jobs, fewer as the job grows. The shuffles come from a generator with a fixed seed, so they are the same every time, and the retries stop early once a plan provably can't be beaten: one sheet size and no more sheets than the total part area requires.
How the best plan is chosen
Plans are compared in this order:
- Fewest parts left unplaced.
- Lowest total cost, when every sheet used has a price.
- Least total sheet area.
- Fewest sheets.
- Largest single offcut, because one big leftover is more useful than several small ones.
Plans that tie on all five keep the earlier one in a fixed order, so results never change from one run to the next. A tidy-up pass then tries to re-cut the contents of two sheets, or of the three or more emptiest sheets, onto a single cheaper or smaller sheet, and to move each sheet's parts onto a smaller or cheaper stock size where they all still fit. If that frees up stock, it tries again to place any parts that had run out of stock.
Boards: one-dimensional cutting
For lumber and other material cut to length, each piece uses its length plus one kerf, and each board can hold its usable length plus one kerf, because the last piece doesn't need a cut after it. The calculator runs several methods and keeps the best plan:
- First-fit decreasing: longest pieces first, each into the first board with room.
- Best-fit decreasing: longest first, each into the board where it leaves the least room.
- Best fill per board: board by board, a search for the combination of remaining pieces that fills the board most completely, with a variant that always includes the longest remaining piece. The search stops after a fixed amount of work on very large jobs.
With several board lengths, the methods are run with different ways of picking the length of each new board: the longest available, the one that holds the most piece length for its price, or the one that looks cheapest for finishing the whole job. Each plan is then "downsized": every board is switched to a cheaper or shorter length that still holds its pieces. Plans are compared by fewest unplaced pieces, then lowest cost (or, unless every board length has a price, least total board length), then fewest boards, then the longest single offcut.
Kerf, trim and grain
- Kerf is left between every pair of neighboring parts and between a part and an offcut, but not at the trimmed edge of a sheet or the end of a board.
- Trim is removed from all four edges of every sheet, and from both ends of every board, before anything is placed. Parts can sit right against a trimmed edge, so the trim should include the kerf of the trimming cut. A part is too large if it doesn't fit inside the trimmed area in any allowed orientation.
- Grain: a sheet has grain along its length, or none. A grain-locked part keeps its length along a grained sheet's length. Parts that aren't locked, and all parts on sheets without grain, may be turned 90°.
- Waste percentage is the share of the full area (or length) of the stock used that doesn't end up in a part, so it includes trim, kerf and offcuts.
Units and rounding
The engine works in whatever unit you choose, inches or millimetres, and does its arithmetic in full precision. Lengths are compared with a tolerance of one millionth of a unit, so a part that fits exactly is treated as fitting despite floating-point noise. Inputs can be decimals, fractions (23 1/2, 23-1/2, ½), feet and inches (4' 6") or values with their own unit (600 mm, 60 cm). Results in inches are shown as fractions rounded to the nearest 1/16 in., and millimetre results are rounded to 0.1 mm. The rounding only affects what is displayed: the layout itself uses the sizes you entered, unrounded.
Limits
- Layouts are heuristic. They are good, but on some jobs a person can find a better one.
- Only guillotine layouts are produced. A CNC router can cut denser nested layouts that no table saw can, and this site doesn't model them.
- Parts are rectangles. Curves, angles and defects in the material aren't modeled; plan around a defect by entering the clear piece as separate stock.
- The optimizer lays out the sizes it is given. Allowances such as edge banding or parts cut oversize for later trimming need to be included in the part sizes.
- It doesn't plan the order of cuts or check your saw's capacity, such as how wide a rip your fence allows.
- Any part can go on any stock in a job, so plan different materials or thicknesses as separate jobs.
- Jobs are capped at 5,000 parts or pieces. To keep the page responsive on big sheet jobs, the shuffled retries are skipped beyond about 170 parts, and beyond about 1,000 parts only an evenly spread subset of the 72 strategies is run. Both limits come sooner when you list more than three sheet sizes.
How the engine is tested
The optimizer has automated tests. Hand-worked layouts check kerf gaps, trim, grain, stock limits and cost choices against numbers worked out on paper. Hundreds of randomly generated jobs are checked for parts that overlap, parts outside the trimmed sheet, gaps narrower than the kerf, grain violations, parts that go missing from both the layout and the unplaced list, and results that change between runs.
Accuracy and corrections
Figures in the guides are checked against the standards and manufacturer specs they link to, and the engine's behavior is checked by the tests described above. If you find an error, please report it; corrections are listed in the changelog.