fixmint

Counting days between dates: inclusive, exclusive and leap years

· 4 min read

The number of days between two dates depends on whether you count the start date, the end date or both. "1 to 10 March" is 9 days if you count the gap between the dates, and 10 days if you count both ends. Both answers are right for their own rule, so decide which rule you need before you count, and say it when you give the answer.

Date calculatorHow many days until…?Open

Inclusive and exclusive counting

An exclusive count subtracts one date from the other. From 1 March to 10 March is 10 − 1 = 9 days. This is the number of nights in a hotel stay, or the number of days that pass between the two dates.

An inclusive count includes both ends. From 1 March to 10 March, counting every day you are working, is 10 days. Contracts, courses and rental periods often use this rule. Check which figure a tool reports before you rely on it.

Check the rule in the document or the question. A deadline that says "within 10 days of 1 March" is ambiguous, and it is worth asking whether the day of the event counts as day one.

A worked example. A course runs from Monday 2 March to Friday 6 March 2026:

  • Exclusive difference: 6 − 2 = 4 days between them.
  • Inclusive count: 4 + 1 = 5 days, which matches the five weekdays on the course.

Days between months and years

Subtracting dates across a month boundary is easy, but it is easy to slip. From 1 January 2026 to 1 March 2026 is 59 days. January has 31 days, February 2026 has 28, and 31 + 28 = 59. Adding one more day to count the start date gives 60 inclusive.

Across a year, count the days in each month rather than multiplying months by 30. A year is 365 days, or 366 in a leap year.

Leap years

A year is a leap year if it is divisible by 4, with one exception: years divisible by 100 are not leap years, unless they are also divisible by 400. So:

  • 2024 is a leap year, because it is divisible by 4 and not by 100.
  • 2028 is a leap year, for the same reason.
  • 2100 is not a leap year, because it is divisible by 100 but not by 400.
  • 2000 was a leap year, because it is divisible by 400.

The extra day falls on 29 February. A date calculator handles this automatically, which is why it is more reliable than counting by hand across a February that might be a leap year.

Adding a month to the 31st

Adding a month sounds simple until the start is the 31st and the next month has fewer days. What is 31 January plus one month? There is no 31 February, so the answer depends on the rule:

  • Many calculators and software move the date to the last day of the target month, which gives 28 February 2026.
  • Some systems roll the overflow into the next month, which gives 3 March 2026, since February 2026 has 28 days and 31 − 28 = 3.

Neither is wrong by its own rule. For a payment schedule or a legal date, check the rule in the contract, and write down which one you used.

Business days

A business day is a working day, usually Monday to Friday, excluding public holidays. Public holidays vary by country, region and employer, so a generic count is only a starting point. Counting business days means:

  1. Count the weekdays between the dates, using your chosen inclusive or exclusive rule.
  2. Remove any public holidays in that range that apply to you.

In the course example, Monday 2 March to Friday 6 March has five weekdays inclusive. If one of those days is a public holiday where you work, the business-day count drops to four.

Age and elapsed time

Counting age is a different question. A person born on 15 June 2000 is 25 on 14 June 2026 and turns 26 on 15 June 2026. Age uses the completed years, not the days between dates. The age calculator uses that rule, so it is the right tool when you need an age rather than an interval. For the hours worked in a shift, the hours calculator handles overnight times.

Steps that work

  1. Decide whether you need an inclusive, exclusive or business-day count.
  2. Check whether the end date is part of the period.
  3. Use a tool for anything crossing February in a possible leap year, or across a month with a different length.
  4. Write down the rule you used, so the answer can be checked.

Edge cases

  • Time of day. If the times differ, a difference of 24 hours can be one day or zero days depending on the rule. Use dates, not timestamps, unless the time matters.
  • Time zones. A date near midnight can fall on a different day in another zone. Use the local date of the place that defines the period.
  • Calendar changes. Some historical dates change when calendar systems changed, so a span that reaches back before the switch needs a specialist tool.

Quick answers

Is 1 to 10 March 9 days or 10 days?

Both, depending on the rule. The gap between the dates is 9 days, and counting both the first and last day gives 10.

Is 2100 a leap year?

No. Years divisible by 100 are not leap years unless they are also divisible by 400. 2000 was a leap year, and 2100 will not be.

What is one month after 31 January?

There is no 31 February, so it depends on the calculator. Some give 28 February and some roll over to 3 March, so check the rule for your use.

Cover of AI & Financial Freedom: A Practical Guide to Building Wealth in the Age of IntelligenceAI & Financial Freedom: A Practical Guide to Building Wealth in the Age of Intelligence

A short, practical guide to which skills AI is making cheap, which it is making valuable, and how to earn from the second kind.

$6.72 Get it on Gumroad →