Container Shipping Guide
How to Calculate How Many Cartons Fit in a Container (Step by Step)
Published March 14, 2026 · ContainerLoad
Knowing exactly how many cartons fit in your container helps you plan production quantities, negotiate better freight rates, and avoid costly overloads or half-empty containers. This guide shows you the exact calculation method.
Step-by-Step Calculation Method
Step 1 — Get Your Container Dimensions
| Container | Internal Length | Internal Width | Internal Height |
| 20ft Standard | 589 cm | 233 cm | 240 cm |
| 40ft Standard | 1203 cm | 235 cm | 239 cm |
| 40ft High Cube | 1203 cm | 235 cm | 270 cm |
Step 2 — Try All 6 Carton Orientations
A carton with dimensions L × W × H can be placed in 6 different orientations. For each orientation, calculate:
- Cartons along container length: floor(Container L ÷ Carton dimension)
- Cartons along container width: floor(Container W ÷ Carton dimension)
- Layers (cartons along container height): floor(Container H ÷ Carton dimension)
- Total = A × B × C
Pick the orientation that gives the highest total.
Worked Example
Carton dimensions: 32 × 24 × 13 cm in a 20ft container (589 × 233 × 240 cm)
| Orientation (L×W×H along container) | Along Length | Along Width | Layers | Total |
| 32L × 24W × 13H | floor(589/32)=18 | floor(233/24)=9 | floor(240/13)=18 | 2,916 |
| 24L × 32W × 13H (best) | floor(589/24)=24 | floor(233/32)=7 | floor(240/13)=18 | 3,024 |
| 32L × 13W × 24H | floor(589/32)=18 | floor(233/13)=17 | floor(240/24)=10 | 3,060 |
| 13L × 32W × 24H | floor(589/13)=45 | floor(233/32)=7 | floor(240/24)=10 | 3,150 |
| 13L × 24W × 32H | floor(589/13)=45 | floor(233/24)=9 | floor(240/32)=7 | 2,835 |
| 24L × 13W × 32H | floor(589/24)=24 | floor(233/13)=17 | floor(240/32)=7 | 2,856 |
Best orientation: 13L × 24W × 32H → 3,150 cartons in a 20ft container.
Important: This is theoretical maximum. Practical loading achieves 85–95% of theoretical due to weight limits, loading practicality, and stacking stability. For this example, expect 2,600–3,000 cartons in practice depending on carton weight.
Step 3 — Check Weight
Multiply carton count by carton weight. Ensure it doesn't exceed container payload:
- 20ft max payload: 28,000 kg
- If your carton weighs 2 kg: 28,000 ÷ 2 = 14,000 cartons maximum by weight
- If volume gives 3,150 but weight limit allows 14,000 → volume is the limiting factor
Step 4 — For Pallet Loading, Calculate Per Pallet First
If shipping on pallets (120 × 100 cm), calculate cartons per pallet:
- Per layer: floor(120 ÷ carton_L) × floor(100 ÷ carton_W)
- Layers: floor(180cm stack height ÷ carton_H)
- Per pallet: layers × per layer
- Total: cartons per pallet × 10 pallets (for 20ft using pinwheel)
Why a Calculator Is Better Than Manual Calculation
Manual calculation only tries one orientation at a time. ContainerLoad automatically tests all 6 orientations and picks the best. It also accounts for:
- Weight limits (auto-stops when payload is reached)
- Pallet base height
- Stack height limits
- Pinwheel pallet loading (10 pallets in 20ft, not 8)
- Mixed carton sizes in one container
Calculate Your Carton Count in 30 Seconds
Enter your dimensions → instant result with 3D diagram and full breakdown
Try ContainerLoad Free →
FAQ
How do I calculate cartons per layer in a container?
Divide the container length by the carton length (take the floor/integer), then divide the container width by the carton width (floor). Multiply these two numbers: cartons per layer = floor(container_L ÷ carton_L) × floor(container_W ÷ carton_W). Try all 6 orientations to find the best.
What is the formula for container loading calculation?
Total cartons = floor(Container_L ÷ Box_L) × floor(Container_W ÷ Box_W) × floor(Container_H ÷ Box_H). Calculate this for all 6 box orientations and take the highest value. Then verify the total weight doesn't exceed the container payload limit.
How many cartons fit in a 20ft container?
It completely depends on your carton dimensions. For example: a 30×24×13cm carton fits approximately 3,150 units in a 20ft container in the best orientation. Use ContainerLoad to get the exact count for your specific dimensions in under 30 seconds.