Counting days looks like the easiest arithmetic there is, which is exactly why it goes wrong. A notice period ends a day early, a vacation is booked for one night too few, an invoice is flagged as late when it was not. Almost every one of these mistakes comes from a handful of decisions that nobody made explicitly: whether both ends count, what a month means, how leap years and weekends are treated, and which clock the dates were read from. This guide walks through each one with fixed dates you can check yourself.

Inclusive or exclusive: the first decision

From March 4, 2026 to March 18, 2026 there are 14 days. That is the difference between the two dates — end minus start — and it is what most calculators and spreadsheets return. But if you are counting the days on which something happens, such as a course that runs on both the first and the last day, there are 15. The inclusive count is always the difference plus one.

Vacations show the same split. A trip from Monday, July 6, 2026 to Friday, July 17, 2026 is 11 nights at a hotel but 12 days away from work. The hotel charges by the difference; your leave balance usually counts every day.

Deadlines are where this hurts. Suppose a 30-day notice is given on December 2, 2026. If the day of notice counts as day 1, the period ends on December 31, 2026. If counting starts on the following day, it ends on January 1, 2027. One day apart, and in some contexts that day is the difference between valid and void.

Date Difference Calculator Find the difference between two dates in years, months, days and total days. It returns end minus start, so add 1 for an inclusive count. Open the tool

A month is not 30 days

"Thirty days" and "one month" are different instructions. From February 2, 2026, adding 30 days lands on March 4, 2026; adding one calendar month lands on March 2, 2026. The gap exists because February 2026 has only 28 days. The same month-long period from February 1 to March 1 contains 28 days in 2026 and 29 in 2028.

When a contract, a loan or a subscription says "monthly", it almost always means the same day of the next calendar month, not a fixed number of days. When it says "within 30 days", it means 30 days, whatever the month. Read which one it is before you count.

Leap years: the full Gregorian rule

Most people know that a leap year comes every four years. The complete rule in the Gregorian calendar has two exceptions: a year divisible by 4 is a leap year, except years divisible by 100, which are not, unless they are also divisible by 400. So 2024 and 2028 are leap years, 1900 was not, 2000 was, and 2100 will not be. A leap year has 366 days instead of 365, and the extra day is February 29.

The exception matters for anyone born on February 29. Someone born on February 29, 2008 shows as 17 years, 11 months and 30 days old on February 28, 2026 in a straightforward calendar calculation, and turns 18 on March 1, 2026. Whether the law treats that person as an adult on February 28 or on March 1 depends on the country, so check the local rule for anything with legal consequences.

Adding months to January 31

What is January 31 plus one month? There is no February 31, so software has to choose. There are two common conventions, and they give different answers.

StartOperationClamp to month endRoll over the extra days
January 31, 2026+ 1 monthFebruary 28, 2026March 3, 2026
January 31, 2028+ 1 monthFebruary 29, 2028March 2, 2028
March 31, 2026− 1 monthFebruary 28, 2026March 3, 2026
Adding or subtracting a month at the end of a month

Clamping — moving to the last valid day of the target month — is what spreadsheet functions such as EDATE do and what most billing and contract conventions expect. Rolling over is what the JavaScript Date object does: it builds February 31 and carries the three surplus days into March. Note the oddity in the last row: subtracting a month from March 31 can leave you in March.

Add/Subtract Days Calculator Add or subtract days, weeks, months or years from any date. Month and year arithmetic clamps to the month end, so January 31, 2026 + 1 month shows February 28 and February 29, 2028 + 1 year shows February 28, 2029. Open the tool

Business days and holidays

Business days remove weekends and public holidays, and the holidays depend on where you are. Take December 1 to December 31, 2026, counting both ends: 31 calendar days, of which 23 fall on weekdays. Christmas Day, a Friday, removes one more in most countries. Other national holidays in December change the total further.

CountryWeekday holidaysBusiness days
BrazilDecember 2522
United StatesDecember 2522
MexicoDecember 2522
SpainDecember 8, December 2521
PortugalDecember 1, December 8, December 2520
Business days from December 1 to December 31, 2026 (national holidays only)

Two caveats. First, regional and city holidays are not in national lists, and they can easily remove another day or two. Second, banks, courts and individual employers often have their own calendars. If a deadline is counted in business days, find out whose calendar applies and add any local closures by hand.

Business Days Calculator Count business days between two dates with national holidays for 16 countries, plus any extra holidays you add. Both the start and the end date are included in the count. Open the tool

ISO week numbers

"Week 23" only means something if everyone uses the same numbering. ISO 8601, the international standard, defines weeks as starting on Monday, with week 1 being the week that contains the year's first Thursday — equivalently, the week that contains January 4.

That rule produces some surprises at year boundaries. January 1, 2026 was a Thursday, so week 1 of 2026 began on Monday, December 29, 2025. And because 2026 also ends on a Thursday, it has 53 weeks: Friday, January 1, 2027 belongs to week 53 of 2026, and week 1 of 2027 starts on Monday, January 4, 2027. Calendars that start weeks on Sunday, common in the United States, number some weeks differently, so state the system when you schedule by week number.

Time zones and daylight saving

Many day-count bugs come from measuring hours and dividing by 24. In New York, daylight saving time began on March 8, 2026, and that day was only 23 hours long. From midnight on March 1 to midnight on March 15 there are 14 calendar days but 335 hours — 13.958 days. Code that truncates the result reports 13. In the European Union clocks changed on March 29, 2026, with the same effect, while Brazil has not observed daylight saving time since 2019.

The fix is to count calendar dates, not elapsed time: compare the dates as dates, or convert both to UTC midnight before subtracting. And when a deadline ends at "end of day", ask whose day. A filing due on a given date in São Paulo closes hours before the same date ends in Los Angeles.

A checklist before you trust a count

  1. 1 Decide whether the start day counts, and whether the end day counts. Write it next to the result.
  2. 2 Check whether the rule says days or months. Thirty days and one month are rarely the same.
  3. 3 If the period crosses February, confirm whether the year is a leap year.
  4. 4 For business days, name the calendar: country, region, and any employer or court closures.
  5. 5 If a period ends on a weekend or holiday, check whether the deadline moves to the next business day. That rule varies by country and contract.
  6. 6 For anything with legal or financial consequences, confirm the counting rule in the contract or the applicable law rather than relying on a calculator's default.