OTHER · DATE DIFFERENCE
Date Difference Calculator
Calculate the number of calendar days, months, and years between two dates. Uses UTC calendar arithmetic — accurate across daylight saving time transitions.
About This Calculator
Find the exact number of days between any two dates. The result uses ISO 8601 exclusive-end intervals (Jan 1 → Jan 3 = 2 days) and accurate calendar arithmetic that is not affected by daylight saving time transitions.
How It Works
Select a start and end date. The calculator counts the calendar days between them using Julian Day Numbers — an astronomically-derived integer that increments by exactly one per calendar day regardless of clock changes.
The Formula
Days = JDN(end) − JDN(start), where JDN is the Julian Day Number for a UTC calendar date. Exclusive end (ISO 8601): the end date itself is not counted.
Frequently Asked Questions
- Why use Julian Day Numbers instead of dividing milliseconds?
- Dividing (endMs − startMs) / 86400000 gives wrong answers across daylight saving transitions — a spring-forward day is only 23 hours in local time, and a fall-back day is 25 hours. Julian Day Numbers are based on UTC calendar dates and always increment by exactly one per day.
- What does "exclusive end" mean?
- "Exclusive end" is the ISO 8601 interval convention. From Jan 1 to Jan 3 is 2 days (Jan 1 and Jan 2, not including Jan 3). This matches how most spreadsheets and date libraries count.