In short: Demurrage runs on the terminal's clock and detention runs on the carrier's equipment clock, so they have different owners and different fixes. The US Federal Maritime Commission's 2020 interpretive rule set the test that a charge has to be capable of incentivising something, and its 2024 billing rule put a thirty day window on issuing invoices and a defined list of information they must carry. Most of the charge is generated in the seventy-two hours after discharge by appointment availability, chassis supply and your own receiving hours. Budget it as a right-skewed distribution whose tail sits on vessel bunching weeks, and carry the last free day in the planning model as the date the receiving schedule is built against.
The invoice arrives in the second week of the following month. Four hundred and twenty containers moved through the port in June, and there is a line for demurrage running to tens of thousands of dollars, another for per diem, and a spreadsheet of container numbers nobody in the building recognises. The freight team was not told at the time. The warehouse was never told at all. Whoever reconciles it is reading a record of decisions taken six weeks earlier, most of them by default, because nobody knew a clock was running.
This is the freight cost created after the rate is agreed, by operations, in hours, landing months later in a budget line with no mechanism attached for preventing it.
Two clocks with different owners
Demurrage runs while the container sits inside the terminal. On import it starts when the box becomes available and runs until pickup. On export it runs the other way, when a box is gated in before the earliest receiving date. Detention, billed as per diem across North America, runs while the carrier's equipment is outside the terminal in your possession, from gate-out until the empty is handed back.
These are different problems with different fixes. Demurrage is a pickup problem, turning on customs release, terminal appointment availability, chassis supply and drayage capacity. Detention is a return problem, turning on how quickly you strip the box, whether the empty return location is accepting your line's equipment that day, and whether the driver can get an appointment to hand it over. A team that buys more dray capacity and still gets billed heavily has usually been billed detention, and the answer was sitting in the empty return policy rather than in the dray.
The clocks also count differently. Free time is quoted in calendar days on some contracts and working days on others, so a weekend plus a public holiday moves a last free day by three days or by none depending on the convention. Tiers escalate: the first band might be modest, the second twice that, the third worse again, and the charge is far from linear in days late. That non-linearity is why average cost per container is a misleading way to look at this, and why a handful of badly overdue boxes usually account for most of the bill.
The charge lands on whoever is furthest from the cause
The consignee or the party that contracted the carriage receives the invoice. The causes are mostly elsewhere: terminal congestion, a customs examination order, a chassis shortage, an appointment system with nothing available for four days, an empty return restriction issued that morning. There is a clean economic argument about when that is defensible, which is that a charge changes behaviour only if the party being billed could have acted differently. If the gate is closed or the container is under hold, the per diem is a transfer with no incentive effect at all.
The US Federal Maritime Commission arrived at the same place through Fact Finding 28, which ran from 2018 into 2020 and led to its interpretive rule on demurrage and detention under the Shipping Act in 2020. The guiding principle in that rule is whether the charge served its purpose as a financial incentive to move freight, which made cargo availability and the practical ability to retrieve or return the container the questions the Commission would ask.
The same logic applies inside your own company and almost nobody applies it. The bill lands in a logistics cost centre. The lever that would have prevented it, an extra receiving shift or a weekend gate turn, sits in a warehouse labour budget owned by someone else, with no mechanism for one to buy relief from the other. The charge gets treated as weather.
What the 2024 billing rules changed
The Ocean Shipping Reform Act of 2022 required the Commission to write rules on how these charges are billed, and the final rule on demurrage and detention billing requirements took effect in 2024. Worth knowing precisely, because it converts a recurring argument into a checklist.
The rule sets who may be billed, which is the person for whose account the ocean transportation or storage was provided, or the consignee, and it stops the practice of billing several parties for the same charge. It specifies the minimum information an invoice must carry, including the date the container became available, the last free day, the chargeable days, the rate basis and the total, with contact details for disputing it. And it puts a thirty calendar day window on issuing the invoice after the charge last accrued, giving the billed party thirty days to request mitigation, waiver or refund.
What the rule did not touch is the free time itself, the tier structure, or the congestion that generates the charge. It changed the paperwork and the clock, and that matters for two reasons. An invoice carrying a container number, an availability date and a last free day is machine-readable in a way the old ones were not, which makes automated reconciliation possible. And an invoice missing a required element is a dispute with a rule behind it rather than a phone call.
This is United States trade only. Everywhere else free days and tiers are contractual terms won or lost in the tender, which is a separate exercise (Z1).
The last free day belongs in the planning model
Planning systems carry an ETA. Better ones carry an actual discharge date. Very few carry a last free day, the date that actually governs the cost.
Computing it is not hard. Take the availability date, which is discharge plus terminal processing plus customs release status, add the free days that apply to that carrier and terminal, then apply the calendar or working day convention and the local holiday calendar. The inputs come from a terminal availability feed and a contract table, and the output is one date per container.
Once that field exists, the receiving queue can be sorted by it. Sorting inbound by last free day rather than by arrival date costs nothing, changes which containers get the scarce appointments, and is a data change rather than a process change. It is the highest return item on the list and the one most often missing.
The second field worth carrying is the expected charge per container if it has not been collected by a given date, which turns a scheduling call into a priced one. A dispatcher choosing between two loads of equal urgency picks correctly when one shows 900 dollars of exposure on Friday and the other shows nothing. Dock capacity against that queue is FF3's subject, and staging the boxes once they arrive belongs to FF7.
Budgeting a charge that is mostly tail
Work the arithmetic on a single import port to see why the annual budget line is usually set wrong. Say 400 import containers a month. In a normal month, eight per cent breach the last free day by an average of 2.6 days at a blended charge around 180 dollars a day. That is 400 times 0.08 times 2.6 times 180, or roughly 15,000 dollars a month, and the budget gets set near 180,000 for the year.
Now bunch the vessels. Three ships discharge inside four days, which happens several times a year on most services and is visible in the published schedules a fortnight ahead. Two hundred containers become available in that window against a receiving operation sized for a normal week. The breach rate goes to thirty per cent, the average overrun to six days, and tier escalation lifts the blended rate to 260. That is 200 times 0.30 times 6 times 260, or about 94,000 dollars from one fortnight, more than six months of the baseline.
Two or three of those events is the difference between a 180,000 line and something past 400,000, and which one you get is decided by berth schedules you do not control. The mean of that distribution is the wrong number to budget against. Model it as frequency times severity, with severity conditioned on whether a bunching window is in progress, and simulate over your historical arrival pattern rather than averaging it.
The forecastable input is the bunching itself. Vessel schedules are published, and the count of containers becoming available inside a rolling seventy-two hour window is computable a week or two ahead. Plot that count against your daily appointment and receiving capacity, and the weeks where the two cross are the weeks that generate most of the annual charge.
The levers, ranked by what they return
Sequence the queue by last free day. Free, and it reallocates capacity you already have towards the boxes whose clock is closest to expiring.
Buy receiving capacity in the bunching week specifically. A weekend or night receiving shift costing, say, 2,400 dollars fully loaded, clearing 40 containers three days earlier at 220 dollars a day, avoids around 26,000 dollars. The return is close to ten to one. It rarely gets approved, because the budget boundary sits in the way and nobody sees the demurrage number until the following month. Approving that shift needs a standing rule with a threshold, since the decision window is two days long.
Strip and return rather than holding loaded boxes. Pulling a container off the terminal stops demurrage and starts detention, so a loaded box sitting in your yard is still burning per diem plus chassis rental. Stripping it into temporary floor space, even rented space, and returning the empty stops both clocks. That trade is usually favourable and rarely priced at the moment the decision gets made.
Coordinate empty returns and street turns. Handing an empty straight to an export booking instead of running it back to the depot removes a return appointment from the critical path and a leg from the dray bill.
Negotiate free days where your dwell distribution is wide. Two extra free days is worth a great deal on a lane where dwell varies and nothing at all on a lane where you always collect in a day.
Where this stops
You cannot dray your way out of a terminal that has no appointments. When the port itself is the constraint, the charge becomes a transfer, and the only real levers are volume timing and routing through a different port of discharge, both of which take months to arrange. UNCTAD's Review of Maritime Transport publishes median time in port for container ships each year, and the spread across countries runs to days rather than hours, which is a fair proxy for where this problem is structural.
The data requirement is strict and it is where most attempts stall. Attributing a charge to a decision means the container number has to work as a key across the carrier invoice, the terminal availability feed, the drayage system and the receiving record. In most companies at least one of those is a PDF, and until that is fixed everything above is an estimate.
Charges are contractual and vary by carrier, terminal and country, so anything modelled centrally has to hold per-line and per-terminal free time and tier tables as data. Container xChange has published an annual demurrage and detention benchmark since 2020 covering free days and charges across dozens of ports, and the dispersion between ports is the consistent finding. Those tables go stale every contract cycle, and somebody has to own them or the model drifts away from the invoices.
There is a limit on prediction too. The largest contributors to any given container's overrun, a customs examination order or a terminal system outage, are not predictable at the container level. What is predictable is the rate at which they occur across a month and the standby capacity that implies, which is enough to size a plan and no help at all on any individual box.
Take last quarter's demurrage and detention invoices, join them to your container records on container number, and sort the total charge by the day of the week each box became available. If most of the money went on containers available on a Thursday or a Friday, you have a weekend receiving problem, and that is a shift pattern decision you can make before the next vessels bunch.