Everything that had to change around the box
TEU is a unit of account, not a box
Count the boxes on a ship and you will not get the TEU figure. That gap is the point.

Twenty and forty foot boxes in the same rows. Capacity is counted in the shorter one, which is why the figures rarely match what you can see.
The unit and the arithmetic
TEU — twenty-foot equivalent unit — is the standard measure of container capacity defined by ISO around the dimensions of the original twenty-foot box: 20 feet long, 8 feet wide, 8 feet 6 inches tall. When a ship is rated at 24,000 TEU, that is a volumetric convention, not a headcount of boxes.
The problem is that most boxes in service today are forty-footers. A single 40-foot container counts as two TEU. Load a ship entirely with forty-foot boxes and the vessel's TEU rating stays unchanged, but the physical box count is exactly half. Operators also run 45-foot containers, which score 2.25 TEU each, and occasionally 48- or 53-foot units in domestic North American rail service — none of which land neatly on the ledger.

Rows run perpendicular to the quay so one crane can serve several at once. The depth of the stack is the terminal’s real capacity.
Photo: Container terminal in Minneapolis · Wikimedia Commons
Weight complicates things further. A ship may hit its deadweight tonnage limit — the maximum cargo mass its hull can safely carry — before it fills its nominal TEU capacity. A vessel rated at 14,000 TEU carrying dense industrial cargo might physically be full at 11,000 boxes. The TEU figure describes the envelope; the cargo decides how much of it gets used.
This is why terminal operators track two numbers: box count, which drives crane cycles and gate moves, and TEU count, which drives revenue reporting and berth planning. A yard that handles 4 million TEU a year may process well under 3 million physical units, depending on the mix of twenty- and forty-foot equipment passing through.

Ship’s gear rather than shore gear. A vessel carrying its own cranes can work a berth that has none.
Photo: Container Ship · Wikimedia Commons
Malcom McLean's original insight was interchangeability — one standard shape that could move between ship, rail and truck without being opened. The TEU inherited that logic: a unit of account precise enough to plan a global network, loose enough to absorb the reality that the boxes themselves were never all the same size.
Read next