Demurrage and detention are both daily charges on a container that has used up its free time, and both are billed per container, per day, at rates that step up the longer the container is held. That is why they hurt. They get mixed up because they hit the same box. The rule of thumb for demurrage vs detention is simple: demurrage runs while the loaded container sits inside the terminal, detention runs once the carrier’s equipment is outside it. For a sense of scale, nine major ocean carriers reported collecting about $15.4 billion in these charges between April 1, 2020 and March 31, 2025, according to data gathered by the FMC.
This guide covers when each clock starts and stops, a worked example for one container, how free time actually works, what the US FMC billing rule requires on an invoice, and how to keep both charges at zero. A note on wording: in US trucking, “detention” also means the fee a driver charges for waiting time. Here it means container detention only.
Demurrage, detention and storage charges at a glance
Demurrage is a daily charge for a loaded container that stays in the terminal (or the carrier’s inland container yard, or CY) past its free time. On an import, the clock runs from discharge until the container is gated out, meaning it leaves through the terminal gate.
Detention is a daily charge for keeping the shipping line’s equipment outside the terminal past its free time. On an import, it runs from gate-out until the empty container is returned to the designated empty depot. In the US, detention is often called per diem, a daily charge for the carrier’s equipment.
Storage charges are separate again. They come from an off-dock facility, such as a container freight station (CFS) or an off-dock yard, or from the terminal operator itself, under that facility’s own tariff. Carriers handle this differently. Hapag-Lloyd’s German import tariff includes terminal storage in demurrage and does not charge it separately. Maersk in the Seychelles says storage is payable directly to the port operator.
| Charge | Clock runs while | Starts | Stops | Free time (example) |
|---|---|---|---|---|
| Demurrage | The loaded container is inside the terminal | At discharge (exact start set by each carrier) | Gate-out | Hapag-Lloyd Hamburg, 20ft dry: 4 calendar days |
| Detention (per diem) | The carrier’s equipment is outside the terminal | Gate-out | Empty return to the depot | Set by the carrier’s tariff or your contract |
| Storage charges | The container sits at an off-dock depot or CFS | Per the facility’s tariff | Gate-out from that facility | Varies by facility |
It is not one or the other. A container that is picked up late and returned late pays demurrage first and detention after, one charge running straight into the next.
Each clock normally gets its own free time. Days you don’t use on the demurrage side do not carry over to detention. The exception is a tariff with combined free time, where one allowance covers both charges and runs as a single clock from discharge to empty return. Maersk’s Seychelles import tariff works this way, counting calendar days: 10 days for 20ft and 40ft dry containers, 3 for reefers and 5 for special equipment.
On exports the logic runs in reverse. Export detention covers the time from picking up the empty at the CY or depot until the loaded container is gated in at the terminal. Export demurrage covers the time from gate-in until the container is loaded on the vessel. Gating a container in before the earliest date the terminal will accept it, or leaving a container in the terminal after the cut-off time (the deadline for delivering cargo to the terminal), can also trigger terminal charges.
One more trap: in most South American countries the terms are reversed. Demurrage there means time outside the port and detention means time inside it. Confirm which meaning your trading partner uses.
Worked example: one container, both clocks
The rates here are assumptions for illustration. Your carrier’s tariff will differ. Both clocks use the same counting rule: calendar days, with the first day counted as Day 1 and the last day included.
Demurrage. The container is discharged on a Monday with 5 free days, so Monday through Friday is free. It is gated out the following Wednesday. That is 10 days in total, and 10 − 5 leaves 5 days charged after free time ends. The tariff charges $150 a day for days 1–3 and $300 a day from day 4:
3 × $150 + 2 × $300 = $1,050
Detention. The clock starts on that Wednesday, the gate-out day, with 4 free days, so Wednesday through Saturday is free. The empty is returned the Wednesday after. That is 8 days in total, and 8 − 4 leaves 4 days charged, Sunday through Wednesday. The rate is $100 a day for days 1–5:
4 × $100 = $400
For this one container, the two clocks add up to $1,450.
You can reproduce both figures with the demurrage and detention calculator. Enter a start date, an end date, the free days, the number of containers, and up to three rate tiers: days and daily rate for tier 1 and tier 2, and a rate for every day after that. It returns the days charged after free time and the amount per container and in total. Each run covers one period, so work out demurrage (discharge to gate-out) and detention (gate-out to return) separately and add them. For the example above, run October 5–14, 2026 (Monday to Wednesday) with 5 free days, 3 days at $150 in tier 1, 0 days in tier 2 and $300 thereafter, which gives $1,050. Then run October 14–21, 2026 with 4 free days and 5 days at $100 in tier 1, which gives $400. Under a combined free time tariff, do a single run from discharge to empty return.
Two uses for this: checking an invoice after the fact, and comparing your exposure before you choose a pickup or return date, for example a weekend trucking surcharge against one day of tier 2 demurrage. The calculator counts calendar days only, handles three rate tiers (tariffs with more are approximated), and shows amounts in $.
Free time: what to check and what you can negotiate
Free time is the number of days the carrier and the shipper or consignee agree on before charges begin. The number of days on paper is only part of it. Three things change how long it really lasts.
Calendar days or working days. Some tariffs count calendar days, others working days. Hapag-Lloyd’s German import tariff uses calendar days; its US tariff counted working days. Weekends and public holidays are also treated differently from carrier to carrier, so the same “5 days” can cover quite different stretches of time.
When the clock starts. Depending on the carrier, demurrage can start at vessel arrival, during discharge, or once discharge is complete. Hapag-Lloyd Germany starts it on the day the container is discharged. Maersk in the US starts free time at 08:00 on the first business day after discharge. Maersk US starts detention on the day the equipment leaves the carrier’s container yard. Unloading a vessel usually takes 2–3 days and, in exceptional cases, up to a week, so containers discharged first use up their free time first.
Equipment type. Reefers, special equipment, dangerous goods and out-of-gauge (OOG) cargo, meaning oversized cargo that exceeds the container’s dimensions, usually get less free time than a standard container. Some real tariffs:
- Hapag-Lloyd US (tariff valid October 1, 2023 to June 14, 2024, now expired): discharge day plus 4 working days for standard equipment, 3 for special equipment, 2 for operating reefers.
- Hapag-Lloyd Germany: 4 calendar days of demurrage for a 20ft dry container at Hamburg and Bremerhaven, 7 at Wilhelmshaven.
- HJNC, a terminal at Busan New Port: 4 free days of terminal storage, 3 for dangerous goods, OOG and reefer cargo. That is the terminal’s storage allowance, not the carrier’s demurrage free time.
- Maersk Seychelles: combined free time of 10 days for dry, 3 for reefer and 5 for special equipment.
You will see “typical” free time ranges quoted online. Treat them as rules of thumb, not as the terms you will get, and check the tariff that applies to your shipment.
Negotiating more. Free time is negotiable. Shippers with regular volume can build longer free time into their service contract, the contract signed directly with the ocean carrier. Some carriers sell it as a product option; Maersk Spot, for example, offers extendable free time. Your freight forwarder can also negotiate extensions and rates for you. Because extra free days cover delays you can’t control, such as port congestion or a customs hold, they can be worth more than an equivalent cut in the freight rate. Whether that holds depends on your lanes, so run the numbers.
Demurrage and detention appear on the invoice next to a range of other charges. For how they fit alongside other surcharges, see our guide to freight surcharges.
FMC billing rules for US shipments
This section applies to US trade. The FMC rule at 46 CFR Part 541 covers detention and demurrage invoices issued by ocean carriers, marine terminal operators and NVOCCs (non-vessel operating common carriers). It took effect on May 28, 2024, under the Ocean Shipping Reform Act of 2022, and it counts per diem as part of detention and demurrage.
Who bills whom. Demurrage is usually billed by the shipping line under its tariff. A terminal can also bill its own demurrage or storage directly; Hapag-Lloyd’s US tariff notes that the marine terminal operator will invoice its own demurrage and storage. Detention is the equipment owner’s charge, billed by the ocean carrier, or by an NVOCC to its own customer. Carrier terms may still hold the cargo parties liable: Maersk’s US terms say the shipper or consignee remains responsible for all charges, even when billing goes to an alternate party.
Deadlines. The invoice must be issued within 30 calendar days of the last day the charges accrued. If it isn’t, you don’t have to pay it. You then have at least 30 calendar days from the invoice date to request a fee mitigation, refund or waiver.
What the invoice must show. The rule lists required information, including:
- the bill of lading number, the container number and, for imports, the port of discharge
- the basis for why you are the proper party to be billed
- the free time allowed, with its start and end dates, and for imports the date the container was available for pickup
- the total amount due, the tariff or service contract provision behind it, and the rate applied
- a contact for questions and instructions for requesting a mitigation, refund or waiver, with deadlines
If required information is missing, you are not obligated to pay the charge. That gives you a specific, rule-based ground for a dispute.
What changed in 2025. The section that limited which parties could be billed (§541.4) was set aside by the D.C. Circuit on September 23, 2025, and removed from the CFR on December 29, 2025. The rest of the rule still applies.
To dispute a charge, you need your own record of when the container was gated out and when the empty was returned. Keep the equipment interchange receipt (EIR), the handover record issued when the container changes hands at the gate, and check its times against the dates on the invoice.
How to keep both charges at zero
These charges can’t always be avoided, but they can be cut sharply. The principle is to shorten the time between discharge and empty return, and to start before the vessel arrives.
Before arrival. Get customs clearance done before discharge so the container is ready to leave the moment it comes off the ship. Book drayage (short-haul trucking between port and warehouse) and a chassis for the expected discharge date, not the vessel’s estimated time of arrival (ETA). A chassis shortage can also eat into free time on a container that is otherwise ready to go.
During free time. Pick the container up early in its free time, not on the last free day. Leave it to the last day and a single gate queue or missed appointment turns straight into tier 1 charges. Carrier policy points the same way: Maersk’s US terms say their aim is to discourage waiting until the last day of free time and to promote the use of terminal appointments.
When the warehouse can’t unload right away. Drop and hook, leaving the container on its chassis in the yard until you can unload it, keeps the truck moving but keeps the detention clock running. Weigh the trucker’s chassis fee against the carrier’s detention; the calculator shows what each extra day of detention costs.
After unloading. Return the empty immediately, and confirm the return location first. Depots can restrict which container types they accept and on which days. A rejected return means a wasted trip and more days of detention.
Shipper-owned containers. A shipper-owned container (SOC) is not the carrier’s equipment, so it is not subject to detention. Demurrage can still apply: Maersk’s US terms say SOCs are subject to demurrage at some locations, while Maersk Seychelles charges neither. Maersk US also post-bills an extra $2,000 per container if an SOC is returned empty to a carrier facility.
If your volumes are small, a full container load (FCL) may not be the right choice in the first place. Compare the options in FCL vs LCL.
What is the difference between demurrage and detention?
Both are daily charges on the same container once its free time runs out. The difference is where the container is. Demurrage applies while the loaded container is still inside the terminal, from discharge until it is gated out. Detention applies to the shipping line’s equipment outside the terminal: on an import, from gate-out until the empty container is returned to the designated depot.
How many free days do you get for demurrage and detention?
It depends on the shipping line, the port, the equipment type and your contract, so check the actual tariff. As one example, Hapag-Lloyd’s German import tariff gives 4 calendar days of demurrage free time for a 20ft dry container at Hamburg and Bremerhaven, and 7 at Wilhelmshaven. Some tariffs count calendar days and others working days, and reefer, special and out-of-gauge equipment usually gets fewer days than a standard container. Shippers with volume can negotiate longer free time in their service contract.
Who charges demurrage, the port or the shipping line?
Usually the shipping line, under its own tariff. Some terminals also bill their own demurrage or storage charges directly, separately from the carrier. Detention is a charge for the equipment owner’s container, so it comes from the ocean carrier, or from an NVOCC (non-vessel operating common carrier) billing its own customer.
What does per diem mean in container shipping?
In US practice, per diem is a daily charge for using a shipping line’s container outside the terminal. It is the same charge this guide calls detention. The FMC’s billing rule counts per diem as part of detention and demurrage.
Can you dispute a demurrage or detention invoice in the US?
Yes. Under the FMC rule at 46 CFR Part 541, in effect since May 28, 2024, an ocean carrier, marine terminal operator or NVOCC must issue a detention or demurrage invoice within 30 calendar days of the last day the charges accrued, or you don’t have to pay it. The invoice must carry required details such as the bill of lading number, container number, free time allowed, the start and end dates of free time, and the applicable rate. If required information is missing, you are not obligated to pay. You get at least 30 calendar days from the invoice date to request a fee mitigation, refund or waiver.
How do you avoid demurrage and detention charges?
Clear customs before the vessel discharges, and book drayage and a chassis for the expected discharge date rather than the vessel ETA. Pick the container up early in its free time instead of on the last free day. Unload promptly, confirm where the empty goes before you send it, and return it straight away.
Can one container be charged both demurrage and detention?
Yes. If the container is gated out late and then returned late, it runs up demurrage first and detention after. In this guide’s worked example, with assumed rates, that comes to $1,050 of demurrage plus $400 of detention, or $1,450 for one container.
Do shipper-owned containers pay detention?
No. A shipper-owned container (SOC) is not the carrier’s equipment, so there is no detention. Demurrage can still apply: Maersk’s US import terms, for example, say SOCs are subject to demurrage at some locations.