Skip to content
AZ Tools

Counting Days: Date Math That Trips People Up

Counting days sounds like the simplest arithmetic there is, yet deadlines, D-days, ages and notice periods regularly come out one day off. The cause is rarely the calculation itself; it is a choice that was made without noticing, such as whether to count the first day, what the end of a month means, or which calendar of holidays applies. This guide goes through the common traps with examples you can check.

Count the first day or not

From 1 January to 1 March 2026 there are 59 days if you count the gap between the dates, which is what most calculators and programming libraries do. If both the first and last day count, as in "from 1 January to 1 March inclusive", the answer is 60. Neither is wrong, but they answer different questions, so contracts, rental periods and leave rules usually say which one they mean.

D-day counters add their own convention: on the day itself it shows D-day, the day before D-1, and the day after D+1. Some anniversary counts, such as "100 days together", are traditionally inclusive, so day 100 falls one day earlier than a plain 100-day gap would suggest. When two tools disagree by exactly one day, this is almost always the reason.

Adding months is not adding days

A month has 28 to 31 days, so "one month later" has no single answer in days. Most date tools add months by moving to the same day number in the next month, and when that day does not exist they clamp to the month's last day: 31 January plus one month is 28 February (29 in a leap year). Some programming functions instead roll over, producing 3 March, which is why a monthly billing date or a deadline can drift if different systems are used.

Because of clamping, adding one month twice is not always the same as adding two months at once: 31 January plus one month is 28 February, and plus another month is 28 March, while 31 January plus two months is 31 March. For notice periods and subscription dates, check which rule the contract or the service actually uses.

Leap years and 29 February

A year is a leap year if it is divisible by 4, except century years, which must also be divisible by 400. So 2024 and 2000 were leap years, while 1900 was not and 2100 will not be. The rule keeps the calendar within about a day of the solar year over more than three thousand years.

Someone born on 29 February still ages every year, but which day marks the birthday in other years is a matter of convention and, for legal purposes, of national law: some places use 28 February and others 1 March. Age itself is counted in completed years; Korea, for example, standardised official use on this international age in June 2023, replacing the traditional count that started at one.

Business days and holidays

A business-day count skips weekends, so five business days from a Friday lands on the following Friday, not the Wednesday. Public holidays are the hard part: they differ by country and often by region, some move every year (lunar holidays, Easter), and some create substitute days off when they fall on a weekend. No general-purpose calculator can know all of them, so a deadline near a holiday should be checked against the official calendar that applies.

Weekends are not the same everywhere either. Many countries rest on Saturday and Sunday, but some use Friday and Saturday, and shift patterns ignore weekends altogether. When a rule says "working days", it means the working days of the place and organisation the rule belongs to.

When a day is not 24 hours

In places with daylight saving time, the day the clocks go forward is 23 hours long and the day they go back is 25. Software that counts days by dividing a time difference by 86,400 seconds can therefore come out a day short or a day over around those dates. Counting calendar dates, not elapsed seconds, avoids the problem.

Time zones cause a related error: a date stored as midnight in one zone can display as the previous day in another. When only the date matters, as with birthdays and deadlines, it is safer to handle it as a plain date without a time attached.

  • Say whether a count includes the first day
  • Check how month-end dates are handled when adding months
  • Remember that 1900 and 2100 are not leap years
  • Check the holiday calendar for the right country and region
  • Count calendar dates, not seconds, across daylight-saving changes
  • Store birthdays and deadlines as dates without a time

Related tools