ShipEstimator
  1. Home
  2. Demurrage and Detention Calculator

Ocean · Port charges

Demurrage and Detention Calculator

Enter the dates the container became available, left the terminal and came back empty, with the free time and rates in your contract. You get the chargeable days and the bill, tier by tier.

ShipEstimatorD&D charges
Calculate
Charges
Total charges– 
Demurrage–
Detention–
Days at terminal–
Days out of port–
Free time ends–
Invoice must be issued by–

How the demurrage and detention calculator works

Demurrage and detention are the two clocks that start when an import container comes off the ship. Demurrage is charged for leaving a full container at the terminal; detention (called per diem in North America) is charged for keeping the carrier's container outside the terminal until it is returned empty. Each clock gives you a number of free days, then charges a daily rate that usually rises in tiers.

  1. Free time starts on the availability or discharge date for demurrage, and on the gate-out date for detention. That first day counts as day one.
  2. Weekends are skipped while free time runs if your tariff says free time excludes weekends and holidays. Once free time is over, every calendar day is charged, which is how most tariffs read.
  3. Tiers price the chargeable days: for example four days at the first rate, four at the second, and every day after that at the third.
  4. Merged D&D: some carriers run a single clock from availability to empty return with one combined free time. Tick the option to use the first set of tiers for the whole period.

The gate-out day counts on both clocks under most tariffs, which the calculator follows. The rates loaded in the form are illustrative only: real rates differ by carrier, port, container type and contract, so copy yours from the tariff, terminal schedule or service contract.

Worked example: a slow pick-up and a slow return

A 40-foot container is available on 2 November, picked up on 9 November and returned empty on 20 November, with 4 free days on each clock and the tiers loaded above.

  • Demurrage: 8 days at the terminal, free time ends on 5 November, so 4 days are charged at the first tier: $600.
  • Detention: 12 days out, free time ends on 12 November, 8 days charged, four at $125 and four at $200: $1,300.
  • Total: $1,900, on a box that might have cost two or three thousand dollars in freight.

If free time excluded weekends, the same dates would cost $1,900: the weekends inside each free period push the start of the charges back.

US rules on demurrage and detention invoices

For containers moving through US ports, the Federal Maritime Commission's billing rule (46 CFR part 541, in force since May 2024) sets what a valid demurrage or detention invoice must contain and when it must be sent:

  • The invoice must be issued within 30 calendar days of the day the charge was last incurred. If it is late, the billed party does not have to pay. The calculator shows that deadline.
  • It must identify the bill of lading and container numbers, the free time allowed with its start and end dates, the container availability date for imports, the specific days charged, the rate and the tariff or contract rule it comes from.
  • It must explain how to dispute the charge, and the billed party then has at least 30 days to do so.
  • The part of the rule that limited who could be billed was set aside by the US Court of Appeals for the D.C. Circuit and removed in December 2025. The contents and timing requirements above still apply.

The FMC's interpretive rule on unreasonable practices says charges should give an incentive to move cargo: if the terminal was closed, an appointment was impossible or the carrier would not accept an empty, the charge may be challenged. A charge complaint can go through the Commission's interim procedure or, as the Commission confirmed in September 2026, through a traditional complaint before an administrative law judge or small claims officer, where the carrier must show the charge was reasonable. Keep gate records and appointment screenshots.

Truck detention at shippers and receivers

Trucking detention is a different charge with the same name: the fee a carrier bills when its driver waits at a dock beyond the free time, typically two hours. In the example loaded in the truck mode, a driver arrives at 08:00 and leaves at 12:10: 250 minutes on site, 130 over the free time, billed as 135 minutes in 15-minute steps, $168.75 at $75 an hour. Detention also costs the driver legal hours: the US 14-hour window keeps running while they wait, which is why the hours of service calculator matters to dispatch.

Mistakes that run up D&D

  • Booking the truck after the vessel arrives. Free time is short; book drayage before discharge.
  • Forgetting the return leg. Detention runs until the empty is back at the depot the carrier names, which is not always the terminal it came from.
  • Not asking for extra free time. Importers with volume routinely negotiate 7 to 14 days in their service contracts.
  • Paying invoices without checking dates. Compare the days charged with your gate records and the 30-day issue deadline.

Questions shippers ask

What is the difference between demurrage and detention?

Demurrage is for a full container left inside the terminal after free time; detention is for keeping the carrier's container outside the terminal, full or empty, until it is returned. In North America detention is often called per diem.

How many free days do you get for a container?

It depends on the carrier, the port and your contract. Three to five days on each clock is common for standard dry containers at US and European ports; contract customers often get more, and reefers less.

Does free time include weekends?

Some tariffs count calendar days, others exclude Saturdays, Sundays and public holidays from free time. Check the wording; the calculator handles both.

How long does a carrier have to send a D&D invoice in the US?

Thirty calendar days from the day the charge was last incurred, under the FMC's rule at 46 CFR 541.7. An NVOCC passing a charge on has thirty days from the invoice it received.

How is truck detention calculated?

Time on site minus the free time (often two hours), rounded up to the carrier's billing step, times the hourly rate in the rate confirmation.

Sources

Rules checked: November 2026 Free time and daily rates are set by each carrier, terminal or contract; the figures in the form are examples.

Rates, fees and the rule pages behind this tool are checked automatically twice a week; last check 14 November 2026.