What is demurrage, and can you avoid it?
Demurrage is what you pay when a loaded container stays at the terminal longer than its free time. On an import, it covers the time from when the box is offloaded until it's picked up and gated out (leaves through the terminal gate). Exports have their own version, running from gate-in at the terminal until the container is loaded or the vessel sails. Once the container is outside the terminal, the charge becomes container detention instead.
Free time is the period the shipping line allows at no charge. There's no statutory number of days: it's set by the carrier's tariff or your contract, and it changes with the port, the carrier, the equipment and the facility. Some warehouses allow no free time at all. Storage is handled differently too. Hapag-Lloyd's German import tariff includes storage in demurrage, while Busan's HJNC terminal bills its own storage charges.
After free time ends, you're billed per container, per day, and the daily rate goes up in steps: a first period, a second period, then a higher rate for every day after that. The charge compensates whoever owns the equipment or the facility, and it gives you a reason to return the container or free up the space rather than leave it sitting at the port.
Demurrage can't always be avoided, but planning ahead and talking to everyone involved early can cut it significantly. If the container is gated out within free time, there's no demurrage for that period, although detention and storage charges are billed separately. This calculator handles the arithmetic: it takes total days minus free time to get the chargeable days (the days charged after free time ends), then prices each one at the rate for its tier.
How to calculate demurrage charges
Demurrage calculation comes down to two steps: find the chargeable days, then price them tier by tier. Chargeable days = total days − free time. Each chargeable day is billed at the rate of the tier it falls in, per container, and the tier amounts add up to the charge per container.
Tariffs differ on the details, so read yours before you count. Some use calendar days, others working days. Some start on the day of discharge, others on the day after gate-in at the container yard. Tiers are written either in chargeable days ("1st period: 3 working days") or in days counted from the start of the clock with free time included ("days 7–10"). Anything in the second form has to be converted to chargeable days first.
- Find the start and end dates your tariff uses. The clock may start at vessel arrival, on the day of discharge or the day after gate-in at the container yard, and for import demurrage it stops at gate-out. Check whether the tariff counts calendar days or working days.
- Count the total days and subtract the free time to get the chargeable days. If the result is zero or less, there's no demurrage for this period.
- Convert the tiers to chargeable days if your tariff counts from the start of the clock. With 6 free days, "days 7–10" is the first 4 chargeable days and "days 11–15" is the next 5.
- Assign the chargeable days to the tiers in order: tier 1 first, then tier 2, then the thereafter rate for every day that's left.
- Multiply each tier's days by its daily rate and add the results. That's the charge per container. Multiply by the number of containers for the total.
Example: 9 days at the terminal, 4 free days
A container stays at the terminal for 9 days under a tariff with 4 days of free time. The rates below are assumed for illustration: $150 a day for the first 3 chargeable days, then $300 a day.
| Days at terminal | 9 days |
| Free time | 4 days |
| Chargeable days | 5 days |
| Days 1–3 × $150 | $450 |
| Days 4–5 × $300 | $600 |
| Per container | $1,050 |
Demurrage for one container comes to $1,050. That's $150 for the first chargeable day but $210 a day on average.
Demurrage vs. detention vs. per diem
Which charge applies depends on where the container is and which stretch of time you're billed for.
| Charge | What it covers | Container location | Billed by |
|---|---|---|---|
| Demurrage | Loaded container kept at the terminal past free time (imports and exports) | Inside the terminal | Shipping line or terminal operator |
| Detention | Container used outside the terminal past free time (imports: pickup to empty return) | Outside the terminal (warehouse, in transit) | Shipping line |
| Per diem | Daily equipment charge that overlaps with detention; included in the FMC's demurrage and detention rules | Outside the terminal | Shipping line |
Common mistakes
- Mixing up demurrage and detention. Disputing a demurrage invoice for days the container actually spent outside the terminal means challenging the wrong charge. Check where the container was on each date first.
- Entering tiers exactly as the tariff prints them. If the tariff counts from the start of the clock ("days 7–10" after 6 free days), convert to chargeable days first, or every tier boundary shifts.
- Assuming calendar days. Some tariffs count working days, and carriers differ on which day counts as Day 1 and whether weekends and holidays are included. Read the tariff's counting rule before you trust any total.
- Paying a US invoice without checking it against the FMC rules. If required information is missing, or the invoice was issued more than 30 calendar days after charges stopped accruing, you may not have to pay.
- Leaving free time and demurrage rates out of the quote. Get them in writing, per container and per day, before you book.
- Forcing a tariff with more than three rate steps into the calculator. It takes two tiers plus a thereafter rate, so scales with more steps, such as HJNC's terminal storage charges in Busan or ONE's import demurrage in Japan, won't be reproduced exactly.
How is demurrage calculated?
Count the days the container spends at the terminal, using your tariff's start date, and subtract the free time. What's left are the chargeable days, meaning the days charged after free time ends. Fill the rate tiers in order: the first-period days at the first rate, the second-period days at the second rate, and every remaining day at the thereafter rate. Multiply each tier's days by its daily rate and add them up to get the charge per container, then multiply by the number of containers. Before you enter the tiers, check how your tariff writes them. Some count from the first chargeable day, while others count from the start of the clock with free time included, so those need converting to chargeable days first.
What is the difference between demurrage and detention?
The difference comes down to where the container is. Demurrage applies while the loaded container sits inside the terminal beyond its free time. Container detention covers the time it spends outside the terminal. On an import, detention starts when the full container is picked up and ends when the empty is returned to the container yard (CY). The FMC describes detention as a charge for extended use of intermodal equipment. In US trucking, "detention" also means a driver's waiting-time fee, which is a separate charge.
How many days of free time do you get?
There's no standard number. Free time comes from the carrier's tariff or your service contract (a negotiated contract with an ocean carrier), and it varies by port, carrier, equipment and facility. Some examples: Hapag-Lloyd's German import tariff, in force since January 1, 2026, gives standard dry containers 4 calendar days at Hamburg and Bremerhaven and 7 at Wilhelmshaven. Maersk's combined demurrage and detention tariff for Seychelles imports allows 10 days for dry containers, 3 for reefers and 5 for special equipment. Hapag-Lloyd's US import tariff that ran from October 1, 2023, to June 14, 2024 (no longer current) allowed the discharge day plus 4 working days (days the terminal or facility is open). Special equipment often gets less: that same US tariff allowed the discharge day plus 3 working days for special equipment and tank containers, and plus 2 for operating reefers. Check whether your free time is counted in calendar days (every day, weekends included) or working days.
When does the demurrage clock start?
On imports, the carrier decides. The clock can start at vessel arrival, during discharge or once discharge is complete. Discharge usually takes 2–3 days and can take up to a week in exceptional cases, so the start rule can make a big difference to the bill. Tariffs also disagree on what counts as Day 1: Hapag-Lloyd's German tariff starts on the day the container is discharged, while other carriers start the day after gate-in at the container yard, and weekends and holidays aren't always counted the same way. On exports, demurrage runs from gate-in at the terminal until the container is loaded or the vessel sails. The calculator treats the start date you enter as Day 1 and includes the end date.
How much does demurrage cost per day?
There's no single market rate. Demurrage is billed per container and per day, and the rate depends on the location, the equipment type and the tier you're in. Under Hapag-Lloyd's German import tariff at Hamburg and Bremerhaven, a 20ft container costs €80 a day for the first 4 chargeable days, €120 for the next 5 and €190 a day after that (€120, €190 and €240 for a 40ft). Hapag-Lloyd's expired 2023–2024 US import tariff charged $200, $250 and $300 per working day for standard containers. Use the rates from your own tariff or quote. The calculator shows a $ sign, but the arithmetic works the same in whatever currency you enter.
Why do demurrage rates go up the longer a container stays?
Demurrage compensates the owner of the equipment or facility, and it gives the cargo owner a reason to return the container or free up the space. Carriers also use it to stop containers being stored at the port for long periods. Because the daily rate rises with each tier, the average cost per day rises the longer the container stays. In the example on this page, the first chargeable day costs $150, but the average over five chargeable days is $210.
What does the FMC require on a demurrage invoice?
In the US, 46 CFR Part 541 has applied since May 28, 2024, under the Ocean Shipping Reform Act of 2022. It covers demurrage and detention invoices issued by ocean carriers, marine terminal operators and NVOCCs (non-vessel operating common carriers). To identify the shipment, the invoice must give the bill of lading number, the container number, the port of discharge for imports, and the basis for why the billed party is the proper party and liable for the charge. For timing, it must show the invoice date, the due date, the free time allowed, the dates free time started and ended, the container availability date for imports (the date the container became available for pickup), the earliest return date for exports, and the dates charged. For the rate, it must state the total amount, the tariff or service contract provision the charge is based on, and the rate applied. It also needs a contact for questions, instructions and deadlines for requesting mitigation, a refund or a waiver, and a certification that the charges comply with FMC rules and that the billing party's own performance didn't cause them. If required information is missing, you have no obligation to pay. The invoice also has to be issued within 30 calendar days of the last day charges accrued, or payment isn't required, and you get at least 30 calendar days from the invoice date to request mitigation, a refund or a waiver.
How can you reduce demurrage charges?
Have the cargo ready on time and start customs clearance before the vessel arrives. A freight forwarder can help you negotiate longer free time or better rates. Make sure your quote spells out the demurrage and detention rates and the free time, per container and per day, and keep the trucker, broker and consignee informed so pickup isn't delayed. Some carriers, Maersk among them, let you buy extra detention days when you book an import. If the container is gated out within free time, you pay no demurrage for that period, though detention and storage charges are billed separately.
Who gets billed for demurrage?
It depends on the terms of your contract and bill of lading, so check those first. At some terminals, the terminal operator bills its own demurrage and storage directly instead of the shipping line. For US invoices under FMC rules, the invoice has to state why the billed party is the proper party and liable for the charge. If that's missing, there's no obligation to pay. A separate FMC provision that limited who 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.
Is per diem the same as detention?
They overlap. Per diem is a daily charge for using the carrier's equipment outside the terminal, which is essentially what container detention covers. FMC rules count per diem as part of demurrage and detention charges. Check how the carrier's tariff defines whichever term appears on your invoice.
Are demurrage and detention reversed in some countries?
Yes. In most South American countries the terms are inverted: demurrage refers to time outside the port and detention to time inside it. If you trade with South America, agree with your counterparts which term means what before you compare quotes or dispute an invoice.
Can I use this calculator for a working-day tariff?
Only as a rough check. The calculator counts calendar days, with the start date as Day 1 and the end date included, and it can't skip weekends or public holidays. If your free time or tiers are set in working days, count the chargeable working days yourself using your tariff's rules. The calculator also takes just two tiers plus a thereafter rate, so a tariff with more steps won't be reproduced exactly.
Sources
All calculations run in your browser. Figures are based on published standards, carrier-published values and nominal dimensions, so check them against your carrier's own numbers before you book.
Last reviewed:
Embed this calculator on your site
Add this calculator to your own website for free. Paste the snippet below into your page; it includes a credit link back to this tool.
By default the widget follows the visitor's light or dark system setting. To lock the theme, add ?theme=light or ?theme=dark to the iframe URL.
<iframe id="cargosum-demurrage-calculator" src="https://cargosum.com/embed/demurrage-calculator/" width="100%" height="640"
style="border:1px solid #ddd;border-radius:4px" title="Demurrage Calculator | CargoSum" loading="lazy"></iframe>
<p>Powered by <a href="https://cargosum.com/demurrage-calculator/?utm_source=embed&utm_medium=widget&utm_campaign=demurrage-calculator">CargoSum Demurrage Calculator</a></p>
<script>window.addEventListener("message",function(e){if(e.origin==="https://cargosum.com"&&e.data&&e.data.type==="cargosum:embed-height"){var f=document.getElementById("cargosum-demurrage-calculator");if(f&&e.source===f.contentWindow)f.style.height=e.data.height+"px";}});</script>