Loading...
Loading...
Pick any two dates and get the difference in years, months, days, weeks, business days, and total hours — plus whether the end date is past or future.
A date difference calculator measures the time between two calendar dates using the Gregorian calendar the world has used since 1582. This tool reports the gap six ways — years/months/days (the calendar format a project plan uses), total days (for deadline tracking), total weeks and hours, and the business-day count with weekends split out. Leap years are handled correctly, month lengths are respected, and the direction indicator tells you whether the end date falls before or after the start. All calculations happen on-device in plain JavaScript; nothing you type is sent to a server.
Use the first date picker. Any valid Gregorian date from 1000 CE onward works; the today button fills the current date quickly.
The second date can be before or after the start — the tool reports the absolute difference either way and flags the direction.
The years-months-days view is the format most contracts, travel plans, and legal documents expect.
Use total days for deadlines, total weeks for sprint planning, or the business-day count for SLA and payroll calculations.
Swap flips the two dates, reset clears them, and changing either input recomputes everything instantly.
Let d1 = start date, d2 = end date (both interpreted as local midnight). Total days = floor((d2 − d1) / 86,400,000 ms) Total weeks = total days / 7 Total hours = total days × 24 Years/Months/Days (calendar): y = d2.year − d1.year m = d2.month − d1.month; if d2.day < d1.day, borrow from m d = days remaining in that month window Business days = walk each day, count where dayOfWeek is 1–5
The simple millisecond subtraction is the authoritative total-day count — it handles leap days and month-length variation automatically. The years-months-days breakdown is a human-calendar interpretation and follows the borrow-from-next-unit convention used by `DATEDIF` in Excel and most civil-law contracts. Business days are computed by iterating through the interval and counting each weekday (public holidays are not subtracted — add them manually if your jurisdiction requires them).
Reference: Gregorian calendar — NIST Time & Frequency
| Range | Difference |
|---|---|
2025-01-01 → 2026-01-01 | 1 year · 0 months · 0 days · 365 total days · 261 business days A calendar year covering one non-leap year. |
2024-02-28 → 2024-03-01 | 0 years · 0 months · 2 days · 2 total days Spans the Feb-29 leap day in 2024 — counted correctly. |
2026-04-21 → 2026-06-15 | 0 years · 1 month · 25 days · 55 total days · 40 business days Typical project sprint window with weekend days excluded. |
Calculate your exact age in years, months, and days from any date of birth.
Check body mass index from height and weight using metric or imperial units.
Work out percentages, percentage change, and percentage of a total in seconds.
Add a tip, split the bill, and share the total evenly across a group.
Last updated