UtilityToolsLab

© 2026 UtilityToolsLab. Built and maintained by the UtilityToolsLab Team.

About·Changelog·Privacy Policy·Terms of Service·Contact
HomeDate & Time ToolsDate Difference

Related Tools

Working DaysTime Zone ConverterDate Add / SubtractCountdown TimerTime DurationTime Card Calculator

Date Difference — Days Between Dates

How many days between two dates? Get the exact gap in years, months and days, plus the total in days, weeks, hours and minutes. Leap years handled.

You Might Also Like

All Date & Time Tools

Working Days

Count business days between two dates, excluding weekends and any public or custom holidays. Add N working days to find a deadline. 5-day or 6-day work week.

Time Zone Converter

Convert any date and time across 40 IANA time zones simultaneously. DST handled automatically. Copy any result with one click. No server, no sign-up.

Jet Lag Planner

Plan for jet lag between 47 cities: the time difference on your travel date, a bedtime shift for the days before you fly, light timing and days to adjust.

Countdown Timer

Live countdown to any date and time in days, hours, minutes and seconds. Shows total hours and minutes too. Past dates switch to elapsed time automatically.

Dividing the number of days by 30 and calling the result "months" is how most quick date-difference answers go quietly wrong, since real months run from 28 to 31 days. Date Difference Calculator works the way a calendar actually does: it counts real elapsed years, months and days, alongside the plain totals in days, weeks, hours and minutes.

Use it for contract terms, ages measured precisely rather than rounded, or any "how long has it been" question where the answer needs to survive a month with 28 days in it. Enter two dates and every figure updates immediately.

A Real Example: January 31 to March 1

The tool loads with Start Date set to 2024-01-31 and End Date to 2024-03-01, which resolves to 0 years, 1 month, 1 day. That’s not a rounding artifact: one calendar month after January 31 lands on February 29 (2024 is a leap year, so that’s the last valid day of February), and February 29 to March 1 is exactly one more day.

How the Math Works: Calendar-Aware, Not Flat 30-Day Months

The calculator finds the largest whole number of calendar months that fit between the two dates, adding months to the start date one at a time and clamping to the target month’s real last day whenever the start day doesn’t exist there (adding a month to January 31 can’t land on "February 31"). Whatever remains after that becomes the day count. This was checked during development against Python’s dateutil.relativedelta, the reference implementation most calendar libraries agree with, across five cases including a leap-day start (February 29 to the following February 28) and matched on every one.

Edge Cases: Invalid Dates and Reversed Order

  • A date like 2024-02-30 doesn’t silently roll forward to March 1 the way JavaScript’s own Date parsing would; it’s rejected outright with “Enter two valid dates in YYYY-MM-DD format.”
  • If the end date comes before the start date, the two are swapped automatically and a note says so, rather than returning a negative day count.
  • Checking Include end date counts both dates. That is the convention for leave requests, rental periods and many contracts, where both the first and the last day count. It adds one day everywhere, including the years/months/days line: 1 January to 31 January inclusive reads 31 days and exactly 1 month, not 31 days next to “30d”.
  • Each date has a Use today button, so “how many days since” and “how many days until” questions take one click. Today means your own device's date, not a server's.

Difference

0y 1m 1d

1 month and 1 day — 30 days in total

Total Days

30

Weeks

4w 2d

Total Hours

720

Total Minutes

43,200

The Years/Months/Days line is calendar-aware, not a flat 30-day month: one month after January 31 lands on February 29 in a leap year (clamped to the month’s real last day), so 2024-01-31 to 2024-03-01 is 1 month and 1 day, not 30 days relabelled.