Date Calculator
Find the elapsed days between two dates, or add and subtract calendar years, months, weeks and days from a starting date.
Calculator arithmetic runs locally in your browser and does not require an API.
The interactive calculator loads here when JavaScript is enabled.
How to use Date Calculator
Choose difference or calendar-shift mode. A difference excludes the starting endpoint: the same date is zero days. Reversing dates gives a negative count. Inputs use calendar dates, not clock timestamps.
Formula and method
Difference counts calendar days. Shifts combine years and months first, clamp the original day to the destination month’s last day if needed, then apply weeks × 7 and days.
Understanding the results
Months are not fixed 30-day durations and years are not fixed 365-day durations. Leap years affect valid dates. Clamping can make a shift non-reversible; no time zones, daylight-saving transitions, business days or holidays are modeled.
Worked example
Adding one calendar month to January 31, 2024 gives February 29, 2024 because 2024 is a leap year. January 31, 2023 plus one month instead gives February 28, 2023.
Calendar dates have no time-of-day or time-zone component. Business days and holiday calendars are not modeled.
Frequently asked questions
Are both endpoints included in the day difference?
No. January 1 to January 2 is one elapsed day; identical dates give zero.
Why does January 31 shift to the last day of February?
The destination month has no day 31, so the original day is clamped to its last valid day.
Does this count only working days?
No. It uses calendar days without weekends, holidays or business-calendar rules.