Date Difference

Pick two dates. You get the gap in days, in weeks and days, in years, months and days, and the number of weekdays in between.

How it works

Each date becomes a day number: the count of days since 1 January 1970. The difference is one subtraction, so leap years are handled and a daylight saving change cannot move the answer by a day.

Years, months and days are counted the way people count an age: the most whole months that fit, then the days left over. When a month is too short, the day is pinned to its last day, so 31 January to 28 February is 1 month.

Weekdays are counted by arithmetic over whole weeks, so a span of centuries takes no longer than a span of days. Nothing you enter leaves this page.

How to use it

  1. 1 Pick the start date.
  2. 2 Pick the end date. It may be before the start date.
  3. 3 Tick "Count the end date too" if both dates belong in the count, as for a hotel stay or a leave request.
  4. 4 Read the results, and press Copy beside any one you need.

Good to know

  • For "how many days until" a date, leave the start date as today.
  • For a span of days off that should skip public holidays, use the Working Days Calculator. It takes a pasted list of holidays.
  • To find the date a number of days from now, use Add / Subtract Days instead.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Counting the days to a notice period, step by step

Say you resign on 3 March 2026 and your contract asks for three months of notice. Your last day is 3 June 2026. How long is that, really? Put 2026-03-03 as the start and 2026-06-03 as the end. The tool says 92 days, which is 13 weeks and 1 day, or exactly 3 months. Of those 92 days, 66 are weekdays.

Now the end date question. Is your last day a day you work? If you count both the first day and the last day, tick "Count the end date too". The count becomes 93 days, and the weekday count goes up by one if 3 June is a weekday. It is a Wednesday, so you get 67 weekdays. Most contracts and leave forms count both days, while most "days until" questions do not. The tool shows which rule it used under the results.

Month ends are where calculators disagree. Take a contract that starts on 31 January. One month later there is no 31 February, so this tool lands on the last day of February, 28 February 2026. That is the rule spreadsheets use, and it means 31 January to 28 February reads as exactly 1 month. A different tool might say 28 days and no months. Both are defensible. What matters is that the rule is the same everywhere, so here, adding the result back to the start date with Add / Subtract Days gives you the end date again.

The weekday count is the number of Mondays to Fridays in the span. It does not know about public holidays, because those depend on your country, your region and sometimes your employer. If you need holidays left out, paste them into the Working Days Calculator, which takes the same two dates and a list of days off.

The tool has limits. It counts calendar dates, not moments, so it has no time of day and no time zone. The hours row assumes every day has 24 hours, which is not true on a daylight saving change. Dates before 1582 follow the Gregorian calendar backwards, as JavaScript does, so they will not match historical records kept in the Julian calendar.

Frequently asked questions

Does the count include the end date?

Not by default. From Monday to Friday is 4 days, the same way 1 to 5 is a gap of 4. Tick "Count the end date too" to count both days, which gives 5. A leave request or an event that runs on both dates usually wants the box ticked.

How are months counted when they have different lengths?

A month is counted from a day number to the same day number in the next month. When that day does not exist, such as 31 February, the last day of the month is used instead. So 31 January to 28 February 2026 is exactly 1 month, and 31 January to 1 March is 1 month and 1 day.

Are leap years taken into account?

Yes. Each date is turned into a count of real calendar days, so 29 February is counted whenever it falls inside the span. From 28 February 2024 to 1 March 2024 is 2 days.

Why is the number of hours a whole number of days times 24?

The tool works with calendar dates, not clock times. On the day clocks go forward or back, a real day lasts 23 or 25 hours, so the true hour count across a daylight saving change differs by one. For an exact count between two moments, use the Timestamp Converter.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.