Date difference calculator

Pick two dates to see the time between them as years, months and days, plus total days, weeks, hours and the number of weekdays. Calendar math handles leap years and month ends. Free, and it runs in your browser.

How to use it

  1. Choose the Start date and the End date.
  2. Tick Count the end date too if both days must be included, such as for a stay or a contract.
  3. Read the difference and the totals below.

How to calculate the time between two dates

What the calculator measures

How many days until a deadline, how long a contract has run, how many weeks are left before an exam or how many working days a project will take: all of these are the gap between two dates. This calculator gives that gap in several forms at once: years, months and days, total days, total weeks, total months, total hours, and the split between weekdays and weekend days.

How the numbers are obtained

Total days are the exact number of calendar days from the start date to the end date, counted as 24-hour days with no time zone or daylight saving effect. The years-months-days summary counts complete calendar months first and then the days left over. When the start day does not exist in the final month, as with January 31 and February 29, the month is considered complete at the end of that month. Weekdays are Monday to Friday counted over the same range; every other day is a weekend day. Public holidays are not known to the tool, so the weekday count is not a legal business-day count. If the end date is before the start date, the dates are swapped and the tool tells you so. Everything is computed in your browser.

Start day and end day

By default the start date is not counted and the end date is the point you measure to, like measuring the distance between two marks. Tick Count the end date too (add 1 day) when both ends must be included, for example for a hotel stay of nights plus checkout or for an event that takes place on every date from the first to the last.

Worked examples

  1. With the defaults, Start date 2024-01-15 and End date 2024-12-25, the difference is 0 years, 11 months, 10 days. Total days: 345. Total weeks: 49 + 2 days. Total months: 11 + 10 days. Weekdays (Monday to Friday): 247. Weekend days: 98. Total hours: 8,280.
  2. Tick Count the end date too (add 1 day) for the same dates. Everything shifts by one day: 346 days, 11 months and 11 days, 248 weekdays and 8,304 hours.
  3. Swap the two dates (start 2024-12-25, end 2024-01-15). The numbers are the same as in the first example, and a note says the end date was before the start date, so the dates were swapped.
  4. Start 2024-01-31 and end 2024-02-29 give 0 years, 1 month, 0 days and 29 total days.

Results at a glance

ResultHow it is counted
DifferenceYears, months and days using complete calendar months
Total daysExact calendar days between the dates
Total weeksWhole weeks plus the remaining days
Total monthsComplete months plus the remaining days
Weekdays (Monday to Friday)Days from Monday to Friday in the range
Weekend daysTotal days minus weekdays
Total hoursTotal days times 24

Tips and common mistakes

  • Months have different lengths, so 30 days and 1 month are different amounts. Use the summary for human-readable spans and the total days for exact arithmetic.
  • The weekday count does not remove holidays or company days off. For a working-day estimate with your own exclusions, see the workdays calculator.
  • Check whether your rule counts the first or last day. Contracts, leave and rentals differ, so decide before you read the result.
  • For legal deadlines, interest calculations or contract terms, treat the result as a calendar aid and verify with the document.

Related tools

To move a date forward or backward use the add or subtract days calculator. For a person's exact age use the age calculator, and for the weekday of a date try the day of the week finder.

Questions

How are months and days counted?

It adds whole calendar months to the start date, then counts the days left. If a month is shorter (for example January 31 plus one month), the last day of that month is used.

Does it include the end date?

By default the end date is not counted, so January 1 to January 2 is 1 day. Tick Count the end date too to count both days.

Does it count holidays?

No. The weekdays figure only skips Saturdays and Sundays. For holidays use the working days calculator.

What if the end date is before the start date?

The dates are swapped and a note is shown, so you always get a positive difference.