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.
- Absolute Value CalculatorInstantly find |x| — the absolute value of any number, free.
- Age CalculatorYour exact age in years, months, and days — updated live
Calculators guides
View all- How to Calculate Cube Volume from One Side Length
- How to Calculate Cube Root for Any Number
- How to Change Clothing Size on Amazon: Convert Sizes
- How to Calculate Circumference From Radius or Diameter
- How to Calculate Circle Area: A = πr² Made Simple
- Convert Your Cat's Age to Human Years the Vet-Approved Way
- Calculate Brinell Hardness from Load, Ball and Indent
- How to Calculate Bra Size Accurately at Home
- Measure Body Fat at Home Without Scales or Calipers
- Calculate Your BMR in Seconds with Two Trusted Formulas
- How to Calculate BMI in Seconds with a Free Online Tool
- How to Calculate Online Without a Physical Calculator
- How to Calculate Your Blood Alcohol Content Accurately
- Predict Your Baby's Eye Color Odds in One Click
- How to Calculate Average Fast – Free Online Mean, Median & Mode Tool
- Convert Any Area to Square Feet in Seconds – Free Online Tool
- How to Calculate Annular Area Quickly – Free Online Tool
- How to Convert Degrees to Radians in Seconds – Free Online Tool
- How to Calculate Age Between Two Dates in Excel – Instant Online Tool
- How to Calculate Absolute Value Fast – Free Online Tool