Use this free detention calculator to estimate what you will pay for keeping a shipping line’s container too long outside the port. Enter the date the full container left the port, the date the empty was returned, your free days and the daily rates. You get the chargeable days and the total per container.
How to use the detention calculator
- Enter the gate-out date and the date the empty container was returned.
- Enter your detention free days from the arrival notice or contract.
- Enter the daily rates: tier 1 for the first days after free time, then the higher rate after that.
- Read the estimate. Email yourself the PDF if you need to check a carrier’s invoice.
How is detention calculated?
Detention = (days with the container − free days) × daily rate, with higher rates in later tiers. Example: 13 days, 7 free, 5 days at USD 50 and 1 day at USD 100 = USD 350.
What is the difference between detention and demurrage?
Demurrage is charged while the container sits inside the port terminal. Detention is charged once you take it out and do not return the empty on time. Some carriers combine both into one free-time period. Use the demurrage calculator for time at the port.
How can I avoid detention?
- Book unloading at your warehouse before the container arrives
- Ask for extra detention days when you book, if unloading is slow
- Keep gate-out and gate-in receipts to check the invoice
Related guides
- What is the difference between demurrage and detention?
- Demurrage calculator
- How do I calculate demurrage charges?
Last reviewed October 2026. Results are estimates based on the figures you enter, not quotes.