{
  "id": "container-pallet",
  "version": "5e416df5f3a4",
  "status": "published",
  "name": "Container Pallet Calculator",
  "question": "How many container pallets fit?",
  "summary": "Computes how many pallets of a given size and weight fit in a 20 ft, 40 ft, 40 ft high cube or 45 ft high cube container, from its inside dimensions and maximum payload.",
  "category": "logistics",
  "url": "https://www.acalculator.org/logistics/container-pallet-calculator",
  "markdown": "https://www.acalculator.org/logistics/container-pallet-calculator.md",
  "kind": "function",
  "method": "per layer = max(⌊L ÷ l⌋ × ⌊W ÷ w⌋, ⌊L ÷ w⌋ × ⌊W ÷ l⌋); layers = ⌊H ÷ h⌋; pallets = min(per layer × layers, ⌊payload ÷ weight⌋)",
  "assumptions": [
    "All pallets on the floor are turned the same way, whichever of the two turns fits more; mixed patterns can sometimes fit one or two more.",
    "Pallets stand upright and are stacked straight on top of each other when stacking is on.",
    "Inside dimensions and maximum payloads are nominal values from Hapag-Lloyd’s container specification; your container may differ by a few millimetres.",
    "Door openings, dunnage, bracing and weight distribution are not taken into account."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "length": {
        "title": "Pallet length",
        "description": "The length of one loaded pallet.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.05,
        "maximum": 20
      },
      "width": {
        "title": "Pallet width",
        "description": "The width of one loaded pallet.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.05,
        "maximum": 20
      },
      "height": {
        "title": "Pallet height",
        "description": "The height of one loaded pallet, load included.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.05,
        "maximum": 20
      },
      "weight": {
        "title": "Pallet weight",
        "description": "The weight of one loaded pallet.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "mass",
        "minimum": 1,
        "maximum": 100000
      },
      "containerType": {
        "title": "Container",
        "description": "The container type.",
        "type": "string",
        "enum": [
          "20_standard",
          "40_standard",
          "40_high_cube",
          "45_high_cube"
        ]
      },
      "stack": {
        "title": "Stack pallets",
        "description": "Whether pallets may be stacked on top of each other.",
        "type": "boolean"
      }
    }
  },
  "outputs": {
    "pallets": {
      "label": "Pallets that fit",
      "description": "The smaller of pallets per layer × layers and the pallets the maximum payload allows.",
      "format": "integer"
    },
    "perLayer": {
      "label": "Pallets per layer",
      "description": "Pallets on the floor, all turned the same way, in the better of the two turns.",
      "format": "integer"
    },
    "layers": {
      "label": "Layers",
      "description": "Inside height ÷ pallet height, rounded down; 1 when pallets are not stacked.",
      "format": "integer"
    },
    "byWeight": {
      "label": "Pallets the payload allows",
      "description": "Maximum payload ÷ pallet weight, rounded down.",
      "format": "integer"
    },
    "limit": {
      "label": "Limited by",
      "description": "Whether space or weight sets the number of pallets.",
      "format": "text"
    },
    "utilization": {
      "label": "Space used",
      "description": "Volume of the pallets that fit ÷ inside volume of the container.",
      "format": "percent"
    },
    "totalWeight": {
      "label": "Total weight",
      "description": "Pallets that fit × pallet weight.",
      "format": "quantity",
      "unit": "lb"
    },
    "payload": {
      "label": "Maximum payload",
      "description": "The most cargo weight the container may carry.",
      "format": "quantity",
      "unit": "lb"
    },
    "insideLength": {
      "label": "Inside length",
      "description": "The inside length of the container.",
      "format": "quantity",
      "unit": "in"
    },
    "insideWidth": {
      "label": "Inside width",
      "description": "The inside width of the container.",
      "format": "quantity",
      "unit": "in"
    },
    "alongLength": {
      "label": "Pallet side along the length",
      "description": "The pallet side that runs along the container’s length in the chosen turn.",
      "format": "quantity",
      "unit": "in"
    },
    "alongWidth": {
      "label": "Pallet side across the width",
      "description": "The pallet side that runs across the container’s width in the chosen turn.",
      "format": "quantity",
      "unit": "in"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "length": 1.2191999999999998,
      "width": 1.016,
      "height": 1.2191999999999998,
      "weight": 453.59237,
      "containerType": "20_standard",
      "stack": true
    },
    "outputs": {
      "pallets": 8,
      "perLayer": 8,
      "layers": 1,
      "byWeight": 66,
      "limit": "Space",
      "utilization": 36.383257092959504,
      "totalWeight": 3628.73896,
      "payload": 30200,
      "insideLength": 5.9,
      "insideWidth": 2.352,
      "alongLength": 1.2191999999999998,
      "alongWidth": 1.016
    },
    "text": "Pallets that fit in the 20' standard container: 8."
  },
  "examples": [
    {
      "given": {
        "length": 1.2191999999999998,
        "width": 1.016,
        "height": 1.2191999999999998,
        "weight": 453.59237,
        "containerType": "20_standard",
        "stack": true
      },
      "expect": {
        "perLayer": 8,
        "layers": 1,
        "pallets": 8,
        "limit": "Space",
        "utilization": 36.38325709295952
      },
      "source": "hand calculation in content.mdx: 5,900 ÷ 1,219.2 = 4.84 → 4 and 2,352 ÷ 1,016 = 2.31 → 2, so 8 per layer; 2,393 ÷ 1,219.2 = 1.96 → 1 layer (Hapag-Lloyd inside dimensions); Hapag-Lloyd, Container Specification (inside dimensions of general purpose and high cube containers). https://www.hapag-lloyd.com/content/dam/website/downloads/press_and_media/publications/15211_Container_Specification_engl_Gesamt_web.pdf"
    },
    {
      "given": {
        "length": 1.2,
        "width": 0.8,
        "height": 1.1,
        "weight": 800,
        "containerType": "40_high_cube",
        "stack": true
      },
      "expect": {
        "perLayer": 20,
        "layers": 2,
        "byWeight": 35,
        "pallets": 35,
        "limit": "Weight"
      },
      "source": "hand calculation in content.mdx: 12,032 ÷ 1,200 → 10 and 2,352 ÷ 800 → 2 give 20 (the turn gives 15 × 1); 2,700 ÷ 1,100 → 2 layers, 40 by space; 28,600 ÷ 800 = 35.75 → 35 by weight (Hapag-Lloyd payload); Hapag-Lloyd, Container Specification (inside dimensions of general purpose and high cube containers). https://www.hapag-lloyd.com/content/dam/website/downloads/press_and_media/publications/15211_Container_Specification_engl_Gesamt_web.pdf"
    }
  ],
  "sources": [
    "Hapag-Lloyd, Container Specification (inside dimensions of general purpose and high cube containers). https://www.hapag-lloyd.com/content/dam/website/downloads/press_and_media/publications/15211_Container_Specification_engl_Gesamt_web.pdf"
  ],
  "related": [],
  "changelog": [
    {
      "date": "2026-09-29",
      "note": "Worked examples name a published reference for their rule."
    }
  ]
}
