Date and Time Tools

Date Difference Calculator in Years, Months and Days

Calculate the interval between two dates in calendar years, months and days, elapsed full days, weeks, and converted time units, with CE and BE support.

Processed in your browser. Your input is not sent to the server.

Two dates, one clear interval

Choose the start and end dates

Adjacent dates are 1 day apart; equal dates are 0 days apart. Years can be entered as CE or BE.

Start date
End date

Preparing the example

Calendar interval

Difference between the dates

0years
0months
0days
Total days0
Full weeks + days0 + 0
Total hours0
Total minutes0
Total seconds0
Approx. years0

The totals measure elapsed date boundaries and do not count both endpoints inclusively.

Private local export

Export the date difference report

Files are generated locally from the current result.

Quick answer

How many years, months and days are between two dates?

Compare the earlier date with the later date, count completed calendar years and months, then the remaining days. Elapsed days measure the two date boundaries at 00:00, so adjacent dates are 1 day apart and equal dates are 0 days apart.

How to use this tool

  1. Choose the start and end dates; each can independently use Gregorian or Buddhist Era years.
  2. Calculate or edit the fields to update the calendar difference and elapsed time totals.
  3. Check the direction and counting convention before using a deadline, then export to Print, Excel, PDF, or TXT if needed.

How the calculation works

A Buddhist Era year is converted to Gregorian by subtracting 543 and every date is validated against real month lengths and Gregorian leap-year rules. The dates are ordered to calculate an absolute calendar difference while the interface retains whether the entered end date is before or after the start. Elapsed days run between 00:00 date boundaries in Asia/Bangkok and are converted to weeks, hours, minutes and seconds. Approximate months and years use 30.436875 and 365.2425 average days respectively.

Examples

Example Input Expected result
Adjacent dates
1 January 2025 to 2 January 2025
0 years, 0 months, 1 day and 1 elapsed day
Across a leap year
1 January 2024 to 1 January 2025
1 year, 0 months, 0 days and 366 elapsed days
Reverse entry order
31 July 2025 to 15 July 2025
The end-before-start direction is shown and the absolute difference is 16 days

Limitations

  • This convention measures between date boundaries and does not count both endpoints; laws, contracts, or institutions can prescribe a different convention.
  • The result is general calendar arithmetic, not certification of a legal, financial, medical, or eligibility deadline.
  • Hours, minutes, and seconds are conversions of full days at 00:00 and exclude time-of-day or time-zone changes.
  • Totals labeled approximate months or years are not counts of completed calendar months or years.

Frequently asked questions

Are both the start and end dates counted inclusively?

No. The calculator measures elapsed date boundaries, so equal dates are 0 days apart and adjacent dates are 1 day apart. If a rule requires both endpoints to be counted, adjust the result under that rule.

What happens if the end date is before the start date?

The calculator orders the dates and returns the absolute interval, but clearly identifies that the entered end date is before the start date to avoid a misleading interpretation.

Why are total months and total years approximate?

Calendar months and years do not all have equal lengths. Approximate totals divide elapsed days by 30.436875 days per month and 365.2425 days per year; the years-months-days result uses the actual calendar.

Are entered dates stored?

No. Calculation and file generation run in the browser, and the dates are not sent to the server.

References

  1. Microsoft Learn — DateTime.IsLeapYear Verified 2026-07-31
  2. IANA Time Zone Database — Asia/Bangkok Verified 2026-07-31

Content and calculation method last reviewed: