Pack rectangular items into bins to minimize the number of containers used.
Enter container dimensions and item sizes, then click Pack Items.
The 2D bin packing problem involves placing rectangular items into rectangular containers (bins) to minimize the number of containers used, without overlapping items. This is a classic combinatorial optimization problem with applications in logistics, warehousing, manufacturing, and transportation. The theoretical approach uses heuristic algorithms such as the First-Fit Decreasing (FFD) or Best-Fit Decreasing (BFD) strategies. Items are first sorted by decreasing area, then placed into bins using a bottom-left (BL) placement policy. The algorithm searches for the lowest available position in each bin where the item fits, maintaining all items axis-aligned and non-overlapping. This calculator provides a practical solution for small to medium-sized item sets. While optimal packing is NP-hard, this heuristic gives efficient results for real-world scenarios, helping reduce shipping costs and improve space utilization. The result shows each bin's layout with item coordinates and occupancy percentage.
- Enter the Container Width and Container Height (in any units).
- Enter items in the text area, one per line, as width,height (e.g., 30,40).
- Click Pack Items to run the bin packing algorithm.
- The result shows how many bins were used and the placement of each item.
- Occupancy percentage indicates how efficiently each bin is filled.
- Click Reset to restore default example values.