Container loading calculator
Enter your carton sizes, weights and quantities to see how many fit in a 20', 40', 40' high cube or 45' container, with a 3D plan you can step through. For example, 600 × 400 × 400 mm cartons: 660 fit in a 40' high cube (inside 12,032 × 2,350 × 2,700 mm) — 30 rows along the length, each row 22 cartons: three columns of six lying 600 mm across plus one column of four standing 600 mm tall.
| Box type | Ordered | Loaded | Left over | Loaded weight |
|---|
How the calculator works
The planner fills the container from the back wall toward the door. At each step it takes the empty space nearest the back and the floor, and fills its corner with the best block of identical cartons — a set of rows, columns and layers in one orientation. What is left of that space is cut into smaller spaces, and the process repeats until nothing more fits or every carton is loaded. This is the “block building” method used in container loading research (Eley, 2002; Fanslau and Bortfeldt, 2010).
The planner tries many variations — different ways of scoring blocks and cutting the leftover space, plus seeded random choices — and keeps the plan that loads the most cargo volume. The same inputs always give the same plan, so a shared link shows exactly what you saw.
Before a plan is shown, an independent check confirms that no two cartons overlap, every carton is inside the container and fits through the door opening in the way it is stowed, “this side up” cartons are not tipped, every carton stands fully on the floor or on cartons below it, nothing is stacked on a carton marked as not stackable, and the payload limit is not exceeded.
- Any side can face down: the carton may be stowed in any of its six orientations.
- This side up: the carton keeps its height vertical; it can only be turned flat (length and width swapped).
- Can carry boxes on top: untick for fragile cartons or crates that must not be stacked on.
- Load in list order: by default the planner loads whatever combination uses the most space. Tick this when the first box type must go in before the others.
Container sizes used in the presets
Inside dimensions, door openings and payloads below are Hapag-Lloyd's published figures. Hapag-Lloyd notes that its figures are examples and that containers vary by manufacturer, so check your own unit's data plate or booking when the fit is tight, and pick “Custom size” to enter it.
| Container | Inside L × W × H (mm) | Door W × H (mm) | Max payload (kg) |
|---|---|---|---|
| 20' Standard | 5,900 × 2,352 × 2,395 | 2,340 × 2,292 | 28,130 |
| 40' Standard | 12,032 × 2,352 × 2,395 | 2,340 × 2,292 | 28,750 |
| 40' High Cube | 12,032 × 2,350 × 2,700 | 2,340 × 2,597 | 28,600 |
| 45' High Cube | 13,556 × 2,352 × 2,700 | 2,340 × 2,597 | 27,700 |
Source: Hapag-Lloyd container specification pages (linked), checked 2026-10-18. More detail on shipping container dimensions.
Getting a plan that works on the dock
- Measure cartons as packed, at the widest point. Bulging cartons are often a few millimetres bigger than the printed size, and a few millimetres per carton add up over 30 rows.
- Leave room for dunnage, airbags and the door: a plan that uses every millimetre is a plan that will not close.
- The payload limit is the most the container may carry, but road weight limits where the container travels can be lower. Check with your trucker for the inland leg.
- Put heavy cartons low and spread the weight along the floor. The planner shows the centre of gravity of the cargo along the length so you can see if the load leans toward one end.
- The IMO/ILO/UNECE Code of Practice for Packing of Cargo Transport Units (CTU Code) is the international guidance on packing, securing and weight distribution in containers.