18 minute practical guide
Demurrage and Detention: Calculation, Free Time, Examples & Invoice Audit
Calculate demurrage and detention with free-time dates, tiered rates and worked examples. Audit invoices and understand the software features that prevent charges.
Free practical tool
Check your dates and charges
Use the free calculator to choose demurrage, detention or combined D&D; define the day-count convention; enter free time and tiered rates; and export a calculation audit.
Calculate demurrage or detentionDemurrage and detention in plain English
Demurrage and detention are time-based container charges. They are related, but they normally apply to different parts of the container journey. Demurrage generally concerns a carrier container remaining inside a terminal, port or depot after the agreed free time. Detention generally concerns the customer holding the carrier’s container outside that location after free time. Some tariffs combine both periods into one continuous allowance.
The practical question is not simply “How many days passed?” A reliable calculation must identify the correct charge, the contractual start event, the end event, the number and type of free days, whether the first day counts, whether weekends or holidays count, the equipment category, and the rate tier that applies to each chargeable day.
- Import demurrage commonly runs from discharge or availability until the full container gates out.
- Import detention commonly runs from full-container gate-out until the empty container is returned.
- Export demurrage and detention use different milestones, often involving empty pickup, full gate-in and vessel loading.
- Terminal storage may be separate from carrier demurrage and must not be silently treated as the same charge.
Demurrage vs detention vs storage
Demurrage relates to use of carrier equipment while it remains inside the terminal or depot beyond free time. Detention relates to use of that equipment outside the terminal. Storage is compensation for occupying terminal or depot space and may be invoiced by the terminal, carrier or another party depending on the local arrangement.
Names are not perfectly consistent across countries and contracts. A carrier may publish separate demurrage and detention schedules, a combined D&D schedule, or a schedule in which storage is separately billed. Always follow the definition in the tariff, service contract, booking confirmation or carrier terms that govern the shipment.
The demurrage calculation formula
For a simple single-rate tariff: chargeable days = counted elapsed days − free days, with a minimum of zero. Demurrage charge = chargeable days × daily demurrage rate. If the tariff is progressive, allocate the first block of chargeable days to tier 1, the next block to tier 2, and all later days to the final tier before adding fixed or administrative charges.
Example: a container has 5 free calendar days. The applicable counted period is 12 days. Seven days are chargeable. If the first 3 chargeable days cost USD 75 per day and later days cost USD 125 per day, the time charge is (3 × 75) + (4 × 125) = USD 725. A separate USD 40 administration fee would produce an estimated total of USD 765.
How to calculate demurrage charges step by step
Start with evidence, not assumptions. Obtain the booking or service contract, carrier tariff, arrival notice, terminal availability record, gate event, empty-return receipt and invoice. Record the timezone and event wording because “discharged,” “available,” “free time starts” and “last free day” are not interchangeable.
- Identify whether the invoice is demurrage, detention, combined D&D or terminal storage.
- Confirm the container number, size/type, import or export movement and applicable location.
- Find the contractual start and end events and their dates.
- Confirm whether the start date is included or excluded.
- Confirm calendar days, working days and any holiday treatment.
- Deduct the correct free-time allowance.
- Apply each progressive rate tier only to the days falling inside that tier.
- Add authorized fixed charges, taxes or administrative fees separately.
- Compare the calculation with the invoice and preserve the evidence used.
Free time and the last free day
Free time is the agreed period during which the relevant demurrage, detention, combined D&D or storage charge is not payable. It may come from the public tariff, a negotiated service contract, a spot booking or purchased additional free time. The last free day is the final counted day before the time-based rate begins.
Do not calculate a last free day by adding a number to an ETA. ETA may change and may not be the contractual trigger. Use the actual event named in the governing terms—such as discharge, availability, full gate-out or empty pickup—and apply the stated calendar, working-day and inclusion rules.
Calendar days, working days and inclusive dates
Many carrier schedules count calendar days, including weekends and holidays. Other arrangements use working days or exclude specified non-working days. Some tariffs include both the start and end date; others begin counting on the following day. A one-day convention error can move a charge into a more expensive tier.
A Monday–Friday calculator is not automatically a complete working-day calculator because local public holidays, terminal closures and force-majeure provisions may also matter. Treat the calculator as an audit worksheet and confirm exceptions from the governing source.
Worked detention-time example
Assume an import container gates out full on Friday 3 July and is returned empty on Monday 13 July. The contract excludes the gate-out day and counts Monday through Friday only. There are six counted weekdays: 6, 7, 8, 9, 10 and 13 July. With two free working days, four days are chargeable.
If the first three chargeable days cost USD 50 each and later days cost USD 100, detention is (3 × 50) + (1 × 100) = USD 250. If the tariff instead uses inclusive calendar days, the answer is materially different. This is why the calculation should show its day basis and start-date convention.
How to audit a demurrage or detention invoice
Recalculate every billed container separately. Confirm that the invoice uses the correct contractual party, container, location, movement, event dates, free-time source, rate schedule and currency. Compare the invoice’s first and last charged day with terminal and carrier event evidence.
For U.S. ocean transportation, the Federal Maritime Commission’s billing rule contains requirements concerning who may be billed, invoice timing, required information and the process for mitigation, refund or waiver requests. The legal position can evolve, so consult the current FMC materials and obtain professional advice for a live dispute.
- Container number and bill of lading or booking reference
- Correct billed party and billing issuer
- Start and end dates with supporting event records
- Free days and any negotiated extension
- Calendar/working-day and inclusive/exclusive convention
- Equipment-specific tiered rates
- Duplicate terminal storage or overlapping invoices
- Mitigation, waiver or dispute contact and deadline
What good demurrage and detention software should provide
A calculator is useful for a single invoice. Operational D&D software should go further: centralize containers, capture carrier and terminal milestones, store free-time rules, calculate last free dates, alert teams before exposure begins, preserve evidence, support invoice reconciliation and show patterns by carrier, port, customer and responsible workflow.
Competitor platforms emphasize real-time container visibility, at-risk alerts, exception workflows, charge estimates, evidence management, collaboration and analytics. Those capabilities matter because preventing a charge is normally more valuable than calculating it after an invoice arrives.
- Container-level event timeline and source evidence
- Separate and combined free-time rules
- Configurable calendar, holiday and inclusive-date logic
- Tiered rates by carrier, port, equipment and movement
- Alerts before last free day and before each rate increase
- Owner, task and exception status
- Invoice matching, dispute package and audit export
- Cost and root-cause analytics
How to reduce demurrage and detention
Prevention begins before arrival. Confirm document cutoffs, customs readiness, payment and original-document or release requirements. Arrange drayage capacity and delivery appointments early. Track discharge, availability, holds and last free day. Confirm the empty-return location because depots can change, and retain screenshots or messages if a valid return appointment is unavailable.
After each exception, record the cause instead of treating the charge as an isolated finance item. Repeated costs may point to late documents, customs delays, unavailable appointments, warehouse congestion, incorrect free-time master data or poor handoffs between operations and transport providers.
Common demurrage calculation mistakes
Typical errors include starting from ETA instead of the tariff event, confusing demurrage with detention, applying one free-time allowance to separate charges, ignoring combined D&D terms, excluding weekends without authority, using the wrong equipment rate, calculating all days at the highest tier, and overlooking purchased or negotiated free time.
Another frequent error is relying on a calculator without saving inputs. An audit should show the exact dates, rules, rates and source documents used so another person can reproduce the result.
Put the guide into practice
Use the free calculator to choose demurrage, detention or combined D&D; define the day-count convention; enter free time and tiered rates; and export a calculation audit.
Calculate demurrage or detentionFrequently asked questions
How is demurrage calculated?
Count the days between the contractual start and end events using the tariff’s date convention, deduct free time, allocate the remaining days across the applicable rate tiers and add authorized fixed charges.
What is the difference between demurrage and detention?
Demurrage generally applies while a carrier container remains inside a terminal or depot beyond free time; detention generally applies while it remains outside in the customer’s possession. Governing terms control.
Do weekends count in demurrage calculations?
They often do when a tariff uses calendar days, but not every contract is the same. Confirm the carrier tariff or service contract and any local holiday rules.
What is a detention time calculator?
It counts the applicable period outside the terminal, deducts detention free time and applies the agreed daily rate tiers. A useful calculator also discloses its start-date and working-day assumptions.
Can demurrage and detention be combined?
Yes. Some tariffs provide one combined free-time period covering both the inside-terminal and outside-terminal portions of the container cycle.
Is the calculator a carrier invoice?
No. It is an independent audit estimate. The booking, tariff, contract, event evidence and applicable law determine the payable amount.
Research sources and further reading
Operational terms vary by carrier, contract and jurisdiction. These sources informed the guide; verify the current governing document for a live shipment.
- Maersk — What is demurrage and detention?
Carrier explanation of demurrage, detention and free time.
- Maersk — Detention and demurrage terms
Carrier definitions for free time, storage, separate and combined D&D.
- Federal Maritime Commission — D&D billing rule
U.S. regulatory overview of billing, timing and dispute requirements.
- Beacon — Demurrage and detention visibility
Competitor workflow reference for alerts, dwell visibility and root-cause analysis.
- FourKites — Ocean visibility
Competitor workflow reference for exposure monitoring and exception prioritization.