Container Free Time in a Shipping App: Separate Demurrage, Detention and the Combined Arrangement
A shipping app should not calculate every container's free time from one generic “arrival date”. First identify the applicable arrangement: separate demurrage and detention, or a combined period. Then connect the relevant operational events, agreed free time and reviewed tariff basis to that arrangement.
This is a requirements guide for an import team's tracking and finance handoff. It uses Maersk's published terms as an example, not a universal carrier tariff or a legal determination that a charge is payable. Have the responsible logistics and commercial specialists confirm the actual contract, country-specific conditions and applicable rules before using calculations for decisions.
The equipment's location changes the question
In the cited terms, demurrage concerns holding the carrier's container inside the terminal, port or depot beyond agreed free time. Detention concerns holding it outside. Combined demurrage and detention covers the combined inside-and-outside period beyond agreed free time.
A fictional importer collects a full container and later returns it empty. A single status called “delivered” can conceal whether the app means discharge, gate-out, delivery to the consignee or empty return. Those are not interchangeable timestamps.
Specify the operational event names and evidence the team actually has. A consignee confirming that goods reached its premises should not automatically create an empty-return event. If the return evidence is missing, preserve that gap rather than stopping every relevant clock because the commercial order is complete.
Do not add the separate and combined models together
Maersk's compensation section explicitly describes detention and/or demurrage and combined detention and demurrage as alternatives. Its terms direct readers to the carrier information for the applicable separate or combined treatment.
Your app should therefore retain which arrangement was reviewed for the shipment. It should not calculate a combined allowance and then silently add separate demurrage and detention amounts for the same covered use merely because all three formulas exist in the software.
Storage is another distinction. The terms describe compensation for use of port, terminal or depot facilities and say separate invoicing is country-specific. Do not assume a container-equipment allowance settles every facility charge. Have the specialist identify which charges the planned tracker covers and which remain outside it.
Preserve the contract basis instead of a customer-wide default
The terms define free time as the agreed period for which the specified compensation is not paid. They also refer to published tariffs unless specifically agreed otherwise. That does not provide one universal number of free days for every customer or route.
In the commissioning brief, identify the shipment or equipment scope, arrangement, agreed allowance and evidence of the tariff or specific agreement. Ask who may approve those inputs and what happens when the agreement is disputed or absent. A previous shipment can be a reference, but should not automatically prove the next shipment has the same terms.
This article supplies no tariff amounts or calendar-day formula. Define time zones, included dates, exclusions and any applicable counting rules from the actual reviewed conditions. A timer that looks precise is not reliable if its starting event or contractual basis is wrong.
Let event corrections reopen the calculation
The published import table identifies different application periods for the separate and combined arrangements, including an inland-depot condition for the combined case. It is a reason to model the actual reviewed route, not to copy one port-arrival rule everywhere.
Ask the developer to preserve the source and observation time of each event. Distinguish a planned collection from confirmed gate-out, and an intended empty return from accepted evidence of return at the agreed location. Corrected event data should produce a traceable recalculation, not silently replace a previously supplied estimate.
Keep estimated exposure separate from an actual carrier invoice and from the finance team's accepted payable amount. Recording an operational delay does not itself establish that every item on a later invoice is correct. Define a handoff for unexplained differences rather than promising automatic dispute resolution.
Demonstrate the same journey under different arrangements
Use synthetic shipment events and specialist-approved example conditions. Show separate and combined cases, a missing gate-out, a missing empty return and a corrected event. Include a facility-storage item that the tracker must not silently treat as container detention.
Check that the app retains the applicable arrangement, evidence, assumptions and unresolved questions in its finance export. It should show why a calculation changed and avoid charging the same covered period under both alternative models.
Bring a blank carrier-condition example to a shipping workflow-app discussion. The useful deliverable is an explainable free-time tracker and commercial handoff, not a guarantee that a shipment has no charges or that a locally displayed deadline binds a carrier.
Source: Maersk terms for detention and demurrage, sections 2 and 3. Confirm the actual shipment's current conditions and relevant local information; no real shipment or invoice was assessed for this guide.