Summary
Date arithmetic answers the question “what date is N days/months/years from a given date?” While adding days is conceptually straightforward (each day advances by one), adding months or years introduces complications because months have different lengths and leap years change February. This calculator handles all of these edge cases and also tells you the day of the week for the resulting date.
How it works
The calculator supports three operations:
- Add/subtract days — advances or retreats by an exact number of calendar days. This is unambiguous because a day is always exactly one day.
- Add/subtract months — advances the month number. If the resulting day exceeds the new month’s length, it is capped (e.g., January 31 + 1 month = February 28 in a non-leap year).
- Add/subtract years — advances the year. The only edge case is February 29 in a leap year: adding 1 year lands on February 28 if the target year is not a leap year.
Day-of-week calculation
The day of the week for any date can be computed algorithmically. Zeller’s congruence and the Doomsday algorithm are two well-known methods. Modern implementations typically use the Julian Day Number modulo 7.
The formulas
Where
Where
Worked examples
What date is 90 days after January 1, 2025?
Days remaining in January
= 30 days used, 60 remaining
All of February 2025 (not a leap year)
= 58 days used, 32 remaining
Remaining days in March
= 89 days used, 1 remaining
Into April
= 90 days used
Result
90 days after Jan 1, 2025 = April 1, 2025 (Tuesday)
January 31 + 1 month
Advance month from January to February
= February 31 does not exist
Cap at month's last day
= February 28
Result
January 31 + 1 month = February 28 (month-end capping rule)
February 29, 2024 + 1 year
Advance year from 2024 to 2025
= 2025 is not a leap year
Cap at month's last day
= February 28, 2025
Result
Feb 29, 2024 + 1 year = Feb 28, 2025
Practical uses
- Deadline calculation — “your payment is due 30 days from the invoice date” or “the warranty expires 2 years from purchase.”
- Scheduling — finding the date for a meeting “3 months from today” or determining when a subscription renews.
- Travel planning — counting days to determine check-in/check-out dates, visa duration, or trip length.
- Legal and financial — notice periods, grace periods, and maturity dates are specified as offsets from a reference date.
Assumptions & limitations
- Month-end capping — adding 1 month to January 31 gives February 28 (or 29). This means date arithmetic is not always reversible: Jan 31 + 1 month - 1 month = Jan 28, not Jan 31.
- No business days — the calculator counts calendar days. For business-day calculations (excluding weekends and holidays), a dedicated business day calculator is needed.
- Gregorian calendar — all calculations assume the Gregorian calendar. The calculator does not handle Julian calendar dates or historical calendar transitions.
- Single timezone — the result is a calendar date without timezone context. Crossing timezones or daylight saving transitions could shift the perceived date.