This paper develops and estimates a model of indivisibilities in shipping and economies of scale in consolidation. It uses highly detailed data on imports where it is possible to observe the contents of individual containers. In the model, ﬁrms are able to adapt to indivisibility constraints by using consolidation strategies and by making adjustments to shipment size. The ﬁrm determines the optimal number of domestic ports to use, taking into account that adding more ports lowers inland freight cost, at the expense of a higher indivisibility cost. The estimated model is able to roughly account for Walmart’s port choice behavior. The model estimates are used to evaluate how mergers or dissolutions of ﬁrms or countries, and changes in variety, affect indivisibility costs and inland freight costs.