Free time is set by the carrier’s tariff or negotiated in the freight contract, and it differs by port, container type and carrier. It can be granted separately for demurrage and detention or as a single combined period.
Extra free days are a common thing to negotiate for importers who regularly need time for customs or unloading.
Knowing the exact last free day for every container is basic operational hygiene; a forwarding system that tracks it per container stops the bills before they start.

