Demurrage and detention calculator
This demurrage calculator works out container charges once free time runs out. Enter the date the clock starts and stops (or just the number of days held), the free days from your tariff and the per-day rates for each tier, and it returns the charge per container and for the whole consignment, with a tier-by-tier breakdown.
Use it for demurrage (the container sits at the port or terminal), detention (the container is out with you and not yet returned empty), or a combined charge, by changing the dates that start and stop the clock. It is a spreadsheet replacement that runs in your browser; nothing is uploaded.
How to use the Demurrage & Detention Calculator
- Choose demurrage or detention, the currency and how many containers are held.
- Enter the start and end dates, or type the number of days held if you already know it.
- Enter the free days from the bill of lading or line tariff, and choose whether weekends count.
- Fill in the rate tiers: each row says “from charged day N, this much per day”. Add or remove tiers to match the tariff.
- Read the total, the last free day and the per-tier breakdown. Copy the summary for an email or dispute.
Demurrage & Detention Calculator features
Tiered rates
Escalating daily rates are the norm; each tier applies from its start day until the next tier begins.
Dates or days
Counts days between two dates, with or without the first day and weekends, or takes a number you type.
Last free day
Shows the calendar date free time ends, so you know the deadline to collect or return.
Many containers
Charges are per container per day and multiplied by the number held, with optional tax.
Demurrage versus detention
Demurrage is charged by the shipping line or terminal when a laden container stays inside the port or terminal beyond its free time before it is picked up. Detention is charged when the container has left the terminal but is not returned empty in time. Some lines bill a combined charge covering the whole period from discharge to empty return. Which applies, and when the clock starts, is set by the tariff or contract.
Rates usually escalate to push cargo out of the port. A typical card looks like: five free days, then days 1–5 at one rate, days 6–10 at a higher rate and day 11 onward at the highest, often with different rates for 20 ft and 40 ft containers and for reefers. The sample values here are illustrations, not any carrier’s tariff.
| Tier (charged days) | Sample rate per day | Days in 15-day example | Amount |
|---|---|---|---|
| Free days 1–5 | none | 5 | 0 |
| Charged days 1–5 | $75 | 5 | $375 |
| Charged days 6–10 | $150 | 5 | $750 |
| Total per container | 15 days held | $1,125 |
Checking a bill
Compare your own dates with the line’s: gate-in and gate-out times, whether the first day counts, and whether weekends and public holidays are counted or skipped. A one-day difference changes the tier. In the US, billing rules for ocean carriers and terminals are in the Federal Maritime Commission’s 46 CFR Part 541 (effective May 2024; one provision was removed in December 2025 after a court ruling), so check the current text on eCFR before disputing an invoice. Other countries have their own port rules.
To plan costs before the box arrives, add demurrage risk to the landed cost calculator, check which party pays under trade terms, and use the container loading calculator to size shipments.
Limits
- No tariff is built in: free days and rates are yours to enter from the document that governs the shipment.
- Holiday calendars are not included. If holidays are excluded in your tariff, enter the days held directly.
- Port-specific extras such as storage, congestion surcharges or chassis fees are separate; add them elsewhere.
Demurrage & Detention Calculator FAQ
How is demurrage calculated?
Chargeable days = days held − free days. Each chargeable day is billed at the rate of the tier it falls in, per container, then multiplied by the number of containers.
What is the difference between demurrage and detention?
Demurrage is for containers staying at the port or terminal; detention is for containers kept outside it past the free time.
Does the first day count?
It depends on the tariff. The tool has a checkbox so you can match your carrier’s rule.
Are weekends counted?
Usually every calendar day counts, but some tariffs skip weekends or holidays. Choose the option your tariff states.
Can I use it in Excel?
It does the same arithmetic as a spreadsheet. Copy the summary into your own workbook if you need one.
Are these rates real?
No. The sample rates are placeholders. Free days and rates always come from the shipping line’s or terminal’s published tariff.