OCEAN

Free freight tool

Demurrage and Detention Calculator

Audit container free time and estimated charges using the governing events, day-count convention, free days and tiered rates. Calculate demurrage, detention or combined D&D and export the result.

Carrier tariff

Add as many tiers as the governing tariff requires. The final blank-days tier applies to all remaining days.

Demurrage

Detention

Terminal storage

Container events and billed amounts

Record exact carrier/terminal timestamps; the tariff is calculated by eligible calendar dates.

Demurrage
Detention
Terminal storage
Container / periodDaysFree / last freeChargeableExpectedBilledVariance
Not enteredDemurrage05No calculated date0USD 0.00USD 0.00USD 0.00
Not enteredDetention05No calculated date0USD 0.00USD 0.00USD 0.00
Not enteredTerminal storage00No calculated date0USD 0.00USD 0.00USD 0.00

Tariff-versus-invoice result

USD 0.00 questioned

Expected USD 0.00 · Billed USD 0.00 · 1 container · demurrage, detention and terminal storage separated.

Country dates can be loaded from the Nager.Date public-holiday API. Verify them against the governing port/terminal calendar and add terminal-only closures manually. Offset-bearing event timestamps are converted to the entered IANA timezone before tariff-day counting. This audit does not decide tariff applicability, force majeure, customs holds, exceptions or legal liability.

Recommended next step

Check dates and free time against the arrival notice before disputing charges.

Short answer

How demurrage and detention are calculated

Count the days between the contractual start event and the end event, deduct the free days allowed by the tariff or service contract, and apply each rate tier only to the days that fall inside it. Demurrage covers the carrier's container sitting inside the terminal beyond free time; detention covers the container held outside the terminal. Getting the answer right depends less on the arithmetic than on identifying the correct start event, day-count convention and tier boundaries.

  • Chargeable days = counted days − free days, floored at zero
  • Tiers are progressive, not retroactive
  • Calendar and working-day counting give different answers
  • Terminal storage is often a separate charge from carrier demurrage

Container Free Time and Chargeable Days

  • Calculate demurrage, detention or combined D&D
  • Choose calendar or Monday–Friday counting
  • Set inclusive or exclusive start dates
  • Export an invoice-audit CSV

Demurrage and Detention Calculation Method

The calculator counts days from the selected operational events under the disclosed day and start-date convention, deducts free time, allocates chargeable days through the entered rate tiers and adds fixed fees.

Contracts differ on inclusive dates, local holidays, start events, combined free time and storage. Confirm the governing tariff or service contract.

Which charge are you actually looking at

Before any calculation, establish what is being billed. Three distinct charges are routinely conflated, and disputing the wrong one wastes the limited window you have to challenge an invoice.

Demurrage is the carrier's charge for its container remaining inside the terminal or depot beyond free time. Detention is the carrier's charge for its container being held outside the terminal beyond free time. Storage is the terminal's or depot's charge for occupying its ground, and it is frequently billed by a different party under a different tariff with different free time. A single delayed import can generate all three simultaneously.

Distinguishing the three time-based charges
ChargeWhose assetWhereTypical import period
DemurrageCarrier's containerInside the terminalFrom discharge or availability until the full container gates out
DetentionCarrier's containerOutside the terminalFrom full gate-out until the empty container is returned
StorageTerminal's groundInside the terminalFrom discharge until gate-out, under the terminal's own tariff

Some tariffs combine demurrage and detention into a single continuous allowance, often labelled 'combined D&D' or 'merged free time'. Read the governing contract rather than assuming the market convention.

The calculation, and where it goes wrong

The formula is trivial. Chargeable days equal counted days minus free days, floored at zero; the charge is the sum of each tier's day count multiplied by that tier's rate, plus any fixed fees. Almost every dispute is about the inputs, not the multiplication.

Four inputs decide the answer, and all four vary by contract: the start event, whether the start day itself counts, whether the count runs on calendar days or working days, and where the tier boundaries sit. Change any one of them and a five-figure invoice can move by thousands.

The start event

'Discharged', 'available', 'free time commences' and 'last free day' are four different things, and carriers use them inconsistently. Discharge is when the box came off the vessel; availability is when customs and terminal processes allow it to be collected. On a shipment held for inspection, those dates can be a week apart, and which one starts the clock is worth more than any rate negotiation.

Inclusive or exclusive start

If free time is five days from a Monday discharge, does Monday count as day one or does the clock start Tuesday? Both conventions exist in live tariffs. The difference is exactly one chargeable day on every affected container, which on a fifty-container programme is not a rounding error.

Calendar days or working days

Calendar-day counting includes weekends and public holidays; working-day counting excludes them. A container discharged on a Thursday before a long weekend can attract three extra chargeable days under one convention and none under the other. Local holiday calendars matter here, and they are the destination country's holidays, not yours.

Progressive tiers

Tiered tariffs escalate: the first few chargeable days cost one rate, the next block more, everything after that more again. Tiers are applied progressively, so each day is charged at the rate for the band it falls in — not at the highest rate reached. Retroactive application of the top tier to all days is a genuine and recurring billing error.

Worked example: a tiered import demurrage calculation

A 40ft container is discharged on 1 March and gates out full on 13 March. The service contract allows 5 calendar free days counted from the day after discharge, with tiers of USD 90 per day for days 1–3, USD 160 per day for days 4–7 and USD 230 per day thereafter, plus a USD 45 administration fee.

Counting from 2 March to 13 March inclusive gives 12 counted days. Deducting 5 free days leaves 7 chargeable days. Those 7 days fall into the first tier (3 days) and the second tier (4 days). The time charge is (3 × 90) + (4 × 160) = 270 + 640 = USD 910, and the total with the administration fee is USD 955.

Tier allocation for 7 chargeable days
TierDay rangeDays in tierRate per dayAmount
Tier 1Chargeable days 1–33USD 90.00USD 270.00
Tier 2Chargeable days 4–74USD 160.00USD 640.00
Tier 3Chargeable days 8+0USD 230.00USD 0.00
FixedAdministration feeUSD 45.00
Total7USD 955.00

Had the tariff counted the discharge day itself, the count would be 13 days, chargeable days 8, and the total USD 1,185 — a USD 230 difference from one convention.

Always reconcile day counts before rates

Negotiating the rate is the instinctive response to a large invoice and usually the least productive. Confirm the day count first: wrong start events, wrong free-time allowances and retroactive tier application are far more common than wrong rates, and they are much easier to evidence.

Auditing a demurrage or detention invoice

Work from evidence rather than recollection. Assemble the documents before you open the spreadsheet, and record the source of every date you use — an audit that cannot cite where a date came from will not survive a carrier's response.

  1. 1Collect the service contract or tariff, booking confirmation, arrival notice, terminal availability record, gate-in and gate-out records, equipment interchange receipts, empty-return receipt and the invoice itself.
  2. 2Identify the charge type from the invoice wording — demurrage, detention, combined D&D or terminal storage — and confirm which party's tariff governs it.
  3. 3Match the container number, size and type, and the import or export movement, against your own records.
  4. 4Establish the contractual start and end events and pin each to a dated, evidenced record rather than an email.
  5. 5Confirm the day-count convention, the inclusive or exclusive start, and any holiday treatment for the destination country.
  6. 6Deduct the free-time allowance that the contract actually grants, including any lane-specific or customer-specific extension you negotiated.
  7. 7Allocate chargeable days progressively across the tiers and check the invoice has not applied the top tier retroactively.
  8. 8Verify fixed fees, taxes and currency separately, and confirm each was disclosed in the tariff.
  9. 9Compare your total against the invoice, and where they differ, raise the dispute in writing within the applicable window with the evidence attached.

What to do when the delay was not yours

Free time exists to allow normal commercial collection. When the container could not be collected — because the terminal was congested, the vessel discharged late, the carrier had not released the Bill of Lading, or customs held the cargo for inspection — the fairness of charging for that period is exactly what a dispute turns on.

In the United States, the Federal Maritime Commission's demurrage and detention billing rule sets specific requirements for what a compliant invoice must contain and gives the billed party a defined window to request fee mitigation, refund or waiver. Other jurisdictions have their own regimes, and many service contracts contain their own dispute clauses. The practical point is universal: these windows are short, and an invoice not disputed inside the window is usually payable regardless of its merits.

  • Diarise the dispute deadline the day the invoice arrives, before you investigate the merits
  • Dispute in writing, addressed to the party named on the invoice, with the container number and invoice reference in the subject line
  • Attach the evidence rather than describing it: gate records, the availability notice, the customs hold notice, the release timestamp
  • State the specific line you dispute and the amount, rather than rejecting the invoice as a whole
  • Where the carrier's own delay caused the period, say so explicitly and cite the record that shows it
  • Keep paying the undisputed portion if the contract requires it, so a genuine dispute does not become a payment default

Prevention beats audit every time

The cheapest demurrage invoice is the one that never arrives. Track the last free day on every import from the moment the arrival notice lands, escalate at 48 hours remaining rather than on the day, and treat a missing carrier release or an unfiled customs entry as an operational alarm rather than a task on a list.

Demurrage Calculator FAQ

Practical answers to the questions operators, forwarders and shippers ask most often about demurrage & detention calculator results.

What is the difference between demurrage and detention?

Demurrage is charged when the carrier's container stays inside the terminal or depot beyond free time; detention is charged when the container is held outside the terminal beyond free time. On a typical import, demurrage runs from discharge or availability until the full container gates out, and detention runs from gate-out until the empty is returned. Some tariffs merge the two into a single continuous allowance, so the invoice wording and the governing contract decide, not the market convention.

How do I calculate demurrage charges?

Count the days between the contractual start and end events under the tariff's day-count convention, subtract the free days, and apply each rate tier only to the days falling within it. Add any fixed or administrative fees separately. The arithmetic is simple; the accuracy comes from confirming the start event, whether the first day counts, whether weekends and holidays count, and where the tier boundaries sit.

What is the last free day?

The final day on which the container can be collected or returned without incurring a time-based charge. It is derived from the start event plus the free-time allowance under the applicable counting convention, so it moves if any of those three change. Always take it from the carrier's own statement where one is given, and reconcile that against your own calculation rather than trusting either alone.

Do weekends and public holidays count toward free time?

It depends entirely on the tariff. Calendar-day counting includes them; working-day counting excludes them. Many tariffs count calendar days for demurrage and working days for detention, or vice versa, within the same contract. Where holidays are excluded, they are the destination country's public holidays — a point that catches out shippers applying their own national calendar.

Are demurrage tiers applied progressively or retroactively?

Progressively, under every standard tariff: each chargeable day is billed at the rate for the band it falls into, so seven chargeable days across two tiers are billed partly at each rate. Retroactive application of the highest reached tier to every day is a billing error, and it is common enough to be worth checking on every tiered invoice.

Can I dispute a demurrage invoice?

Yes, and the window is usually short. In the United States, the Federal Maritime Commission's billing rule sets requirements for what a compliant invoice must contain and gives the billed party a defined period to request mitigation, refund or waiver. Elsewhere, the service contract or carrier terms govern. Diarise the deadline as soon as the invoice arrives, dispute the specific line rather than the whole invoice, and attach dated evidence rather than describing it.

Who is liable for demurrage — the shipper or the consignee?

It depends on the freight terms, the Bill of Lading, the service contract and, in some jurisdictions, statute. A merchant clause in the carrier's terms can make several parties jointly liable, including a party that never took possession of the cargo. Do not assume that because you did not collect the container you cannot be billed for it; check the contract you actually signed.

Does terminal storage count as demurrage?

No, though the two run over the same period and are frequently confused. Storage compensates the terminal for occupying its ground and is billed under the terminal's tariff, often by a different party, with its own free time and its own rates. An import can accrue carrier demurrage and terminal storage simultaneously, and disputing one does not affect the other.

What causes most demurrage charges?

In practice: customs entries filed late or held for examination, carrier release not obtained because the original Bill of Lading or telex release was outstanding, no haulage capacity booked for the collection window, terminal congestion and appointment scarcity, missing or incorrect documentation at destination, and consignees who simply were not told the container had arrived. Most of these are visible days in advance if the arrival notice is processed on receipt.

How much free time should I expect?

It varies widely by trade lane, carrier, contract and equipment type — commonly in the range of three to seven days for import demurrage on standard dry equipment, with reefers and special equipment often allowed materially less. Free time is negotiable on contracted volume, and extended free time is frequently a cheaper concession for a carrier to grant than a rate reduction, which makes it worth asking for.

Does this calculator work for export shipments?

Yes, but the milestones are different. Export periods usually run from empty pickup to full gate-in, and sometimes to vessel loading, rather than from discharge to empty return. Enter the export start and end events your contract specifies; the day-count, free-time and tier logic is identical.

Can GainingDocx warn me before free time expires?

Yes. When an arrival notice is extracted, the vessel, ETA, port, container references and any printed free-time or last-free-day dates are captured as structured fields on the shipment record, so the deadline becomes a tracked date rather than a line buried in a PDF attachment.

Related tools, templates and guides