Skip to content
Browse tools

Date arithmetic: counting days, working days and deadlines without getting it wrong

Two people can count the days between the same dates and disagree by three. The difference is conventions — and which ones your contract assumes.

By X Centrix AIDates & Time5 min read

The same two dates, three legitimate answers

Monday to Friday. How many days apart? It depends entirely on which convention you are using, and all three answers below are correct under a convention that somebody genuinely uses.

  • Difference: 4 days. The count of elapsed days between the dates, excluding the start.
  • Inclusive: 5 days. Counting both ends, which is how hotel nights, holidays and notice periods are usually expressed.
  • Working days in between: 4 or 5, depending on whether the endpoints count as working days.

This is why two date calculators can disagree and both be right. Before arguing about the answer, agree on the convention — that is the whole disagreement, every time.

Calendar days versus working days

A calendar day count includes every day. A working day count excludes weekends and, in most jurisdictions, public holidays. The two diverge fast: a fortnight is 14 calendar days and 10 working days, but add a public holiday and it is 9, and if the period straddles a long weekend the practical difference is larger than the arithmetic suggests.

Working-day deadlines are the standard for anything with a legal or contractual clock, and the standard failure is to count them in calendar days. Ten calendar days from a Monday lands on the Wednesday of the following week. Ten working days from the same Monday lands on the Friday after that — two days later, and four business days of difference in when the work must actually be finished.

Starting Monday, no holidaysCounts asLands on
10 calendar days10 days, weekends includedWednesday of the following week
10 working days10 business daysFriday of the following week

And each public holiday inside the window pushes a working-day deadline out by one further day. That is not a rounding detail: a deadline quoted as 'ten working days' in December can land five days later than the same deadline in February.

A date is not an instant, and that breaks things

This is the failure that catches software rather than people. 2026-10-01 denotes a calendar date. It does not denote a moment in time, but most programming languages will happily convert it into one by assuming a timezone — usually midnight in whichever zone the machine happens to be in.

Parsed as UTC midnight and then read back with local getters anywhere west of UTC, the date slides backwards by a day. Everything downstream of that — the weekday, the working-day count, the month — is then wrong, and it is wrong in a way that tests written in London or Johannesburg will never reveal.

Do date arithmetic in whole days, not in timestamps. Count days by calendar date and the timezone question disappears; convert to an instant and you inherit it.

Leap years, and why February is the awkward one

A year is a leap year when it is divisible by four, except for centuries, except when divisible by 400. So 2024 is a leap year, 1900 was not, and 2000 was. Getting this wrong by a day is minor; getting it wrong by applying the simple every-four-years rule produces an error that only shows up around century boundaries.

The genuinely awkward case is an anniversary. If something is dated 29 February, what is its anniversary in a year with no 29 February? There is no single right answer — the convention differs by jurisdiction and by contract. Whether you roll forward to 1 March or back to 28 February changes a deadline by a day, and it is exactly the kind of detail an anniversary clause ought to state and usually does not.

Even finance cannot agree, and writes it down instead

Interest calculations use day-count conventions that are genuinely different from one another and are named precisely because they disagree. Actual/365 counts real days over a fixed 365. Actual/actual counts real days over the real days in the year. 30/360 treats every month as thirty days, so the arithmetic is stable and the answer is knowingly not the calendar.

The lesson generalises beyond finance: where a day count has financial or legal consequences, the convention is written into the agreement rather than assumed. If you are quoting a deadline to somebody, quote the convention with it.

Practical rules that prevent all of this

  1. State the convention whenever you quote a number of days: difference, inclusive, calendar or working.
  2. For anything contractual, convert to a specific date and quote the date, not a count. A date cannot be miscounted.
  3. Count working days only with a holiday calendar for the relevant jurisdiction. Weekends are the easy part.
  4. Keep dates as dates. Convert to a timestamp only at the moment you genuinely need an instant, and convert back immediately.
  5. Where an anniversary falls on a date that does not exist, check what the agreement says before assuming a rule.

Get the convention explicit

The Days Between Dates Calculator shows the difference, the inclusive count and the working-day count side by side, so the convention you actually need is visible rather than assumed. Its date handling was built for this problem specifically: the same inputs return byte-identical results across timezones from UTC+14 to UTC−11, which is asserted by its test suite rather than hoped for.

Frequently asked questions

Should the start date be counted when calculating days between dates?

Only if you are counting inclusively. The difference between two dates excludes the start; a count of nights, days of leave or notice period usually includes both ends. Say which one you mean.

How do I calculate working days between two dates?

Exclude Saturdays and Sundays, then exclude the public holidays falling in the range for the relevant jurisdiction. There is no universal holiday list, which is why a working-day count is only meaningful when the holiday calendar is stated.

Why does a date calculator give a different answer to mine?

Almost always a convention difference — inclusive versus exclusive, or calendar versus working days. Occasionally it is a timezone bug in one of the two implementations, which shows up when the two disagree by exactly one day across a date boundary.

What happens to an anniversary on 29 February?

It depends on the convention in force. Some roll forward to 1 March, some back to 28 February. There is no universal rule, so for anything consequential check what the agreement states rather than assuming.

Spotted something wrong in these numbers? Tell us — corrections are the fastest thing we ship.