Adding days and weeks
Adding days/weeks is usually straightforward: you move forward or backward by a whole number of days.
When working with date-only values (YYYY-MM-DD), adding N days means stepping N calendar days forward (or backward if negative).
This is the most consistent operation and is commonly used for deadlines, reminders, prescriptions, and countdowns.
Weeks are simply 7 days — adding 2 weeks is exactly the same as adding 14 days.
- 2026-01-10 + 14 days = 2026-01-24
- 2026-03-01 + 90 days = 2026-05-30
Try it: Add/Subtract Days
Days and weeks are "fixed length" additions; results are always unambiguous.
Adding months/years and end-of-month rules
Months and years have variable lengths. If the target month has fewer days, calculators typically clamp to the last valid day.
Example: adding 1 month to Jan 31 is tricky because February often doesn't have a 31st. Most tools return Feb 28/29 (end-of-month clamping).
This also affects leap years: adding 1 year to Feb 29, 2024 gives Feb 28, 2025 since 2025 isn't a leap year.
If your use-case requires a different rule (e.g., "same day-of-month or skip"), you'll need custom logic or to use days instead.
- 2026-01-31 + 1 month → 2026-02-28 (clamped)
- 2024-02-29 + 1 year → 2025-02-28 (leap year handling)
- 2026-08-31 + 1 month → 2026-09-30 (Sep has 30 days)
Try it: Add/Subtract Months
Months/years are calendar-aware. End-of-month dates often clamp to the last valid date.
Common use cases
Date arithmetic is used everywhere — from project management to healthcare to legal deadlines.
**Project deadlines:** Add days or weeks to estimate delivery dates. "Ship in 2 weeks" = today + 14 days.
**Prescription refills:** Know when your 30-day or 90-day supply runs out. Add the days to your last refill date.
**Contract renewals:** Add 1 year (or 6 months) to a contract start date to plan renewals.
**Visa expirations:** Many visas are valid for 90 days or 6 months from entry. Add those days to your entry date.
**Legal deadlines:** Court filings often have deadlines like "30 days from service date" or "1 year from incident."
Try your own use case
Choose days for precision, months/years for calendar-based intervals.
Subtracting and reversing the operation
Subtracting is just adding a negative number, but reversing can be non-trivial for months/years when clamping occurred.
For days, subtraction is perfectly reversible: if you add 10 days and then subtract 10 days, you get back the original date.
For months/years, clamping can break reversibility: Jan 31 + 1 month → Feb 28; then Feb 28 - 1 month → Jan 28 (not Jan 31).
This asymmetry is important in financial/legal contexts where the original date matters.
- Jan 31 + 1 month = Feb 28
- Feb 28 - 1 month = Jan 28 ≠ Jan 31
Try it: Verify with Date Difference
If you need reversibility, prefer day-based offsets or store the original intent separately.
Tips for accurate date math
Follow these best practices to avoid common pitfalls in date calculations.
**Use days for exact intervals:** If you need exactly 30 days or 365 days, use days — not months or years.
**Be aware of DST:** This calculator uses date-only math (no time), so DST doesn't affect results. But if you're working with datetime values elsewhere, DST can cause surprises.
**Document the rule:** When building systems, document whether you use "same day of month," "end of month," or "clamp" rules.
**Test edge cases:** Always test with dates like Jan 31, Feb 28/29, and Dec 31 to catch clamping issues.
Test edge cases
Clear documentation and edge-case testing prevent date math bugs.
Frequently Asked Questions
Why does adding 1 month to Jan 31 become Feb 28/29?
▾
Why does adding 1 month to Jan 31 become Feb 28/29?
▾Because February usually has fewer than 31 days. Most calculators clamp to the last valid date in the target month.
Is adding 30 days the same as adding 1 month?
▾
Is adding 30 days the same as adding 1 month?
▾Not always. Months vary from 28 to 31 days. Use days for fixed-length offsets; use months for calendar months.
How do I subtract months or years?
▾
How do I subtract months or years?
▾Select "Subtract" as the operation and choose the unit. End-of-month clamping rules still apply.
What date is 90 days from today?
▾
What date is 90 days from today?
▾Enter today's date, select "Add", choose "Days", and enter 90. The result shows the exact date and weekday.
Does the calculator handle leap years correctly?
▾
Does the calculator handle leap years correctly?
▾Yes. Feb 29 is recognized in leap years, and adding 1 year to Feb 29 clamps to Feb 28 in non-leap years.
Can I use this for business days?
▾
Can I use this for business days?
▾This calculator counts calendar days (including weekends). For business days only, use a dedicated business days calculator.