Pack Calculator

Ship whole packs.
Minimize waste.

Configure pack sizes on the left, calculate an order on the right. Rule 2 (minimum items) takes precedence over rule 3 (minimum packs). The algorithm is two-phase DP — robust to adversarial pack sets like[23, 31, 53]where greedy fails.

01 · Configuration

Pack sizes

Whole-pack quantities the warehouse can ship. Changes apply atomically on save with anIf-Matchprecondition.

Loading current pack sizes…
0 rows
02 · Calculate

Order

POST · /calculate

Enter a quantity. The API picks the combination that minimizes total items shipped, then the pack count.

units
Awaiting input

Run a calculation to see the breakdown.