When building e-commerce checkouts, ERP packing modules, or freight quoting tools, one of the most common bugs is quoting shipping rates based only on scale weight instead of chargeable weight.
1. The Core Formula Carriers Actually Bill On
Carriers always bill whichever is higher: Actual Weight or Volumetric (Dimensional) Weight.
-
Express Couriers (DHL, FedEx, UPS):
(L × W × H in cm) ÷ 5000(or÷ 139for inches/lbs) -
IATA Air Freight:
(L × W × H in cm) ÷ 6000(1 CBM = 166.67 kg) -
Sea Freight LCL:
MAX(Total CBM, Total Metric Tons)
If you want to quickly verify a multi-carton packing list without writing a script, you can test it directly on 80616.com Multi-Box Volumetric & CBM Calculator (free, no login, supports mixed cm/inch and kg/lbs).
2. Clean Python Implementation for Multi-Box Shipments
def calculate_chargeable_weight(cartons: list[dict], divisor: int = 5000) -> dict:
total_cbm = 0.0
total_actual_kg = 0.0
for c in cartons:
qty = c.get("qty", 1)
total_cbm += ((c["l_cm"] * c["w_cm"] * c["h_cm"]) / 1_000_000) * qty
total_actual_kg += c["weight_kg"] * qty
volumetric_kg = (total_cbm * 1_000_000) / divisor
return {
"total_cbm": round(total_cbm, 3),
"actual_kg": round(total_actual_kg, 2),
"volumetric_kg": round(volumetric_kg, 2),
"chargeable_kg": round(max(total_actual_kg, volumetric_kg), 2),
}
3. Practical Container Fill Thresholds (20GP / 40GP / 40HQ)
Never assume 100% theoretical container volume is usable. Carton gaps and door clearance typically cap hand-loaded cargo around:
- 20ft Standard (20GP): 33.2 CBM max → ~28 CBM practical
- 40ft Standard (40GP): 67.7 CBM max → ~58 CBM practical
- 40ft High Cube (40HQ): 76.4 CBM max → ~68 CBM practical
You can compare all three container fill percentages side-by-side on the 40HQ Container Load Calculator.
Top comments (0)