Date Difference Calculator
Find the exact gap between two dates — in days, weeks, months, years, hours, minutes, seconds, and working days.
Select a start and end date to see the difference.
How to Use This Calculator
Pick two dates, get every number you need in one view.
What's Calculated
Every measurement this tool produces from your two dates.
Frequently Asked Questions
The calculation subtracts the earlier date from the later date to get the total milliseconds, then divides by 86,400,000 (milliseconds in a day) and rounds to the nearest integer. Both dates are treated as midnight to avoid timezone shifts from affecting the count. The result is the total number of calendar days between the two dates.
Calendar days count every single day in the range — Mondays through Sundays, including public holidays. Working days (also called business days) count only Monday through Friday. This calculator counts Mon–Fri without subtracting public holidays, since those vary by country, region, and company. If you need to subtract specific holidays, take the working days result and subtract the number of holidays that fall within the range manually.
Dividing total days by 30 gives an approximation because not every month has 30 days. The Y/M/D breakdown uses calendar-accurate arithmetic: it counts full calendar years by comparing year numbers, then counts full calendar months accounting for the actual days in each month, then counts the remaining days. For example, from January 31 to March 2 is 1 month and 1 day — not 30 days — because February has fewer days and the month boundary falls earlier.
This calculator works on whole dates (midnight to midnight). The hours and minutes shown are derived from the day count (days × 24 and days × 1440), not from a specific time within each day. If you need the difference between two specific date-times — for example 2024-06-07 09:30 to 2024-06-08 15:45 — use the Unix Timestamp Converter's difference calculator, which accepts timestamps with time components.
Yes. By treating both dates as midnight at the start of the day (ignoring clock changes within a day), the calculation is unaffected by DST transitions. The total days count is always based on calendar days, not elapsed wall-clock hours. A day that "gains" or "loses" an hour due to DST still counts as one day.
A leap year has 366 days instead of 365, with February 29 added. The rule: a year is a leap year if it's divisible by 4, unless it's also divisible by 100 — but if it's divisible by 400, it is a leap year. So 2000 was a leap year, 1900 was not, 2024 was, 2100 will not be. The calculator includes the leap year status of both years in the results, and correctly counts February 29 as a day when the range spans it.
"Year to date" (YTD) sets the start date to January 1 of the current year and the end date to today. It tells you how many days have elapsed in the current calendar year so far — useful for financial reporting, progress tracking, and measuring how much of the year has passed.