# Container demurrage and per diem calculator

> Work out container demurrage or per diem from the first free day, free days and tiered daily rates: last free day, charged days and total, with an example.

URL: https://roadmark.ai/tools/demurrage
Language: en

Demurrage is the daily charge for a container left at the terminal or rail ramp past its free days; per diem, or container detention, is the daily charge for keeping the box out past its free days before it comes back empty. Count every calendar day from the first free day to the day it leaves or returns, subtract the free days, and charge each remaining day at its tier's daily rate.

## How demurrage and per diem are worked out

Both run on calendar days against a free-time allowance. Demurrage runs while the box sits at the terminal; per diem runs while it's out until it comes back.

```
Days used = out date − first free day + 1
Last free day = first free day + free days − 1
Charged days = days used − free days (never below zero)
Charge = the charged days in each rate step × that step's daily rate, added up
```

- **Calendar days:** count, weekends included, unless the tariff excludes weekends or holidays from free time.
- **The last free day:** is free: the first charged day is the day after.
- **Tiered rates:** step up after a set number of charged days; each day bills at the rate of the step it falls in.

## Worked example: One import box at the ramp, one out on per diem.

Container EGHU 604412 7, a 40' high cube at the CN Brampton ramp, had 4 free days from Mon, Sep 21, so its last free day was Thu, Sep 24. Still at the ramp on Tue, Sep 29, it has used 9 days: 5 charged at $220.00 CAD a day, $1,100.00 CAD so far. Picked up on Fri, Oct 2, it would owe $1,760.00 CAD.

Container MSCU 482117 3 went out to the customer on Tue, Sep 22 with 5 free days, to Sat, Sep 26. Still out on Tue, Sep 29: 3 days of per diem at $150.00 CAD, $450.00 CAD.

## The example box, day by day

Every calendar day from EGHU 604412 7's first free day to Friday, with the running total in Canadian dollars.

| Date | Day | Status | Charge | Running total |
| --- | --- | --- | --- | --- |
| Mon, Sep 21 | 1 | Free | CA$0.00 | CA$0.00 |
| Tue, Sep 22 | 2 | Free | CA$0.00 | CA$0.00 |
| Wed, Sep 23 | 3 | Free | CA$0.00 | CA$0.00 |
| Thu, Sep 24 | 4 | Free | CA$0.00 | CA$0.00 |
| Fri, Sep 25 | 5 | Charged | CA$220.00 | CA$220.00 |
| Sat, Sep 26 | 6 | Charged | CA$220.00 | CA$440.00 |
| Sun, Sep 27 | 7 | Charged | CA$220.00 | CA$660.00 |
| Mon, Sep 28 | 8 | Charged | CA$220.00 | CA$880.00 |
| Tue, Sep 29 | 9 | Charged | CA$220.00 | CA$1,100.00 |
| Wed, Sep 30 | 10 | Charged | CA$220.00 | CA$1,320.00 |
| Thu, Oct 1 | 11 | Charged | CA$220.00 | CA$1,540.00 |
| Fri, Oct 2 | 12 | Charged | CA$220.00 | CA$1,760.00 |

## Demurrage and per diem questions

### What's the difference between demurrage and per diem?

Demurrage is charged while a loaded container stays at the terminal or ramp past its free time. Per diem, also called container detention, is charged while the container is out, with the trucker or the customer, past its free time until it comes back. One box can run up both.

### When does free time start?

Terminal free time usually starts when the container is discharged or available for pickup; per diem free time starts when it's gated out. The carrier's or terminal's tariff says which, so enter the first day that counts.

### Do weekends and holidays count?

Usually, because most tariffs count calendar days, but some exclude weekends or holidays from free time. This calculator counts calendar days; check the tariff for exclusions.

### How do tiered demurrage rates work?

Many tariffs raise the daily rate after a set number of charged days. For example, at $150.00 a day for the first 4 days and $250.00 a day after that, 6 charged days cost 4 × $150.00 + 2 × $250.00 = $1,100.00.

### Is the last free day charged?

No. A container picked up or returned on its last free day owes nothing; the first charged day is the day after.

## More free calculators

- [Drayage](https://roadmark.ai/drayage)
- [Chargeable weight calculator](https://roadmark.ai/tools/chargeable-weight): Actual against volumetric weight for an air shipment, at IATA's 6,000 cm³/kg or 166 in³/lb, line by line.
- [Freight class calculator](https://roadmark.ai/tools/freight-class): Density in pounds per cubic foot for each pallet, and the class the NMFC's 13-sub density scale gives it.
- [Detention calculator](https://roadmark.ai/tools/detention): What a truck's time at the dock past its free time comes to, on the invoice and on the driver's pay.
- [Fuel surcharge calculator](https://roadmark.ai/tools/fuel-surcharge): Surcharge per mile from the diesel price, the base price and miles per gallon, the total for a trip and its share of the linehaul.
- [Cost per mile calculator](https://roadmark.ai/tools/cost-per-mile): A truck's fixed and per-mile costs over the miles it runs, as a cost per mile, and the margin at a rate per mile.
- [Cross-dock fee calculator](https://roadmark.ai/tools/cross-dock-fees): A cross-dock visit's bill: handling per pallet in and out, the minimum, storage after the free time and extras, per pallet and against what you charge.

## Related pages

- [Demurrage vs per diem vs detention in drayage](https://roadmark.ai/blog/demurrage-per-diem-detention): Who charges demurrage, per diem and detention on a container, when each clock starts and stops, and a worked import example with every charge computed.
- [Ocean freight](https://roadmark.ai/ocean-freight): Containers, cutoffs and demurrage
- [Intermodal](https://roadmark.ai/intermodal): Ramps and rail cutoffs

Companies, people and shipment figures in product examples are fictional. They illustrate workflows and are not customer testimonials or measured results.