Pallet Fitting Calculator
pallet_fitting_calculatorCalculate how many identical boxes fit on a pallet: boxes per layer (trying 90-degree rotation when allowed), layer count within the max height, totals, volume utilisation and weight capping.
Behavior: deterministic geometric packing of one box size in aligned rows and columns — it does not model interlocked or mixed-orientation patterns; weight_limited reports when max_payload_kg caps the count below the geometric fit; pallet_deck_height_cm defaults to 15. Missing or non-positive dimensions error naming the parameter. Rate-limited (anonymous use: 25 requests/day per IP): a 429 error body carries retry_after_seconds and a Retry-After header — back off and retry, or call get_subscribe_link for higher limits.
Returns: boxes_per_layer, layers, total_boxes, orientation, boxes_per_row/col, usable_height_cm, utilisation_percent, total_box_volume_cbm, wasted_space_cbm and the weight fields under result, plus confidence, _source and citation (the FreightUtils v1 response envelope).
Limitations: a theoretical best-effort fit — real stacking obeys carton strength, overhang and load-stability rules it does not model.
Related: ldm_calculator (pallets into trailer length), vehicle_lookup (pallet capacity per vehicle), container_lookup (pallets into containers).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| box_width_cm | Yes | Box width in cm | |
| box_height_cm | Yes | Box height in cm | |
| box_length_cm | Yes | Box length in cm | |
| box_weight_kg | No | Box weight in kg | |
| allow_rotation | No | Allow 90-degree rotation (default: true) | |
| max_payload_kg | No | Max pallet payload in kg | |
| pallet_width_cm | Yes | Pallet width in cm | |
| pallet_length_cm | Yes | Pallet length in cm | |
| pallet_max_height_cm | Yes | Max stack height in cm | |
| pallet_deck_height_cm | No | Pallet deck height (default: 15cm) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| result | Yes | ||
| _source | Yes | ||
| citation | Yes | ||
| validity | No | ||
| warnings | No | ||
| confidence | Yes | ||
| blocking_errors | No | ||
| envelope_version | Yes | ||
| normalized_input | No |