Date Difference Calculator

Enter two dates to see how far apart they are as an exact number of days and as a calendar span of years, months and days.

Date format follows your device settings.
Date format follows your device settings.
Off: 1 January to 2 January is 1 day. On: both dates are counted, so it is 2 days.

Calculated in your browser. Nothing you enter is sent to a server.

Result

Choose a start date and an end date to see the difference.

Understanding the result

The large figure is the absolute duration: the exact number of days from one date to the other. Use it when you need a count, such as days on a contract, days since an event or days remaining until a deadline.

The line beneath it is the calendar difference, written as years, months and days. Months are not a fixed length, so this breakdown answers "how many whole months and leftover days" rather than "how many days". Weeks, hours and minutes are derived from the exact day count, using 24-hour days.

What is a date difference calculator?

A date difference calculator measures the gap between two calendar dates. It is the tool behind questions such as "how many days between 1 March and 18 July?" or "how long have I been in this job?".

It works on whole dates with no time of day. If you need to include hours and minutes or compare moments in different time zones, the time zone tools are the better fit.

How it works

Each date is converted to a day number on the proleptic Gregorian calendar. The absolute duration is simply the difference between those two numbers, so leap days and month lengths are accounted for exactly and your device's time zone plays no part.

For the calendar difference, whole months are counted forward from the earlier date. If the earlier date's day does not exist in a later month (for example the 31st), that month is treated as ending on its last day. The days left over after the last whole month make up the "days" part.

By default the end date is not counted: 1 January to 2 January is 1 day. Turn on "Include end date" to count both dates, which gives 2 days. Inclusive counting is common for things like "the event runs from the 1st to the 3rd, so it lasts 3 days".

Examples

1 January 2024 to 5 March 2025

The absolute duration is 429 days, which is 61 weeks and 2 days. The calendar difference is 1 year, 2 months and 4 days: one year to 1 January 2025, two months to 1 March 2025, and four more days to 5 March.

Counting the end date

From 1 January 2024 to 31 January 2024 is 30 days. With "Include end date" it is 31 days, and the calendar difference becomes exactly 1 month, because both the first and last day of January are counted.

A month-end start

From 31 January 2023 to 1 March 2023 is 29 days. As a calendar difference it is 1 month and 1 day: 31 January plus one month lands on 28 February (the last day of a short month), and 1 March is one day after that.

Things to keep in mind

  • Exclusive and inclusive counts differ by one day. If a result seems off by one, check the "Include end date" setting against the convention you are matching.
  • The calendar difference and the day count answer different questions. Do not multiply months by 30 to compare them with the day count.
  • Total hours and minutes assume 24-hour days. Real days that contain a daylight saving change are 23 or 25 hours long, which a date-only calculation cannot know.
  • If the end date is before the start date, the result is shown as a positive amount and labelled as counting back.
  • Dates are treated as proleptic Gregorian dates from year 1 to year 9999. Before the Gregorian calendar was adopted (from 1582, at different times in different countries) historical dates were recorded in the Julian calendar.

Frequently asked questions

What is the difference between two dates?

It is the amount of time from one date to the other. This tool gives it in two forms: an exact number of days, and a calendar span in years, months and days.

Does the calculator include the start date?

The start date is the point counting begins from, so it is not counted as an extra day. By default the end date is not counted either. Tick "Include end date" to count both the first and the last day.

How are leap years handled?

Exactly. Leap days are part of the day numbering, so a range that includes 29 February is one day longer than the same range in a common year.

How many days are between two dates?

Enter them above and the absolute duration is the answer. For example, 1 January 2024 to 1 January 2025 is 366 days because 2024 is a leap year.

What if the end date is earlier than the start date?

The tool still returns a result. It shows the same size of gap and says the end date is before the start date.