Calculator Tools

Date difference calculator: how many days between two dates, whether to include the end date, and how weekdays are counted

Pick two dates and get total days, years-months-days, weeks, weekdays, weekend days and hours. Here is what the Include end date switch really changes, how the months part is worked out when a month is shorter, how leap years are handled, and what the tool leaves out on purpose (holidays and time of day).

By the Toolcloak team23 October 20266 min read
In this article
  1. How to use it, step by step
  2. Include end date: the switch that changes the answer
  3. What each of the six results means
  4. How the years, months and days part works
  5. Leap years and month lengths
  6. What it does not know
  7. Checking the answer in a spreadsheet

How long is the notice period? How many days until the visa expires? How many working days are left in the project? Every one of these is a question about the gap between two dates, and every one has a hidden trap: do you count the first day, the last day, both, or neither? The Date Difference Calculator answers in six ways at once, and its one switch, Include end date, settles the trap. This guide shows what each number means so you can pick the right one.

How to use it, step by step

  1. Open the Date Difference Calculator.
  2. Pick the Start date and the End date. When the page opens they are set to 1 January 2026 and 31 December 2026.
  3. Switch on Include end date if the last day should count as a full day (see the next section).
  4. Press Calculate Difference and read the six results.
  5. If you see the note “end date is before start date”, the tool has swapped the two for you, so the result is the same either way round.
Choose a start date and an end date, decide whether the end date counts, and press Calculate Difference.Open Date Difference Calculator

Include end date: the switch that changes the answer

Subtracting one date from another counts the steps between them. From the 23rd to the 25th is two steps, so the answer is 2. But if you are asking “how many days is my leave, if I am away on the 23rd, 24th and 25th?”, you want to count all three days. That is what Include end date does: it adds one.

SituationDatesInclude end dateAnswer
Hotel stay, counted in nights23 Oct to 25 OctOff2 nights
Leave application, counted in days23 Oct to 25 OctOn3 days
Same day, nothing between23 Oct to 23 OctOff0 days
Same day, a one-day event23 Oct to 23 OctOn1 day
Time left until a deadlineToday to deadlineOffDays remaining
A course that runs from the start date to the end dateFirst day to last dayOnTotal days of the course

A rule of thumb: if you are measuring the gap, leave it off. If you are counting days that each get used up, switch it on.

One year, two answers
3641 Jan to 31 Dec 2026Include end date off
3651 Jan to 31 Dec 2026Include end date on
52 wk 0 dWeeks, end date offExactly 52 weeks
52 wk 1 dWeeks, end date onOne day over

Neither answer is wrong. They answer different questions, which is why contracts and forms usually say “both days inclusive” or “exclusive of the last day”.

What each of the six results means

All six are worked out from the same pair of dates. Here is the worked example for 23 October 2026 to 25 December 2026, with the end date left out and then included.

ResultEnd date offEnd date onHow it is made
Total days6364Whole days between the two dates, plus one if the end is included
Years, months, days0y 2m 2d0y 2m 2dWhole months counted forward from the start, then the leftover days. Not affected by the switch
Weeks9 wk 0 d9 wk 1 dTotal days split into whole weeks and leftover days
Weekdays (Mon–Fri)4546How many of those days fall on a Monday to Friday
Weekend days1818Total days minus weekdays
Hours1,5121,536Total days multiplied by 24

25 December 2026 is a Friday, so including it adds one weekday. Including an end date that falls on a weekend would add a weekend day instead.

Where the 63 days go (23 Oct to 25 Dec 2026, end date off)
Weekdays (Mon–Fri)
45
Weekend days
18

Nine whole weeks give 9 × 5 = 45 weekdays and 9 × 2 = 18 weekend days, which matches the tool exactly.

How the years, months and days part works

Months have different lengths, so “two months and two days” needs a rule. The tool counts forward from the start date in whole months for as long as it can without passing the end date, then counts the leftover days. From 23 October, two whole months takes you to 23 December, and 25 December is two days after that, which gives 2 months and 2 days.

The awkward case is a start date near the end of a long month. One month after 31 January does not exist, because February has no 31st. In that case the tool uses the last day of the shorter month as the stopping point. So 31 January to 1 March 2026 comes out as 1 month and 1 day: one month takes you to 28 February, and 1 March is one day later. The total is 29 days.

FromToTotal daysYears, months, days
1 Jan 202631 Dec 20263640y 11m 30d
31 Jan 20261 Mar 2026290y 1m 1d
23 Oct 202626 Jan 2027950y 3m 3d
15 May 200023 Oct 20269,65726y 5m 8d

The last row is a handy age check. For a full age with birthday logic, see the age calculator guide.

Leap years and month lengths

You do not need to adjust for leap years. The calendar the tool uses knows that 2024 had a 29 February and 2025 did not. So 28 February to 1 March is 2 days in 2024 and 1 day in 2025. Across a long span, the leap days are counted automatically.

If you are curious why some century years are not leap years, why 2100 is not a leap year explains the rule.

What it does not know

Four things left out on purpose
Public holidaysWeekdays means Monday to Friday and nothing more. A national holiday on a Wednesday is still counted as a weekday. For business days with holidays removed, use the Working Days Calculator and read its guide.
Time of dayThe tool works with dates only, so “Hours” is simply days × 24. It does not know that one of the two days was shorter because the clocks changed.
Different time zonesA date is a date. If two people are in different countries, check the date on each side with the Time Zone Converter guide.
Other week rulesThe weekend is always Saturday and Sunday. If your workplace has a different week, treat the weekday and weekend counts as a guide only.

Knowing what a calculator ignores is half of using it well.

Checking the answer in a spreadsheet

If you want to double-check in Excel or Google Sheets, put the dates in two cells and subtract them. The result is the same number as Total days with Include end date off. For working days, the NETWORKDAYS function counts both the start and the end date and skips Saturdays and Sundays, so it matches the tool’s Weekdays result with Include end date on.

Questions people ask

How do I calculate the number of days between two dates?

Open the Date Difference Calculator, choose the start and end dates and press Calculate Difference. Total days is the gap between them. Switch on Include end date if the last day should count as a full day.

Do aur date ke beech kitne din hain, kaise nikale?

Date Difference Calculator kholiye, Start date aur End date chuniye aur Calculate Difference dabaiye. Total days mein din aayenge, saath mein weeks, weekdays aur hours bhi. Akhri din bhi ginna ho to Include end date on kijiye.

What does Include end date do?

It adds one day, so both the start and the end date are counted. With it off, 23 to 25 October is 2 days. With it on, it is 3 days. Use it when each day is used up, such as leave or a course.

Does it count weekends and holidays?

It splits the days into weekdays (Monday to Friday) and weekend days, but it does not know public holidays. A holiday on a Wednesday is still counted as a weekday. Use a working days calculator to remove holidays.

What happens if the end date is before the start date?

The tool swaps the two dates and shows a note that the end date was before the start date. The numbers are the same as if you had entered them the right way round.

Does it handle leap years?

Yes. Leap days are counted automatically, so 28 February to 1 March is 2 days in 2024 and 1 day in 2025. You do not need to adjust anything yourself.

Why does 31 January to 1 March show 1 month and 1 day?

There is no 31 February, so one month after 31 January stops at the last day of February (28 February in 2026). The remaining day to 1 March is counted as 1 day. The total is 29 days.

Are my dates sent anywhere?

No. The calculation runs in your browser and nothing is uploaded to Toolcloak.