# The Demurrage and Detention Handbook: companion files

Julian R. Sterling. Companion page: julianrsterling.com/demurrage-detention

Start with the calculator to check your own containers and invoices; open the workbook to follow the book's case or to rebuild a full year from your own distributions.

1. **Demurrage_Detention_Calculator.xlsx**: a standalone calculator. Enter your demurrage and detention rate tiers, then, for each container, the availability, out-gate and empty return dates, the free days, the invoice date and whether each group of required invoice elements is present. It returns dwell and street days, the last free days, chargeable days, the charge by tier, the 30-day issuance test for each charge, the date until which a request for mitigation, refund or waiver is still within the 30-day window, and whether the invoice is payable as issued. The Annual_Budget tab turns average days and volumes into a quick budget. Prefilled with Example Co., six illustrative West Coast containers ($12,600 billed, $6,650 payable as invoiced): overwrite the blue cells. The check row must read 0. The About tab lists its limits and the common input errors.
2. **Demurrage_Detention_Workbook.xlsx**: the model behind every figure of the Tallmere Home Brands, Inc. case (a fictional importer of housewares). Tabs: README, Inputs, Volumes, Tariff_Tiers, Distributions, Charge_Calculator, Sample_Invoices, Annual_Bill, Unit_Costs, KPIs, Congestion, Free_Time_Offers, Merged_vs_Separate, Export_ERD, Invoice_Audit, Dispute_Log, Rail_Demurrage, Budget_2027 and Checks. It rebuilds the 2026 bill ($4,724,592, of which $4,622,725 of import demurrage and detention), the twelve sample invoices, unit costs and KPIs, the congestion sensitivity, the value of extra free time and the four carrier offers, merged against separate free time, export detention, the invoice audit ($646,290 contestable), rail demurrage and the 2027 budget ($2,620,594 all-in). All assumptions sit on the Inputs and Distributions tabs. The Checks tab must read 0.

Blue cells are inputs, black cells are formulas; no macros. Every company, volume, free time, rate, date and amount is fictional and invented for illustration, not any carrier's, terminal's or railroad's tariff and not market data. Education only, not legal, customs, tax or accounting advice: rules are described as read in November 2026.
