Supply Chain & InventoryFree calculatorPDF, Excel, Word export

Demurrage and Detention Cost Calculator for Ocean Containers

Demurrage and detention are the per diem charges carriers bill when a container stays too long at the terminal or outside it. This calculator lets you test free days, tier breakpoints and clearance delay so you can see what a late release really costs.

Your numbers

days

Calendar days from discharge to gate out, unless the tariff counts working days.

days
days
$/day
days
$/day
$/day
days

From gate out to empty return.

days
$/day

Your results

Total D&D for all containers
$7,440
Average cost per container per day held
$93
Chargeable demurrage days
8
Days in tier 1
5
Days in tier 2
3
Days in tier 3
0
Demurrage per container
$1,500
Detention per container
$360

Illustrative tiers only. Use the actual tariff or service contract of your ocean carrier, which sets free time, tier breakpoints, whether weekends count and the equipment type. Rates are not published here.

Save results:

Total D&D vs days in terminal

Sweeps Days in terminal after discharge from 0 to 30, holding your other inputs fixed.

Container event tracking review

Optional: we can look at how container dates and carrier invoices reach your ERP and suggest ways to catch D&D earlier.

Optional. The tool and every export work without this. No spam.

Demurrage versus detention

Demurrage is charged for a loaded container sitting inside the port or terminal beyond free time. Detention is charged for equipment held outside the terminal, for example at your warehouse, beyond its free time until the empty is returned. Some carriers combine them into a merged day count. Always check how your contract defines the start and stop events, such as discharge, availability, gate out and empty return.

How to use it

Enter the number of containers, days at the terminal and days held outside, then fill in free days and tier rates from your tariff. The calculator counts only days beyond free time, splits them across the tiers and adds detention. Use the chart to see how fast the total climbs when customs release slips. Escalating tiers mean the tenth day usually costs far more than the fifth.

  • Obtain the tariff in writing before arrival
  • Confirm whether weekends and holidays count
  • Track the start event, not just the vessel ETA

Worked example

Four containers sit 12 days, with 4 free. That leaves 8 chargeable days: 5 in tier 1 at 150 and 3 in tier 2 at 250, which is 1,500 per container. Detention is 8 days out with 5 free, so 3 days at 120, or 360. Per container the cost is 1,860, and for four containers the total is 7,440. Clearing three days earlier would remove the whole tier 2 amount.

Common mistakes

Counting days from the vessel ETA instead of the discharge or availability date, ignoring a free-time extension agreement, and treating detention as optional are frequent errors. Failing to log gate-out and return dates makes disputes hard to win. Record container numbers, dates and invoice references in your ERP or TMS so charges can be matched to cause, and so late-arriving documents are traced to the supplier or broker.

Frequently Asked Questions

Who pays demurrage and detention?

Normally the party named as merchant or consignee in the carrier's bill of lading terms is liable, which can be the importer even when a broker or forwarder causes the delay. Your commercial contract and Incoterm decide who should bear the cost between buyer and seller, so settle that before shipping.

Can demurrage be disputed?

Often, yes. Common grounds are terminal closures, missing carrier release, equipment unavailable for pickup, or free time not applied correctly. Regulators in some countries set billing rules for these charges. Keep timestamps and emails, and raise the dispute with the carrier within the period stated in its tariff.

Do weekends count as free days?

It depends on the tariff. Some carriers count calendar days, others exclude weekends and holidays at the terminal. This tool counts days exactly as you enter them, so convert working days to the day count your contract uses before you enter the figure.

How can I reduce demurrage and detention?

Pre-clear customs before arrival, send documents early, book trucks ahead, negotiate longer free time for the lane, and choose a terminal or drayage partner with return slots. Review lanes that repeatedly exceed free time and fix the root cause, which is often document timing.

If D&D invoices are checked by hand against emails, Netray can help match container events to invoices and flag disputable charges before they are paid.