Home / Calculators / Date difference

Date Difference Calculator

Find the exact time between two dates as years, months and days, with the same period in total months, weeks, days, hours, minutes and seconds.

Years, months and days

The main result is the period split into whole years, whole months and the days left over, for example 1 year, 2 months and 5 days. This is how people usually talk about time between dates: age, length of service, the age of a company, or the time since an event.

How the months are counted

The tool counts how many whole months fit between the two dates, moves the start date forward by that many months, and counts the remaining days. For 15 January 2024 to 20 March 2025, 14 whole months from 15 January 2024 is 15 March 2025, and 5 more days reach 20 March 2025. The answer is 1 year, 2 months and 5 days.

Months have different lengths, so a start day that does not exist in a month, such as the 31st, is moved to the last day of that month. 31 January plus one month is the end of February. Other calculators may round this case differently, so two tools can disagree by a day or two at month ends.

Totals in other units

The table shows the same period as complete months, weeks, days, hours, minutes and seconds. Hours, minutes and seconds assume whole days from midnight to midnight, because no times of day are used.

Include the end date

Tick Include the end date to count both the first and the last day. This adds one day to the result. It is useful for periods such as a contract term, where both dates are part of the period.

Which date comes first

If the second date is earlier, the tool swaps the dates and says so. The result is always a positive period.

Related calculators

For a single number of days, use days between dates. For a count in weeks or months only, see weeks between dates and months between dates. Count up from an event with days since. The guide shows how to do the same in Excel and in code.

Frequently asked questions

How do I find the difference between two dates in years, months and days?

Choose both dates. The tool shows the whole years, whole months and remaining days between them.

Why does the result differ from another calculator?

Calculators handle month ends differently. This tool uses the last day of a month when the start day does not exist in it, for example 31 January plus one month.

Can I use it to work out an age?

Yes. Enter the date of birth as the start date and today as the end date.

Does it show hours and seconds?

Yes, as totals for the period. They assume whole days from midnight to midnight.