GET /api/pallet?pl=120&pw=80&pmh=220&bl=40&bw=30&bh=25How Does the Pallet Fitting Calculator Work?
The calculator uses a layer-based greedy algorithm — the same method warehouse operatives use when manually building pallet loads. It works in two steps:
Step 1 — One layer: The box footprint (length × width) is tiled across the pallet footprint using simple integer division. If rotation is enabled, both the original and rotated orientations are tried and whichever fits more boxes per layer is chosen.
Step 2 — Stack height: The number of layers is calculated as floor(usable height ÷ box height) where usable height = max stack height − pallet board height. If box weight and max pallet weight are provided, the result is further capped so total weight never exceeds the pallet rating.
Boxes per layer = floor(pallet L ÷ box L) × floor(pallet W ÷ box W)
— repeated for rotated orientation, best wins
Layers = floor((max stack height − pallet board height) ÷ box height)
Total boxes = boxes per layer × layersThe top-down SVG diagram shows one layer of boxes on the pallet footprint. Orange rectangles are boxes; grey space is unused. The diagram scales automatically to your input — you can see at a glance whether the arrangement is efficient or has significant wasted space at the edges.
Note: This calculator assumes all boxes are the same size, orientation is consistent within each layer, and no overhang beyond the pallet edge. For mixed loads or irregular shapes, professional load-planning software is recommended.
Calculate by Pallet Type
Select a standard pallet type to open a pre-filled calculator with its exact dimensions.