Demurrage vs detention is a question that lands on a freight forwarder's P&L first, because forwarders buy D&D terms from carriers, sell their own D&D terms to customers and carry the exposure in between. This guide explains the difference, shows how D&D buy and sell rates shape freight forwarding margins and how D&D fees leak them, shares a global 3PL example and covers five places to protect margin. It also shows where to see your D&D in one place.
What Is Demurrage and Detention?
Demurrage and detention are the charges a carrier or terminal bills when a container stays beyond its free time. Demurrage charges apply when a loaded container stays in the port or terminal. Detention charges apply when a container stays outside the terminal, or an empty container is not returned. Together they are called demurrage and detention charges, or D&D fees, and both are billed per container, per day. The demurrage and detention difference comes down to where the container is when the clock runs.

Demurrage vs Detention: What Is the Difference?
The table compares the two charges side by side.
Container free days vary by port, carrier, container type and contract terms, and some contracts combine demurrage and detention into one free time window. A demurrage calculation multiplies the chargeable days by each container's daily rate. Portcast's free D&D rate tool estimates Maersk charges by port and delay duration, so you can see your exposure before an invoice arrives.
D&D Buy Rates vs Sell Rates: Where Forwarder Margin Is Made or Lost
A freight forwarder deals with D&D twice. The buy rate is what the carrier or terminal charges you: the free days and daily tariffs in your carrier contract, or the carrier's standard tariff where nothing was negotiated. The sell rate is what you charge your customer: the free days and daily tariffs in your quote or customer contract. Your D&D margin, or your D&D loss, is the gap between the two.
Illustrative Example: One Container, Two Sales Scenarios
In this example, you buy 14 combined free days from the carrier at USD 100 per day after that. In scenario A, you sell 10 free days to your customer at USD 120 per day after that. In scenario B, your sales team promised the customer 21 free days to win the business. The container is returned on day 16.
In scenario A, the USD 720 you bill covers the USD 200 the carrier bills you. In scenario B, the container is returned inside the free time you sold, so you bill nothing and the USD 200 is a loss. The figures are illustrative, not customer data, and assume both free time clocks start on the same day.

Three things move the gap between buy and sell:
- Free days: selling more free time than you bought leaves you paying the difference.
- Daily rates and tiers: carrier tariffs often step up after a set number of days, so a flat sell rate can fall below the buy rate on long dwells.
- Who caused the delay: charges caused by the carrier can be challenged on the buy side, while charges caused by the customer should be passed on at your sell rate, which only works if you can show the milestone evidence.
Across thousands of containers, that gap decides whether D&D is a recovered cost or a leak.
How D&D Charges Leak Your Margin as a Freight Forwarder
For a forwarder, margin is the gap between what you buy and what you sell. On The Loadstar podcast, Portcast and Metro discussed D&D charges, misquotes, costs that never get billed back and manual rework as common margin leaks in freight forwarding. D&D is one of the hardest to manage at scale, because the cost builds quietly across thousands of containers, carriers and customers.

Free Time Counts Down Where Nobody Is Looking
Free time sits in carrier tariffs and contracts, and the countdown for each container is rarely in front of the operator who needs it. The team works through the day's priorities, the container waits at the terminal, and the charge is only quantified after it is incurred.
Carrier Delays Add Days You Pay For
A rollover, a port rotation change or a container idling at a transshipment port adds days to the clock, and none of them is caused by you or your customer. Trucking booked for the original date breaks, the container waits, and free time keeps counting. Without the cause and the date in front of the operator, you cannot challenge the charge or warn the customer in time.
The Buy Side and the Sell Side Never Meet
You buy D&D terms from many carriers, each with its own free days and tariffs, and you sell to customers on your own terms. A misread tariff, or a sell tariff applied differently by each operator and branch, turns D&D into a line that loses money without anyone seeing it. Until the buy cost sits next to the sell tariff by lane, carrier and customer, you cannot tell where D&D costs you.
Customers Hear About It Late
Customers rarely see their own D&D exposure until the charge arrives. Operators then spend time explaining invoices and handling disputes, and you cannot rebill charges you cannot document. A customer who learns about the exposure while free time remains can still act on it, and you keep a record showing who caused the delay.
A Customer Example: How a Global 3PL Sees D&D
A global 3PL moving about 500,000 containers a year, with 15 regional operators, uses Portcast's Command Center white-labelled into its own portal.
Before the Command Center, free-time countdowns were buried in carrier documents and D&D was quantified only after it was incurred. One container sitting in Singapore produced USD 300,000 in charges. Now free days remaining and charges incurred sit on the same board as risk and delay, priced on negotiated buy and sell rates. About 1.1% of its containers run into D&D charges, and Portcast estimates that seeing them while free days remain makes about USD 6.6m of exposure something the team can still act on. Read the case study.
Where to Protect Margin From D&D Costs
Five control points cover a container's life, from booking to P&L. Each one supports shipping cost reduction by preventing or recovering D&D fees.

Before the Container Lands: Terminal Data for Demurrage Prevention
Demurrage prevention starts before the vessel berths, because landside cost is committed before the container lands. Portcast port terminal data adds Early Receipt Date, Last Free Day and pickup availability to the container journey, so planners work from the terminal picture as well as the vessel ETA. Portcast integrates terminal ETAs and berthing data, giving planners visibility of both vessel arrivals and expected terminal operations, so they can confirm the final pickup window. Portcast also detects disruptions at the discharge port, such as closures and congestion, and shows the D&D risk on the same shipments.
While Free Time Runs: Live D&D Totals and Last Free Day Alerts
Once the container is at the terminal, the job is to see free time running down while you can still act and avoid demurrage charges. Portcast's Command Center shows remaining free days and incurred charges on the same board as risk and delay, priced on negotiated buy and sell rates, and containers already accruing charges appear in the same view. Last Free Day alerts take free time from the contract that governs each container, with a lead time you set to match how long collection takes. Standard carrier free time and rates come pre-built and stay current, with your negotiated terms layered on top.
When a container sits, options like off-dock storage can cut costs for you and the customer. Darya, the Daily Agent, ranks every shipment overnight and gives each operator one brief of what needs action today. Where an operator handles one customer, the brief works as a daily report for that customer.
When the Delay Is the Carrier's: Rollover and Transshipment Alerts
A rollover at the port of loading or a delay at a transshipment port adds days before the cargo moves. Portcast flags rollovers at both points automatically, surfaces transshipment milestones and lets you set custom alerts, such as a container idle at a transshipment port for more than 7 days. The alert reaches the shipment owner, so the carrier conversation and the customer update both start with evidence.
Carrier reliability data helps at booking. Our Market Reliability Agent, Marina, benchmarks every carrier and bookable service on your lanes against the schedule published about three weeks before departure, and Portcast's Routing Agent, Reef, ranks live sailings on reliability, disruption avoidance, price and allocation.
At the Customer: Proactive D&D Reporting and Sell Tariffs
Customers who see their own exposure while free time remains can act on it, and disputes fall because no charge arrives as a surprise. Portcast provides standardized D&D reports that you share with customers on exposure, usage and where risk is building, or gives customers the view directly in the Command Center. On the sell side, Portcast shows your D&D contracts and spend by lane, carrier and customer, so you can build sell tariffs from the actual buy cost and apply them consistently across operators and branches. As a rule, keep sell free time at or below the free time you buy, and match or exceed the carrier's tiered daily rates, so every chargeable day you pay is covered by a day you bill.
Portcast develops its freight audit around forwarder workflows, covering freight forwarding invoice automation for carrier invoices on the buy side and customer billing on the sell side.
At Renewal and in the P&L: Free Time Use and Margin Visibility
Free time is paid for somewhere in the contract, and free time you buy and never use is money left behind. Portcast captures D&D at shipment level from milestones and shows how much negotiated free time each lane and trade uses, and where the buffer is consumed to the limit. You can then negotiate free time down where it goes unused and protect it where it is needed.
Live margin by customer, lane, branch and team, with D&D and audit findings feeding the same view, shows margin erosion as it happens. Cost recovery then becomes part of the margin you already manage.
Where to See My D&D: Portcast Command Center and Risk Management
Demurrage and detention management starts with one view. In supply chain logistics, D&D information often sits across carrier tariffs, customer contracts, terminal portals and invoices. Portcast's Command Center brings it into one view, next to the delay and risk signals that cause it, which gives freight visibility for forwarders at container level.
One D&D Board for Every Container
For each container, the Command Center shows free days remaining, the Last Free Day and charges already incurred, priced on your negotiated buy rate and on the sell rate agreed with the customer. With both side by side, you see per container what D&D will cost you, what you can bill back and how much margin is at stake. You can filter by customer, lane, carrier, terminal and branch, and containers approaching their free time limit are highlighted on the map.
Risk Management Next to D&D
D&D usually starts with a rollover, a port closure, congestion or a container idling at a transshipment port. Portcast's risk management scores shipments on operational and external risks and surfaces the ones most likely to cause issues automatically, so the operator sees the delay and the D&D exposure it will create on the same board. Freight risk management then links operations and finance in one view.
Dashboards for Managers, Views for Customers
KPI dashboards track carrier reliability, lane performance and D&D over time, so managers see which carriers, lanes and customers generate charges and where buy and sell terms need renegotiating. The same view can be white-labelled into your own portal, as the global 3PL above did, so customers see their exposure while free time remains.
Conclusion: Protect the Margin Before the Charge Starts
D&D charges leak margin at every stage of a container's life, from a booking made on an unreliable service to a charge that reaches the customer too late to act on. The fix is to see free time, delay and exposure early, in one place, and to act while the outcome can still change. Portcast's Command Center puts D&D free days and charges on the same board as operational and external risk, priced on your negotiated buy and sell rates, and Darya turns that board into one ranked brief for each operator every morning. For the global 3PL above, that meant about USD 6.6m of D&D exposure visible while free days remained (Portcast estimate).
To learn how Portcast can help your operation, talk to our team.
Frequently Asked Questions
What is demurrage and detention?
Demurrage and detention are the charges billed when a container stays beyond its free time. Demurrage applies when a loaded container stays in the port or terminal. Detention, also called per diem, applies when a container stays outside the terminal, or an empty container is not returned. Both are charged per container per day.
How do you calculate demurrage and detention charges?
Multiply the chargeable days by the daily rate for each container. Chargeable days start after free time ends, and free days vary by port, carrier, container type and contract terms. Portcast's free D&D rate tool estimates Maersk charges by port and delay duration, and freight audit checks invoiced charges against your contract.
How can freight forwarders avoid demurrage charges?
Track the Last Free Day and terminal ETA for every container, book pickup before free time runs down and confirm terminal availability. A ranked daily brief shows which containers need action today. When the delay is the carrier's, ask for a free-time extension or challenge the charge with milestone evidence before it is invoiced.
How should freight forwarders price D&D for customers?
Start from the buy side: free days and daily tariffs in each carrier contract. Set sell free time at or below the free time you buy, match or exceed the carrier's tiered daily rates and apply one sell tariff across operators and branches. Then track buy cost and sell charge per container to see D&D margin by customer, lane and carrier.
What does demurrage and detention management software do?
It monitors containers against free time, warns you before charges start and shows exposure by customer, lane and terminal. Portcast combines terminal data, risk alerts, a ranked daily brief and live D&D totals, priced on your buy and sell rates, so forwarders act while free time remains and can share exposure with customers.




