Compare dates in either order
- Enter start and end dates.
- Calculate the duration. A reversed order gives a negative signed day count and backward direction.
- Review the calendar breakdown or complete weeks, then copy or download the result.
Calendar and day counting
Calendar duration uses the earlier date as its anchor: count completed months, keeping its original day where possible and clamping to month end when missing. Split completed months into years and months, then count remaining days from that anchor. Duration is shown as a nonnegative length; direction and signed elapsed days preserve the input order.
2023-01-31 to 2023-02-28 gives 0 years, 1 month, 0 days and +28 elapsed days. Reversing those dates keeps that duration and gives −28 elapsed days. 2024-02-28 to 2024-03-01 spans 2 days because 2024 is a leap year. Equal dates give 0.
Complete weeks = floor of absolute elapsed days ÷ 7; remaining days are the remainder. A 31-day span is 4 weeks and 3 days. These weeks are fixed seven-day units, independent of month boundaries.
U.S. Naval Observatory Gregorian leap-year rules support actual month lengths. Century years such as 1900 and 2100 are not leap years; 2000 is. Month-end decomposition is this tool’s explicit convention and can differ from other calculators.
Limits and privacy
Gregorian calendar dates 0001-01-01 to 9999-12-31, even before historical calendar adoption. Date-only arithmetic ignores time zones, time of day and DST. Counts measure elapsed date boundaries and do not add one to include both endpoints. No business-day, holiday, working-hour or legal deadline rules are inferred.
Inputs stay in browser memory without uploads or saved dates. CSV includes ISO input dates, direction, calendar duration, signed and absolute days, weeks, anchor and convention. Reset restores example dates and clears results. Undo action restores both dates before Today, Swap or Reset. Calculate again after restoring. Editing either date discards the previous Undo step.
Why can one month have 28 or 31 elapsed days?
Calendar months have different lengths. Calendar duration and fixed-length elapsed days answer different questions and are displayed separately.
Is the calendar breakdown signed?
Its components describe the nonnegative interval from earlier to later. The signed day count and direction show whether your end date is before or after your start.
Related tools
Age calculator · Days between dates and inclusive counting · Date and age tools