Dates and time

Online date difference calculator

Calculate an exact calendar difference or the total duration between two dates, with optional times and time zones.

HostingerFast hosting for your websiteHosting, domain and SSL in one place.View offer ↗HostingerLaunch your website todayReliable hosting for new projects and growing websites.View offer ↗

Date difference calculator

Start date
End date

The strict time difference is used by default. Including the end date adds that day to the result.

Date guide

How do I calculate the difference between two dates?

Enter the start and end dates and select calculate. You can get a calendar difference in years, months and days, as well as total durations.

Difference in years, months and days

Months have different lengths. A calendar month is therefore not arbitrarily converted into 30 days: the breakdown follows the real calendar.

Total difference in days

Totals express the whole duration in one unit. They are independent of the years and months breakdown.

Why is a day not always 24 hours?

When time is included, a time zone can change because of daylight saving time. The calculation uses the selected zone’s real rules.

Leap years

Dates are validated using the real calendar, including February 29 and leap years.

Frequently asked questions

Date difference questions

How do I calculate days between two dates?

Enter both dates and check the total days. Without time, calendar days are counted.

How do I calculate months between two dates?

The breakdown shows complete calendar months together with remaining years and days.

How do I calculate years, months and days?

Select both dates and read the main result, which uses a real calendar interval.

How do I calculate hours between two dates?

Enable Include time, enter the times and select the relevant time zone.

Are leap years taken into account?

Yes. The tool uses PHP date functions and supports February 29.

What happens when daylight saving time changes?

With time included, DST changes in the selected zone affect the actual total duration.

Can I calculate an earlier date against a later one?

Yes. The tool indicates that the start date is later; you can also enable the absolute difference.

Can I calculate working days?

Yes. The option excludes Saturdays and Sundays. It does not exclude holidays.

What is the difference between calendar months and total days?

Calendar months respect the position of each date, while total days add the complete elapsed duration.