Date Difference Calculator
Measure the exact gap between two moments.
- Local by default
- No signup
- AI is opt-in
Both fields use your local timezone. Seconds are not part of the input.
Calendar difference
Total elapsed
Calendar months follow the shorter month when a day does not exist (Jan 31 + 1 month = Feb 28). Elapsed time is measured from the local clock, so daylight-saving changes are reflected.
Two dates can be compared in more than one way. This calculator reports both a calendar breakdown — years, months and days — and the exact elapsed time in days, hours, minutes and seconds, using your local timezone.
Calendar difference versus elapsed time
“One month later” and “30 days later” are not the same promise. A month is 28, 29, 30 or 31 days depending on where it starts, so a duration expressed in months has no fixed length. The elapsed column avoids that ambiguity by measuring the actual milliseconds between the two moments.
Jan 31 → Feb 28 = 0 years, 1 month, 0 days = 28 elapsed days
Jan 31 → Mar 1 = 0 years, 1 month, 1 day = 29 elapsed days (non-leap year)Both answers are correct; they answer different questions. Use the calendar form for billing cycles, anniversaries and subscriptions, and the elapsed form for timeouts, runtimes and logs.
How the calendar breakdown is calculated
The calculator orders the two moments from earlier to later, counts whole months, then adds that many months to the earlier date. If the result overshoots the later date, it removes one month. What remains is split into days, hours, minutes and seconds. Adding a month clamps to the last valid day, so Jan 31 plus one month is Feb 28 in a non-leap year rather than March 3.
This definition is stable and explainable, and it matches how people usually describe age and tenure. It is not the only possible definition: some systems count 30-day months, and some measure from the end of the month. When two systems disagree by a day, check which month-length rule each one uses.
Timezones and daylight saving
Both inputs are interpreted in your local timezone, and the result is displayed in the same zone. Elapsed time is a millisecond difference, so it is physically exact. A calendar day that contains a daylight-saving change can be 23 or 25 hours long, even though the calendar count still calls it one day.
If you need a difference that is independent of the viewer, convert both instants to UTC first, or use Unix timestamps. Local time is right for human schedules; UTC is right for logs and cross-region systems.
Inclusive versus exclusive counting
The difference between Jan 1 and Jan 3 is usually two days, not three, because the end date is a boundary rather than a counted day. Event planning often counts inclusively: a conference from the 1st to the 3rd covers three calendar dates. Decide which convention you need before using the number.
- Elapsed duration: exclusive of the end instant, which is what this calculator reports.
- Human day counts: often inclusive, so add one day for “how many dates are covered”.
- Hotel nights: usually the difference between check-in and check-out dates.
- Deadlines: check whether the deadline day itself is still valid.
Leap years and month ends
February 29 exists only in leap years. Adding one year to February 29 therefore produces February 28 in the following year, and the calendar breakdown reflects that clamp. The same rule applies to any day that does not exist in the target month, such as the 31st when the target month has 30 days.
Because of these clamps, a calendar year is not always 365 elapsed days. Over long ranges the difference is small but measurable, and it grows with the number of leap days crossed. The elapsed column is the one to trust for exact durations.
Working days are a different calculation
This tool counts every day, including weekends and holidays. Business-day calculations need a calendar of non-working days, a rule for which weekdays are working days, and a decision about whether holidays that fall on weekends are observed on another day. Those rules vary by country, region and employer, so they are deliberately out of scope here.
Frequently asked questions
Why do the calendar days and total days not match?
They answer different questions. The calendar breakdown counts whole months first and then the remainder in days, while the total row measures the actual elapsed time. Months have different lengths, so the two views can differ by several days over a long range.
Does the result include the end date?
No. The end moment is a boundary, so Jan 1 to Jan 3 is two elapsed days. If you need the number of calendar dates covered, add one day.
Does daylight saving affect the answer?
Elapsed time is measured in absolute milliseconds, so it reflects the real length of the interval, including 23- and 25-hour days. The calendar breakdown uses local wall-clock dates and remains a whole-day count.
Why is one month not always 30 days?
Calendar months follow the actual month lengths. The calculator adds whole months to the earlier date and clamps to the last valid day, so Jan 31 plus one month is Feb 28 or Feb 29 rather than March 2 or 3.
Can I calculate business days or exclude holidays?
Not in this tool. Working-day counts require region-specific holiday data and a policy for weekends and observed holidays. The result here counts every calendar day.
Is my input sent to a server?
No. Date parsing and arithmetic run in your browser. Nothing is uploaded or stored.