Date Calculator
Calculate the difference between two dates, or add and subtract days from a starting date. All calculation happens in your browser.
Quick presets:
Both dates are the same — the difference is 0 days.
Calculated locally in your browser.
Two modes
- Date Difference — enter a start date and end date to see the gap in years, months, days, and total days.
- Add / Subtract Days — enter a starting date and a number of days to find the resulting date.
Examples
- Date difference: January 1, 2024 → September 18, 2026 = 2 years, 8 months, 17 days (990 total days)
- Add days: January 1, 2026 + 30 days = January 31, 2026
- Subtract days: March 1, 2024 − 1 day = February 29, 2024 (leap year handled correctly)
Accuracy notes
- Leap years and different month lengths are accounted for in all calculations.
- All dates are calculated in your browser's local timezone using local midnight — no timezone offset issues.
- When the end date is before the start date in Difference mode, the calculator reports the absolute difference and indicates the order.
Frequently Asked Questions
How are month differences calculated across irregular months?
Calculations adhere strictly to calendar boundaries. From the 1st of a month to the 1st of the next month equals exactly 1 calendar month, taking varying month lengths (28, 29, 30, or 31 days) into account.
Does the calculator account for leap years?
Yes. Full leap year calendar logic (including leap day on February 29) is incorporated for all past, present, and future Gregorian calendar dates.
What happens when subtracting days across year boundaries?
The date arithmetic rolls backwards smoothly across year, month, and day boundaries without timezone drift.
Is my date information sent anywhere?
No — all date comparisons and offset computations execute locally inside your browser using client-side JavaScript.