A bin packing online calculator assigns each item to exactly one of several equal-capacity bins, displays the bin count, and reports how full every bin is, all from a single capacity field and a list of item sizes. The Bin Packing Calculator runs the First Fit Decreasing (FFD) heuristic directly in your browser, so no file leaves your machine and you can repaste the same list to get the same answer every time. Sizes are abstract scalars — they describe any one-dimensional resource that you can sum and compare against a fixed limit, such as weight in kilograms, memory in gigabytes, minutes of work, or linear length in metres. Because the heuristic is deterministic, two runs with the same capacity and the same item list produce the same assignments, which is what makes the tool useful for worksheets, lectures, and audit-ready drafts rather than only as a one-off answer. Every run ends with a result panel that lists each opened bin, its items, its used and remaining capacity, the overall utilization, and a size-based lower bound so you can judge the plan at a glance.

bin packing online calculator
Bin Packing Online Calculator: FFD Plans in Your Browser

How the First Fit Decreasing heuristic decides which bin gets each item

FFD is a single-pass greedy procedure that has been used in scheduling and operations research for decades. The Google OR-Tools documentation on the bin packing problem describes the underlying constraint: every item must be assigned whole to exactly one bin, no bin may exceed capacity, and the goal is to use as few bins as possible. The Bin Packing Calculator does not solve that minimum exactly — bin packing is computationally hard — but it applies FFD in three stable steps that are easy to audit on screen.

  1. Sort the items in non-increasing order of size. When two items are equal, their original input order is preserved.
  2. Walk through the sorted list. For each item, look at every already-open bin from the earliest to the latest, and place the item in the first bin where remaining capacity is large enough.
  3. If no open bin can take the item, open a new bin, put the item there, and continue.

The rule "first open bin that fits" is what makes the plan reproducible: if you flip the input order of two equal items you get the same plan, and if a colleague re-enters the same numbers they will see the exact same assignments. FFD does not backtrack, does not merge bins, does not split items, and does not try alternative orderings in pursuit of a smaller bin count. That trade-off — speed and predictability in exchange for a guarantee of optimality — is the reason every result panel also shows a lower bound.

Run a bin packing plan in your browser

The interface is intentionally narrow: one capacity value, one item list, one output. To get a complete plan for a classroom exercise, a batch draft, or an operations-research demo, follow these steps:

  1. Enter the common capacity shared by every bin. Use any positive scalar; the unit is whatever you choose, as long as every item below uses the same unit.
  2. List one item per line. A bare number such as 7 becomes an automatically labelled item, while a custom label plus a size uses one comma, for example Server-A, 4.
  3. Press the run control. The tool validates that every size is greater than zero and no larger than the bin capacity, then sorts, places, and reports.
  4. Inspect every opened bin in the result panel: the items assigned to it, the sum of their sizes, the remaining capacity, and the overall utilization across all bins.
  5. Compare the bin count against the displayed lower bound, then copy the plan into a worksheet, loading draft, or assignment handout if the numbers look right.

Lists are capped at 1,000 items and negative or oversized items return a clear error before placement starts, so a failed run never produces a half-correct plan. Custom labels must use exactly one comma as the separator, which keeps the import format unambiguous and prevents a stray decimal point from being read as a label.

How to read the bin count, utilization, and lower bound

The output panel reports four quantities that together describe how efficient the plan is and how close it could possibly be to optimal. The bin count is simply the number of bins FFD had to open. The per-bin used capacity is the sum of the items assigned to that bin, and the per-bin remaining capacity is the unused space inside it. The overall utilization divides the total item size by the total capacity across every opened bin, so a plan with 92% utilization is much tighter than one with 60%.

The lower bound is the smallest bin count that any packing could ever reach for the same inputs, computed as the ceiling of total item size divided by capacity. If the total of your items is 47 and the capacity is 10, the lower bound is ceil(47 / 10) = 5, so no arrangement — FFD or otherwise — can do better than five bins. When FFD matches the lower bound the plan is consistent with the theoretical minimum, but matching it does not by itself prove optimality because individual item combinations also constrain feasibility; when FFD exceeds it, you know the heuristic left something on the table but you cannot tell by how much without a true optimizer.

To trace a small instance by hand, take capacity 10 and items 8, 6, 5, 5, 4, 3. FFD sorts to 8, 6, 5, 5, 4, 3. Bin 1 takes 8, then 6 does not fit because 8 + 6 = 14 exceeds 10, so Bin 2 opens with 6. The next 5 does not fit in Bin 1 (only 2 free) or Bin 2 (only 4 free), so Bin 3 opens with 5, and the next 5 fills Bin 3 (5 + 5 = 10). The 4 does not fit in Bin 1 (only 2 free) but fits in Bin 2 (6 + 4 = 10). The 3 would overflow Bin 1 (8 + 3 = 11), Bin 2 is full, Bin 3 is full, so Bin 4 opens with 3. That gives four bins for total size 31 and lower bound ceil(31 / 10) = 4, so FFD happens to match the bound on this list.

When the online calculator is the right tool — and when it is not

The heuristic answers a deliberately narrow question: given a one-dimensional size for every item and one fixed capacity, which bin should hold which item under FFD? That question covers a wide range of real planning tasks, and the table below summarizes where the tool fits and where it does not.

ScenarioWhether the Bin Packing Calculator is appropriateReason
Splitting a workload into batches of equal time budgetYesEach task is a single scalar (minutes) compared against a fixed batch budget.
Drafting memory-allocation groups for a fixed containerYesEach allocation is a scalar size against one fixed cap, with no orientation concerns.
Operations-research homework that asks for FFD outputYesThe algorithm is the deterministic FFD heuristic the assignment specifies.
Loading real boxes into a real truckNoThe model ignores dimensions, orientation, balance, stacking strength, axle limits, and safety regulations.
Stacking pallets inside a 3D containerNoVolume, footprint, rotation, and stacking rules are outside a single-scalar model.
Solving a 0/1 knapsack (choose a subset, not pack all items)NoThe tool assigns every item to exactly one bin; it never omits items to maximize value.

The Bin Packing Calculator also does not split items between bins, combine capacities across bins, reserve space for later items, or attach a value or priority to any item. Those are different problems — cutting stock, knapsack, multiple-knapsack, scheduling — with different objectives and different algorithms, so swap to the matching solver when the requirements shift.

Reproducible runs for planning and exercises

Determinism is the single most useful property of the heuristic for anyone who needs to defend a plan on paper. Two engineers running the same capacity and the same item list on different machines at different times will see the same bin-by-bin assignments, the same remaining-capacity column, and the same utilization. That makes the plan safe to paste into a change ticket, a lecture slide, or an audit trail. Eight hand-checked cases from the development process cover exact pairs, repeated values, fractions, and arrangements where item ordering changes the answer, and the tool asserts both item conservation and capacity compliance on every returned bin.

For logistics, manufacturing, cloud capacity, hazardous-materials loading, or any safety-critical placement, treat the FFD plan as a draft and re-validate the final assignment with a domain solver. The Lehigh University analysis of cutting stock problems is a useful reminder that one-dimensional models sit at the bottom of a family of more constrained variants, each with its own software and its own safety rules. The online calculator gives you a fast, transparent FFD plan; the rest of the validation is your responsibility.