Bin Packing Calculator
Pack labelled item sizes into equal-capacity bins with deterministic FFD placement, utilization, and a size lower bound.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Enter the common capacity available in every bin.
- 2.List one item per line as size or label, size, using the same unit as capacity.
- 3.Run FFD, inspect every bin and the lower bound, then copy the plan if appropriate.
About Bin Packing Calculator
Bin Packing Calculator assigns positive item sizes to as many equal-capacity bins as needed. Enter one capacity and list either a size or label, size on each line. The result shows the number of bins, every assignment, used and remaining capacity, overall utilization, and the simple size-based lower bound. Copy the plan for a worksheet, loading draft, memory-allocation example, or operations-research exercise. Processing stays entirely in the browser.
The bin-packing problem asks for the fewest fixed-capacity bins that can hold all items, with each item assigned exactly once and no bin exceeding capacity. Google OR-Tools documents those constraints and the minimum-bin objective. This page uses the First Fit Decreasing heuristic rather than an integer-programming solver: sort items largest first, then put each into the first already-open bin where it fits; open a new bin only when necessary.
The algorithm is deterministic. Equal sizes retain their original order, and “first” always means the earliest open bin. That makes saved examples reproducible and lets you audit why an item reached a particular bin. Eight hand-checked cases cover exact pairs, repeated values, fractions, and arrangements where ordering matters. Tests also assert item conservation and capacity on every returned bin.
FFD does not guarantee the globally smallest bin count. Bin packing is computationally difficult, and a locally sensible early placement can prevent a better later combination. The displayed lower bound is ceil(total item size divided by capacity). No solution can use fewer bins than that size bound, but matching or exceeding it does not by itself prove optimality because individual item combinations also constrain feasibility. The interface labels both the heuristic and lower bound without turning either into a false certificate.
Sizes are abstract scalar quantities. They can represent weight, memory, workload, length, or another one-dimensional resource if capacity and every item share the same unit. They do not represent three-dimensional box dimensions, orientation, balance, fragility, stacking strength, center of gravity, hazardous separation, or vehicle axle limits. “Container loading” in the broad physical sense needs specialist software and safety rules.
Every item must be greater than zero and no larger than one bin. Negative or oversized items return a clear error. Capacity is bounded, labels are limited, and the list accepts at most 1,000 items. Rows with only a number receive automatic labels; rows with custom labels use one comma. Commas inside labels are outside this simple import format.
Utilization divides total item size by the total capacity of opened bins. Remaining capacity is unused space in the scalar model, not necessarily recoverable physical volume. The tool does not split items, combine capacities, reserve space, or apply values and priorities. Those variations become cutting stock, knapsack, multiple-knapsack, or scheduling problems with different objectives.
Use the plan to explore heuristics, draft batch groupings, or compare ordering effects, then validate all real-world constraints independently. For logistics, cloud capacity, manufacturing, or safety-critical loading, use a validated domain solver and confirm the final assignment. This page is transparent educational and planning assistance, not a proof of minimum cost or safe loading.
Methodology & sources
Validate up to 1,000 positive items no larger than a common capacity, stably sort by decreasing size, place each in the first open bin with sufficient remaining capacity, and open a new bin otherwise. Report conservation, utilization, and ceil(total/capacity) lower bound without claiming optimality.
Frequently asked questions
- Is the returned bin count always optimal?
- No. FFD is a fast heuristic and can use more bins than a globally optimal arrangement.
- What does the lower bound mean?
- It is ceil(total size/capacity), so no solution can use fewer bins, but it does not prove the displayed plan is optimal.
- Can this load real boxes into a truck?
- Not safely. The model uses one scalar size and ignores dimensions, orientation, balance, strength, and regulations.
- Are items split between bins?
- No. Every item is assigned whole to exactly one bin.
Related tools
- Cut List OptimizerArrange a one-dimensional cut list across equal stock lengths with explicit kerf, waste, and a deterministic FFD plan.
- Knapsack Problem CalculatorChoose the maximum-value subset of indivisible items under a whole-number capacity with an exact, inspectable 0/1 dynamic program.
- Assignment Problem SolverFind the exact minimum-cost one-to-one pairing between equally sized worker and task sets with the deterministic Hungarian algorithm.
- Weight ConverterConvert kilograms, grams, pounds, ounces, stone, tonnes, and other verified mass units locally.
- 24 Game SolverFind exact ways to make 24 from four whole numbers using every number once and only the four basic operations.
- Absolute Value CalculatorInstantly find |x| — the absolute value of any number, free.
Calculators guides
View all- Bin Packing Online Calculator: FFD Plans in Your Browser
- 3D Bin Packing Calculator: When Scalar Packing Helps
- 2D Bin Packing Calculator: Scalar Sizes into Equal Bins
- 1D Bin Packing Calculator: Pack Sizes into Bins
- How to Convert Date Format to Month in Excel
- Add Days to a Date: Worked Examples for Common Cases
- How to Transfer Cloud Storage Between Any Units
- How to Calculate Cylinder Volume in Liters
- How to Calculate Cylinder Surface Area: Worked Example
- Cut List Optimizer for PC: Plan Cuts in Your Browser
- How to Calculate Curtain Fabric Yardage
- How to Determine Cube Volume From One Edge
- How to Calculate the Cube Root of a Number by Hand
- How to Find Cone Volume with Slant Height
- Calculate Cone Surface Area With Just Radius and Height
- US, UK and EU Clothing Size Conversion Made Simple
- Chinese Gender Predictor Alternative for Fun Baby Guesses
- How to Calculate a Cat's Age in Months (Vet Chart)
- How to Calculate Calories in Food and Your Daily Needs
- Calculate Business Days in Power BI with NETWORKDAYS