Guillotine Cutting Generator
A panel saw cannot stop halfway and turn a corner: every cut runs edge to edge across whatever is in front of it. That single constraint rules out many layouts that look perfectly efficient on paper, because they would need an L-shaped cut nothing can make. This divides a sheet using only cuts that are physically possible, and shows them in the order they would be made.
What this generator does
Divides a sheet by repeatedly splitting a rectangle fully in two, either horizontally or vertically, until the requested number of pieces exists. Because every division is a full edge-to-edge cut, the resulting layout is guaranteed cuttable, and the cuts are listed in the order a saw would make them.
How to use this tool
- Set the sheet size and how many pieces to divide it into.
- Follow the cuts in order — each one splits a rectangle fully in two.
- Notice that every piece is a rectangle, and every boundary runs the full width or height of its region.
- Try to produce the same layout with a cut that stops halfway; you cannot.
Understanding the controls
- Sheet width
- The full width of the material before any cutting.
- Sheet height
- The full height of the material. A long thin sheet produces very different layouts from a square one.
- How many pieces
- Between 3 and 24. Dividing into n pieces always takes exactly n minus one cuts, whatever order they are made in.
- Seed
- Any word reproduces exactly the same cuts and the same layout.
Common use cases
- Planning cuts for sheet material — plywood, glass, board, metal
- Teaching the guillotine constraint and why it makes packing harder
- Generating cutting diagrams for a workshop exercise
- Test instances for a cutting-stock implementation
- Setting the same layout twice from a seed
How this generator works
Splitting recursively is what guarantees the constraint holds: a cut is applied to one rectangle and produces two, so no piece can ever be non-rectangular and no cut can ever need to stop partway. The check confirms the pieces tile the sheet exactly with no overlap and nothing left over, which is what a correct recursive division must produce.
Randomness and fairness
Where each cut falls, and whether it runs horizontally or vertically, are random; the constraint is guaranteed by construction. A seed reproduces the same layout exactly and is therefore explicitly not cryptographically secure. Without a seed the browser's cryptographically secure generator is used.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- This divides a sheet freely rather than fitting a list of required sizes, which is the harder and more useful problem.
- No saw kerf is modelled, so the pieces tile the sheet exactly where a real cut would consume a few millimetres each time.
- Whole-number sizes only.
- Cuts are shown in the order generated, which is not necessarily the most convenient order to make them.
- Nothing about the arrangement is kept, so seed one worth cutting to.
Privacy and your data
The sheet and every cut are worked out on your own device. Neither the layout nor your seed is transmitted or stored.
Related generators
- Strip Packing GeneratorRectangles packed into a fixed-width strip with no overlaps, measured against the height no packing could beat.
- Bin Packing Problem GeneratorPacking instances with bins of one size or several at different prices, each with an answer, a lower bound, and a plain statement of when the two meet.
- Quadtree GeneratorA region subdivided around clustered points, with the cells confirmed to tile it exactly and hold every point once.
- Masonry Layout GeneratorPacks tiles of varying heights into balanced columns and shows the result, with the uneven bottom edge that greedy packing genuinely leaves.