Skip to content

Demurrage and detention calculator

Work out what the clock has already cost you - demurrage and detention, on tiered rates, across every container in the shipment.

Charges are per container per day. Special equipment - reefer, open top, flat rack - is on a separate and much higher scale.

Demurrage - the box is still inside the terminal

From your contract.

Discharge to gate-out.

Opening band.

How many chargeable days the rate above covers before it steps up.

Leave both blank to run the opening rate flat.

Detention - the box is out of the terminal, with you

Often a different allowance.

Gate-out to empty return.

Opening band.

Chargeable days before the rate steps up.

Leave both blank to run the opening rate flat.

Fill in whichever clock is running. Demurrage and detention are separate charges and either one works on its own.

How this is calculated

Chargeable days = days used - free days   (never below zero)

Flat tariff:
  Cost per container = chargeable days x daily rate

Tiered tariff:
  Band 1 days = lesser of chargeable days and band 1 length
  Band 2 days = chargeable days - band 1 days
  Cost per container = band 1 days x rate 1 + band 2 days x rate 2

Total = (demurrage + detention) x containers

Assumptions

  • Demurrage and detention are separate charges on separate clocks and are calculated separately here. Demurrage is the box inside the terminal past free time; detention is the box outside the terminal, with you, past free time.
  • Rates and free days are yours to supply. They vary by carrier, port, container type and contract, and any figure hardcoded into a calculator would be wrong for most people using it.
  • The second rate band is optional. Leave it blank and the first rate runs flat, which the working states rather than assuming silently.
  • Days are counted exactly as you enter them. Whether a tariff counts calendar days or working days, and whether it excludes weekends and holidays, differs between carriers.
  • Reefer, open top, flat rack and other special equipment is charged on a separate and much higher scale than standard dry containers.

How to use this demurrage and detention calculator

Start with the number of containers, then fill in whichever side of the clock is running. Both sides are optional on their own - if only the box at the terminal is late, fill in demurrage and leave detention blank.

For each side you need three things: the free days your contract grants, the total days used, and the daily rate. The calculator subtracts free days from days used, never goes below zero, and multiplies out across your containers.

The two extra fields on each side are the ones that make this accurate rather than approximate. Almost every real tariff is tiered - a cheaper opening band, then a step up - so enter how many chargeable days the first rate covers and what the rate becomes after that. Leave them blank and the first rate runs flat, and the working says so explicitly rather than letting you assume a tiered tariff was handled.

Worked example

Two containers discharged at Felixstowe. Your contract gives 5 free demurrage days and 7 free detention days. Customs held the entry, so the boxes sat 12 days at the terminal, and once collected they were not returned empty for 11 days.

The tariff charges 90.00 a day for the first 5 chargeable demurrage days and 180.00 a day after that. Detention is 65.00 flat.

Demurrage chargeable days: 12 - 5 = 7. The first 5 fall in the opening band and 2 land in the second: 5 × 90.00 + 2 × 180.00 = 810.00 per container.

Detention chargeable days: 11 - 7 = 4, flat: 4 × 65.00 = 260.00 per container.

Per container that is 810.00 + 260.00 = 1,070.00, and across two containers, 2,140.00.

Now the number that actually matters: one more day costs another 180.00 of demurrage plus 65.00 of detention on each box, so (180.00 + 65.00) × 2 = 490.00 a day. That is what an overtime trucking slot or an expedited customs entry is competing against, and it is why the calculator prints it.

Why a flat rate understates the bill

Carriers do not set demurrage to make money on storage. They set it to get their equipment moving, which means the rate is engineered to become intolerable rather than merely annoying.

The practical shape of that is tiering. An opening band that looks survivable, then a step, and on many tariffs a third band several times the first. A delay that costs a modest amount over three days can cost many times that over twelve, and the curve bends upward exactly when a shipment is already in trouble.

Most calculators on the web take a single daily rate and multiply. That is fine for a two-day overrun and badly wrong for a two-week one - and nobody opens a demurrage calculator because everything is going smoothly. Entering the band length and the second rate takes ten seconds and is the difference between an estimate and a number you can take to a meeting.

The two clocks, and the day that gets billed twice

Demurrage and detention sound interchangeable and are not. The terminal gate separates them.

While the container is inside the terminal after discharge, waiting for you to collect it, demurrage runs. Once it passes the gate and is in your possession, detention runs, until the empty is returned to the nominated depot. One clock stops roughly where the other starts.

Roughly is the operative word, and it is where invoices get argued. The handover day is frequently claimed on both sides, and on a tariff where the later demurrage band is running at several hundred a day, a single disputed day is worth checking. Pin down the exact gate-out timestamp from the terminal, not from the trucker’s paperwork.

Storage is a third thing again, billed by the terminal for the ground the container occupies rather than by the carrier for its equipment. It can run in parallel with demurrage on the same box. Two invoices for the same days from two different parties is normal and not a duplicate.

Your dispute rights, if this is a US import

This is the part most calculators leave out entirely, and it is worth more than the arithmetic.

The Federal Maritime Commission’s Final Rule on detention and demurrage billing practices was issued on 23 February 2024 and took effect on 28 May 2024. It changed what a carrier or terminal has to do to make a charge stick:

  • An invoice must be issued within 30 calendar days of the charges last being incurred. For a non-vessel-operating common carrier, within 30 calendar days of the invoice they received.
  • The invoice must carry specific identifying information. Missing any of it eliminates the obligation to pay that charge - not reduces it, eliminates it.
  • A billed party has at least 30 calendar days to request mitigation, a refund or a waiver, and the billing party must attempt to resolve the request within 30 calendar days unless both sides agree otherwise.

So before paying a large D&D invoice on a US import, check the date it was issued and check that it contains what the rule requires. An invoice that arrives four months later, or one that cannot show why the charge applies to you, is not automatically owed.

None of that applies outside US jurisdiction, and none of it is legal advice - but it is a documented, published rule, and it is the first thing to look at when the number in this calculator comes out uncomfortable.

Getting the free days right is worth more than getting the rate right

Every conversation about demurrage is about the daily rate, and the daily rate is the input you have least control over.

Free days are negotiable, and they are usually negotiated at booking, when nobody is thinking about them. Two extra free days on a lane where your customs clearance is routinely slow costs a fraction of what it saves, and the carrier is far more willing to discuss it before the container is on the water than after it has been sitting for a week.

The other lever is upstream of the port entirely. Most demurrage is caused by paperwork rather than by trucking - an entry filed late, an original bill of lading in transit, a payment not cleared, a release not issued. Clearing customs before arrival rather than after it removes the most common cause outright, and it costs nothing.

Frequently asked questions

How to calculate demurrage and detention charges?
Subtract your free days from the days actually used to get chargeable days, multiply by the daily rate, and multiply again by the number of containers. Do it separately for each - demurrage covers time inside the terminal, detention time outside it, and the two usually have different free-day allowances and different rates. If your tariff steps the rate up after an opening band, split the chargeable days across the bands rather than using one flat rate.
What is the formula for calculating demurrage charges?
Demurrage equals chargeable days multiplied by the daily rate, multiplied by the number of containers, where chargeable days is days used minus free days and never goes below zero. On a tiered tariff it becomes band one days times rate one, plus band two days times rate two. The calculator above prints the whole line so you can check it against the invoice figure by figure.
What is the difference between demurrage and detention?
The terminal gate divides them. Demurrage accrues while the container sits inside the port past its free time, waiting to be collected. Detention accrues once the box has left the terminal and is with you, from the moment free time runs out until the empty is returned. The Federal Maritime Commission describes detention as a charge for extended use of the equipment and demurrage as exceeding free time on a marine terminal.
How much does demurrage cost per day?
There is no single figure, and any calculator that supplies one is guessing on your behalf. It varies by port, carrier, container type and contract, and nearly every published tariff steps the rate up the longer the box sits, with later bands routinely several times the opening rate. Special equipment such as reefers is on a far higher scale again. Take the numbers from your own tariff or bill of lading.
How many free days before demurrage?
Free time is set by your carrier contract rather than by any regulation, so it differs by carrier, trade lane and what you negotiated. It is granted separately for demurrage and detention in most tariffs, and the two allowances are often different lengths. It is also one of the easier things to improve - extra free days are usually cheaper to secure at booking than the charges they would have prevented.
What does "14 days free detention and demurrage" mean?
It usually means a combined or merged clock - one pool of 14 days covering the whole period from discharge until the empty container is returned, rather than two separate allowances. It is simpler to track but less forgiving, because a delay anywhere in the chain eats the same pool. If that is your arrangement, enter the entire period on one side of this calculator and leave the other blank.
What are the detention charges for a 40-foot container?
There is no standard rate. It is set by the carrier for the specific port and contract, and a 40ft is commonly charged more than a 20ft although not always. What matters more than the box size is where you sit in the tariff bands, because the rate typically escalates after the opening few chargeable days. Take the figure from your tariff and put both bands into the fields above.
Who pays demurrage charges in shipping?
The importer or consignee is normally the party billed, because they control collection. Contractually it depends on the Incoterm and your agreement with the carrier, and the party that caused the delay is not always the one invoiced. Under the FMC billing rule a carrier must identify on the invoice who is being billed and why, which makes it considerably easier to push a charge back to whoever actually caused it.
What are MSC per diem charges?
Per diem simply means per day. Several carriers, MSC among them, use it as the name for the daily charge on equipment held beyond free time - what this calculator calls detention. Some tariffs stretch the term to cover demurrage as well, so check which clock an invoice is billing before paying it. Whatever it is called, the arithmetic is the same and this calculator handles it.
How to avoid detention charges?
Most of it is paperwork and timing rather than logistics. Clear customs before arrival rather than after, have the original bill of lading and any release in place before the vessel berths, and book trucking and delivery slots ahead of free-time expiry rather than on the day. Then give the empty return the same attention as the collection, because detention keeps running until the box is back at the nominated depot.
Why did my demurrage bill jump after a few days?
Because the tariff is tiered. Carriers set demurrage to move equipment rather than to earn storage revenue, so the opening days are deliberately cheap and the later ones punishing, and many tariffs add a third band several times the first. A bill that looked manageable on day two can multiply by day ten. Enter the band length and the second rate above and the calculator shows you exactly where the step lands.
Can demurrage and detention charges be disputed or waived?
Yes, and for US shipments there is a rule behind it. The FMC billing requirements, effective 28 May 2024, give a billed party at least 30 calendar days to request mitigation, a refund or a waiver, and require the billing party to attempt to resolve it within 30 calendar days. Invoices must be issued within 30 calendar days of the charges last being incurred, and an invoice missing the required information carries no obligation to pay it at all.

Related calculators

Sources & methodology

Last updated

Results are estimates for planning purposes. Verify with your carrier or customs broker before committing. This is not professional advice - see the disclaimer.

Every calculation runs in your browser. Nothing you type is sent to a server or stored anywhere.