What if the second date comes first?
The absolute distance remains positive and the signed result identifies the direction.
Measure the calendar-day distance between two dates in either order.
Adjust the values below to get a clear estimate.
Each validated date is normalized to midnight UTC. Subtracting the timestamps and dividing by the exact number of milliseconds per day gives whole calendar days.
Signed days = (second date − first date) / 86,400,000Inputs: firstDate: 2024-02-28 · secondDate: 2024-03-01
Illustrative result: 2 calendar days
February 29 is a real calendar day in 2024, so the dates are two days apart.
The absolute distance remains positive and the signed result identifies the direction.
No. This reports elapsed date boundaries; use the business-day calculator for an inclusive weekday count.