Guides

Counting Days Between Dates: Inclusive vs Exclusive, Workdays and Leap Years

5 min read

The number of days between two dates is the later date minus the earlier one, which counts the end date but not the start date. From Monday to Friday of the same week is 4 days. If both the first and the last day count, as with a hotel booking's nights versus days or a leave request, add one: Monday to Friday inclusive is 5 days. Most disagreements about date arithmetic come down to that single day, so decide which rule applies before you count.

Below are five worked examples, a table of inclusive and exclusive counts, how to count only working days, and the leap year rule that makes February the troublemaker.

Inclusive versus exclusive

Think of the dates as fence posts and the days as the gaps between them. Five posts have four gaps. The plain difference counts gaps; the inclusive count counts posts.

From → toDifference (end not start)Inclusive (both days)
Same day0 days1 days
Monday to Friday, same week4 days5 days
1 March to 31 August183 days184 days
28 September to Christmas Day88 days89 days
New Year to New Year, 2028366 days367 days

Which is right? The difference is right for durations and countdowns ("how long until"), and for "within 30 days of" in most everyday uses. The inclusive count is right when every calendar day in the range is used or paid for, such as rental days, days of leave or the length of an event. Legal texts sometimes use a third convention, "clear days", which excludes both the first and the last day. When a deadline really matters, the contract or the applicable rules decide, not a general guide like this one.

Five worked examples

1. A six-month lease

A lease runs from 1 March 2026 to 31 August 2026. The difference between the dates is 183 days, but the tenant has the flat on both the first and last day, so the rental period is 184 days. If rent is charged by the day, 184 is the number to multiply. Of those days, 131 fall on Monday to Friday.

2. A payment "within 30 days"

An invoice dated Monday, September 28, 2026 says payment is due within 30 days. Counting the day after the invoice as day 1, day 30 is Wednesday, October 28, 2026. Because September has 30 days, that happens to match the same date next month. After a 31-day month it would not: 30 days after 28 October 2026 is Friday, November 27, 2026, not 28 November. If the terms said 10 business days instead, the deadline would be Monday, October 12, 2026, assuming no public holidays in between.

3. A countdown

On 28 September 2026 there are 88 days until 25 December 2026, which falls on a Friday. That is 2 days left in September, 31 in October, 30 in November and 25 in December. A countdown uses the plain difference: on Christmas Eve it should say 1, and on the day itself 0.

4. Across a leap day

2028 is a leap year, so February 2028 has 29 days: from 1 February to 1 March 2028 is 29 days, against 28 in 2026. The extra day shifts every "N days from" calculation that crosses it. Ninety days after 15 January is Wednesday, April 15, 2026 in 2026 but Friday, April 14, 2028 in 2028.

The leap day itself raises a question with no universal answer: what is one year after Tuesday, February 29, 2028? Adding 365 days gives 28 February 2029. Adding one calendar year gives either 28 February or 1 March 2029, depending on the convention, and different laws and software pick differently for things like birthdays and anniversaries.

5. Adding a month at the end of a month

What is one month after 31 January 2026? There is no 31 February, so there are two common answers. Most spreadsheets and date libraries clamp to the last day of the month and give 28 February 2026. Some programming functions overflow instead: 31 February becomes 3 March 2026. Clamping also means that adding one month twice (31 January to 28 February to 28 March) is not the same as adding two months at once (31 March). For billing and subscriptions, write the rule down, for example "the last day of the month when the date does not exist".

Counting working days

Working days, also called business days or weekdays, usually mean Monday to Friday. To count them between two dates:

  1. Decide whether the start and end dates themselves count.
  2. Count the full weeks in the range; each contributes five working days.
  3. Walk through the leftover days one by one and count those that fall Monday to Friday.
  4. Subtract public holidays that fall on weekdays inside the range.

For example, October 2026 starts on a Thursday and ends on a Saturday. It contains 22 weekdays: four full weeks give 20, plus Thursday 1 and Friday 2 October.

Holidays are the hard part, because they depend on the country and often on the region, and some move from year to year. A calculator that counts weekdays gives you the right starting figure; subtract the holidays that apply to you. Also check your working pattern: in some countries and industries the working week runs Sunday to Thursday, or includes Saturday.

For legal, tax or contractual deadlines, check the exact rule that applies. Some rules move a deadline that lands on a weekend or holiday to the next working day; others do not.

The leap year rule

The Gregorian calendar, introduced in 1582 and used for civil dates almost everywhere, keeps the calendar aligned with the seasons using three rules:

  1. A year divisible by 4 is a leap year (2024, 2028).
  2. Except a year divisible by 100, which is not (1900, 2100).
  3. Except a year divisible by 400, which is a leap year after all (2000, 2400).

That gives 97 leap years every 400 years and an average year of 365.2425 days, very close to the solar year. A neat side effect is that the 400-year cycle is exactly 146,097 days, which is exactly 20,871 weeks, so the calendar, including weekdays, repeats every four centuries. The year 2000 was a leap year only because of the third rule, and the rule will matter again in 2100, when a simple "every four years" formula will be one day off.

Dates are not timestamps

A frequent bug in homemade calculations is to subtract two date-times and divide by 24 hours. Where clocks change for daylight saving time, one day a year has 23 hours and one has 25, so the division lands on 29.96 or 30.04 and rounding down loses a day. Count calendar dates, not elapsed hours. The same applies across time zones: an event on 1 March in one city may already be 2 March in another, so settle on one time zone before counting.

If you need to count in weeks, divide the day difference by seven and keep the remainder: 88 days is 12 weeks and 4 days. For months and years, count whole calendar months first and then the leftover days, since months are not all the same length.

More guides