How to count days and working days between dates

Inclusive or exclusive counts, adding months to 31 January, working days with holidays and ISO week numbers, with worked examples for 2026.

On this page

"How many days until the end of the year?" has two correct answers, and people argue about which one is right. Date arithmetic looks trivial until you need it for a contract, a leave request, a delivery promise or a payroll week, and then the small rules decide the outcome. This article explains those rules with worked examples from 2026. Every figure was produced with the date calculator's own logic and the day counts were checked by walking every day of the range in Python.

Days between two dates: count one end or both?

From 13 October 2026 to 31 December 2026 there are 79 days. That is the distance, the same way you would say there is 1 day between Monday and Tuesday: the start date is not counted, the end date is.

If you count both days, the 13th and the 31st, there are 80 days. That is how people count when every day is "used": a hotel stay from the 1st to the 3rd checks you out on the 3rd (2 nights), but a three-day conference from the 1st to the 3rd lasts 3 days.

Neither answer is wrong; they answer different questions. Most "off by one" arguments come from mixing them. Before you count, decide whether the first and last day are included, write it down if it goes into a contract, and then count. The calculator counts one end by default and has an "Include the end date" box for the other.

79 days is also 11 weeks and 2 days, or 2 months and 18 days (13 October to 13 December is two months, then 18 more days to 31 December).

Adding days, weeks, months and years

Adding days is unambiguous: 100 days after 13 October 2026 is Thursday 21 January 2027. Weeks are 7 days each, so they are just as safe.

Months are different, because they have 28 to 31 days. The usual rule, used by spreadsheets (EDATE), most programming languages and banks, is:

When the day does not exist in the target month, use the last day of that month.

So 31 January 2026 plus one month is 28 February 2026, and the calculator tells you the result was adjusted. In a leap year it would be 29 February. Subtracting works the same way: 31 May minus three months is 28 February.

Two consequences surprise people:

  • One month is not 30 days. 31 January plus 30 days is 2 March 2026, while 31 January plus one month is 28 February. If a contract says "30 days", count days; if it says "one month", count months.
  • Do not chain monthly steps. 31 January + 1 month = 28 February, and 28 February + 1 month = 28 March. But 31 January + 2 months is 31 March. When you build a schedule (a monthly payment, a subscription), compute each date from the original start date.

Years follow the same rule: 29 February 2024 plus one year is 28 February 2025, while plus four years is 29 February 2028.

Working days

A working-day count needs three inputs: the two dates, the days that are off every week, and the holidays.

The calculator counts both ends, like the NETWORKDAYS function in Excel and Google Sheets, because when you ask "how many working days from Monday to Friday?" the answer people expect is 5, not 4. If the end comes before the start, the result is negative, again like NETWORKDAYS.

Worked examples for September 2026, which starts on a Tuesday:

SettingWorking days
Saturday and Sunday off, no holidays22
Saturday and Sunday off, 1 and 2 September off20
Sunday only off, 1 and 2 September off24

The month has 30 calendar days, 8 of them weekend days with Saturday and Sunday off. Two holidays on weekdays take it from 22 to 20. With only Sunday off there are just 4 Sundays, so 26 working days, minus the two holidays: 24.

For the whole of 2026, with Saturday and Sunday off and no holidays, there are 261 working days: 365 calendar days minus 104 weekend days.

Some practical rules:

  • A holiday on a day off is not subtracted twice. If your list contains a Sunday, it changes nothing.
  • Holidays change every year. Lunar holidays such as Tết move with the moon, and governments sometimes swap a working day for a day off to make a longer break. Paste the official list for the year you are counting instead of reusing last year's.
  • Weekends depend on the workplace. Many offices in Vietnam work on Saturday mornings; in parts of the Middle East the weekend is Friday and Saturday. Choose the pattern that matches the contract or the company.

In the calculator you type holidays one per line as 2026-09-02; anything after the date, such as a name, is ignored. A day-first form like 02/09/2026 is rejected on purpose, because it means 2 September in Vietnam and 9 February in the United States. Rejected lines are listed by number so nothing is silently skipped.

ISO week numbers

Week numbers sound simple until New Year. The international standard, ISO 8601, says:

  • weeks start on Monday;
  • week 1 is the week that contains the year's first Thursday (equivalently, the week with 4 January).

That makes the first and last days of a year belong, sometimes, to a neighbouring year:

DateWeekdayISO week date
3 January 2021Sunday2020-W53-7
30 December 2024Monday2025-W01-1
13 October 2026Tuesday2026-W42-2
31 December 2026Thursday2026-W53-4
1 January 2027Friday2026-W53-5

The last digit is the weekday, 1 for Monday to 7 for Sunday. A year has 53 ISO weeks when it starts on a Thursday, or on a Wednesday in a leap year; 2020 and 2026 are such years. If a supplier says "delivery in week 1 of 2025", that week started on Monday 30 December 2024.

Other systems exist. In the United States weeks are often numbered from Sunday with 1 January always in week 1, so around New Year the two numbers can differ by one. When a week number goes into an order or a timesheet, say "ISO week" to remove the doubt.

Common mistakes

  • Not agreeing on inclusive or exclusive counting. 79 and 80 days are both right; pick one on purpose.
  • Treating a month as 30 days. Adding one month and adding 30 days give different dates for most starting days.
  • Chaining month additions. Compute every date in a schedule from the original start date.
  • Forgetting that holidays move. Last year's list is wrong this year for every lunar holiday.
  • Typing day-first dates into a tool that guesses. 03/04 is 3 April or 4 March depending on who reads it. Use YYYY-MM-DD.
  • Building it with local-midnight timestamps. Subtracting two JavaScript Date objects at midnight and dividing by 86,400,000 breaks across a daylight-saving change, when a day lasts 23 or 25 hours. Work with plain calendar dates.

Try it

The date calculator has a tab for each of these: days between, add or subtract, working days with your own holiday list, and week and weekday. For someone's exact age in years, months and days, use the age calculator; for meetings across countries, the time zone converter.

Tools mentioned in this article

Back to the blog