Skip to content
logictra

Operations

Demurrage and detention: what they are, how they're calculated and how to avoid them

The container belongs to the carrier and, from a certain point, its use is charged by the day. Demurrage and detention are the two names of that bill. Here is when each one starts, how it is calculated and what you can do to avoid paying it.

Published on 13 October 2026 · 4 min read

Two charges, two places

FIATA's best practice guide tells them apart by where the container is:

  • Demurrage: use of the container inside the terminal beyond the free days.
  • Detention: use of the container outside the terminal or depot beyond the free days.
  • Combined demurrage and detention: carriers may merge both periods into one with a single free-time allowance.
  • Storage: a terminal charge for keeping the container on its ground. It is not demurrage, even though the carrier sometimes passes it on.
ImportExport
DemurrageFrom discharge until the full container leaves the terminalFrom when the full container enters the terminal until it is loaded on board
DetentionFrom when the full container leaves the terminal until the empty is returnedFrom empty pick-up until the full container enters the terminal

How it is calculated

Each carrier publishes its terms and its tariff per port, and a contract or service agreement can improve them. The structure is usually the same:

  1. A number of free days, which varies by container type. Reefers usually get fewer.
  2. A way of counting: calendar or working days, and from what exact moment. Hapag-Lloyd's tariff for Spain, for instance, counts calendar days from 00:01 on the day of discharge.
  3. Bands with a daily rate that rises as the days go by.

Maersk's terms illustrate another important detail: on exports, the combined period runs from empty pick-up until loading on board. Picking up the empty too early uses up free days before the cargo is ready.

Who pays

The carrier invoices the merchant on the bill of lading, usually the shipper or the consignee. When there is a forwarder or NVOCC in between, the charge moves down the chain to whoever caused the delay, or whoever agreed to bear it.

In Spain, the Maritime Navigation Act regulates the demurrage of a chartered vessel, not of containers, so the practical framework is the contract and the carrier's tariff. There is no specific EU rule on container demurrage; associations such as CLECAT call for more transparency in these charges.

What to check on an invoice

The United States does regulate these invoices. The Federal Maritime Commission rule requires minimum content and, if any item is missing, the billed party is not obliged to pay. Although it only applies there, it makes a good checklist for any invoice:

  • Bill of lading number, container number and port of discharge.
  • Why you are the party being billed.
  • Free days, with their start and end dates.
  • The date the cargo became available (import) or the earliest return date (export).
  • Days charged, daily rate and the tariff rule or contract that sets it.
  • Contact details and the dispute procedure.

The same rule sets 30 days to invoice from the last day charged and at least 30 days for the billed party to dispute. Its general rule adds the incentive principle: the charge must serve to keep cargo moving, so charging detention when the empty cannot be returned is likely unreasonable.

How to avoid them

  • Negotiate free days and, if you can, a cap on accrued charges in your contract.
  • Prepare clearance before arrival so the goods don't wait for paperwork.
  • Track, container by container, the terminal pick-up deadline and the empty return deadline.
  • On exports, align empty pick-up with the VGM, documentation and terminal cut-offs. Carriers often close documentation and VGM several days before departure.
  • Return the empty to the right depot: an empty in the wrong place keeps counting.
  • If the goods are going to wait, consider unloading them in a temporary storage facility or customs warehouse and returning the container.
  • Keep the actual dates of every movement: they are your evidence if you need to dispute.

Verified gross mass has been a shipper obligation since 2016 (SOLAS regulation VI/2). In Spain it is implemented by a resolution of the Directorate-General of the Merchant Navy. Without VGM the container isn't loaded, and a container that isn't loaded keeps adding days.

Check the container number before paying

A container number (ISO 6346) has four letters, six digits and a check digit. The first three letters identify the owner, the fourth the category (U for containers), the six digits are the serial number and the last digit catches transcription errors. This is how it is calculated:

  1. Each letter gets a value starting at A = 10 and skipping multiples of 11: A 10, B 12, C 13, D 14, E 15, F 16, G 17, H 18, I 19, J 20, K 21, L 23, M 24, N 25, O 26, P 27, Q 28, R 29, S 30, T 31, U 32, V 34, W 35, X 36, Y 37, Z 38.
  2. Digits keep their own value.
  3. Each position, starting with the first, is multiplied by 1, 2, 4, 8 and so on, doubling each time.
  4. The products are added up and divided by 11. The remainder is the check digit; if it is 10, the check digit is 0.

For CSQU305438 the sum is 6,185, the remainder after dividing by 11 is 3 and the full number is CSQU3054383. The BIC, which keeps the owner code register, has a calculator to check it. A number that doesn't add up is usually a copying error, and an invoice for a misidentified container is one you can dispute.

Sources

  1. Demurrage and Detention in Container Shipping. Best Practice Guide (2018) · FIATA
  2. Demurrage, Detention and Storage terms · Maersk
  3. Detention & Demurrage, importación España (julio de 2025) · Hapag-Lloyd
  4. 46 CFR Part 541, Demurrage and Detention Billing Requirements · Federal Maritime Commission (eCFR)
  5. Anulación del §541.4 por el Tribunal de Apelación del Circuito de D.C. (2025) · Federal Register
  6. Ley 14/2014, de 24 de julio, de Navegación Marítima · BOE
  7. Resolución de 15 de junio de 2016 de la Dirección General de la Marina Mercante sobre la masa bruta verificada (VGM) · BOE
  8. Check digit calculator (ISO 6346) · Bureau International des Containers (BIC)
  9. Briefing & Industry Recommendations on D&D practices · CLECAT

This article is for information only and does not replace reading the official text or professional advice.

Frequently asked questions

Frequently asked questions

What is the difference between demurrage and detention?

Demurrage is charged for using the container inside the terminal beyond the free days, and detention for using it outside. Some carriers combine them into a single period.

Are free days calendar or working days?

It depends on the carrier and the contract. Many tariffs count calendar days from discharge, but you need to check the current tariff or your agreement.

How is a container check digit calculated?

Each letter and digit gets a value, each position is multiplied by a power of 2, the products are added up and the remainder after dividing by 11 is taken. If the remainder is 10, the digit is 0.

In logictra

Operations

A control tower with every operation, its status and its real route by sea and road.

Warehouse

Your warehouse floor plan in 3D, with zones, locations and dock arrivals.

Request a demo

We'll show you how logictra handles it with sample data for your type of company.