CBM Calculator & Container Loading
CBM and chargeable weight (air 1:6000, express 1:5000, sea 1 CBM = 1000 kg) and how many cartons fit a 20GP, 40GP, 40HC, 45HC container or a pallet.
Result
Press “Run” to see the result.
Give the carton size (length, width, height in unit cm, mm, m or in), weight per carton and quantity, or a list of carton types in cartons. The API returns the volume (CBM) per carton and in total, gross weight and chargeable weight for air (cm³ / 6000, air_divisor), express couriers (cm³ / 5000, express_divisor), sea LCL (freight tons, 1 CBM = 1000 kg) and road (1 CBM = 333 kg), each with whether volume or weight decides.
Add container (20gp, 40gp, 40hc, 45hc or all) or pallet (eur 1200 × 800, standard 1200 × 1000, us, asia; max_height incl. the pallet, default 180 cm, max_weight) to plan the loading. For one carton type it tries the six orientations (two with upright=true, limited by max_stack), fills the leftover length at the door with the best other orientation, and returns the maximum count, whether space or payload limits it, cartons per layer, the layer plan, volume and weight utilisation, and how many containers / pallets the quantity needs. Several carton types are packed with a first-fit-decreasing layer heuristic, marked estimate: true.
Container internal sizes and payloads are typical published values; real boxes vary by maker and leave gaps, so keep a margin of 5–10 %.
Use this in your code
curl "https://apibox.io.vn/v1/cargo-load?length=60&width=40&height=40&weight=12&quantity=300&container=20gp" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/cargo-load?length=60&width=40&height=40&weight=12&quantity=300&container=20gp', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/cargo-load?length=60&width=40&height=40&weight=12&quantity=300&container=20gp",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/cargo-load?length=60&width=40&height=40&weight=12&quantity=300&container=20gp');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
Which volumetric divisors are used?
Air 6000 (IATA, 167 kg/m³), express 5000 (200 kg/m³), sea LCL 1 CBM = 1000 kg, road 1 CBM = 333 kg. All can be changed with parameters.
Is the loading plan optimal?
For one carton type it is the best layer-by-layer block over the six orientations plus a filler block. Mixed cartons use a heuristic and are marked as an estimate.
Can cartons be kept upright?
Yes: upright=true allows only rotations around the vertical axis, and max_stack limits the number of layers.