Lumber Cut Optimizer

Minimize waste, save money, and plan your cuts efficiently. Input your required pieces and available stock to get an optimized cutting plan.

Required Cuts
Stock Lumber
Optimizer Settings

Input your cuts and stock, then click "Optimize Cuts" to see your cutting plan.

How to Use the Lumber Cut Optimizer

This tool helps you get the most out of your lumber by planning cuts efficiently. Follow these steps:

  1. Enter Required Cuts: For each piece you need, specify its length, the quantity, and the unit of measurement. You can also add an optional label (e.g., "Table Leg") for easier identification. Mark critical pieces as "High Priority" to ensure they are planned first. Enable "Grain Match" if the orientation of the piece on the stock matters.
  2. Define Stock Lumber: List all the lumber boards you have available. For each type of stock, enter its length, quantity, unit, and optionally, its cost per foot or meter.
  3. Mark Defect Zones (Optional): For each stock board, you can specify areas that should not be cut due_to knots, cracks, or other defects. Enter the start and end position of each defect zone. The optimizer will work around these areas.
  4. Configure Settings:
    • Saw Kerf: Enter the thickness of your saw blade. This amount will be lost for each cut.
    • Minimum Usable Offcut Length: Specify the shortest piece of leftover wood you consider usable. Anything shorter will be classified as waste.
  5. Optimize Cuts: Click the "Optimize Cuts" button (or wait for automatic update). The tool will calculate the most efficient way to cut your required pieces from your available stock.
  6. Review Results:
    • Cutting Plan: Visual diagrams show how each stock board is cut.
    • Summary: Check total waste, material utilization, and estimated costs.
    • Unaccommodated Pieces: If any pieces couldn't be cut, they'll be listed here with suggestions.
    • Optimal Offcuts: A list of usable leftover pieces you can save for future projects.
  7. Download/Print: Use the buttons to get a PDF or print your cutting plan.

Optimization Principles Explained

This Lumber Cut Optimizer uses a sophisticated algorithm based on the "First Fit Decreasing" (FFD) heuristic, a common approach to solving the 1D cutting stock problem. Here's a simplified explanation:

  • Sorting Cuts: Required cuts are first sorted. High-priority cuts come first, then longer cuts are prioritized over shorter ones. This helps ensure that larger, often more critical, pieces find space.
  • Placing Cuts on Stock: The algorithm iterates through your available stock boards. For each board, it tries to fit the sorted required cuts one by one. It looks for the first available space (segment) on the board where a cut (plus saw kerf) will fit.
  • Defect Avoidance: If you've marked defect zones, the algorithm treats these areas as unusable, effectively splitting a stock board into multiple usable segments.
  • Minimizing Waste: By placing larger pieces first and then trying to fit smaller pieces into the remaining gaps (offcuts), the algorithm aims to reduce the amount of unusable leftover material.
  • Iterative Refinement: While not a perfect mathematical optimization (which is computationally very expensive), this heuristic approach provides very good, practical solutions quickly, suitable for real-time use in a web browser. It's designed to give you a plan that significantly reduces waste compared to manual planning.

The goal is to maximize the utilization of each stock board, reduce the number of new boards you might need to buy, and minimize the environmental impact by wasting less wood.