Add/Subtract Days Calculator

Add or subtract a number of days from a given date.

Select a date and enter days to calculate.

What This Calculator Does

"What date is 45 days from now?" gets surprisingly fiddly to work out by hand once the span crosses into a new month, or a new year, or through February in a leap year. Enter a start date and a number of days, and this tool returns the resulting date directly, handling all of those boundary cases the same way every time.

How to Use It

Pick a Start Date (it defaults to today) and enter a number in Days to Add/Subtract. Positive numbers move forward in time; enter a negative number to go backward instead — the field genuinely doubles as both an "add" and "subtract" tool depending on the sign you use. The result names both the original date and the new one, along with how many days apart they are and in which direction.

The Formula

The calculator uses date-fns's addDays function, which adds (or, for a negative input, subtracts) whole calendar days to a date and correctly rolls over into the next month or year whenever the count runs past the end of the current one. Because it operates on real calendar data, it automatically accounts for variable month lengths and leap years — there's no fixed-length "month" being assumed anywhere in the calculation.

A Worked Example

Starting from 2024-01-25 and adding 10 days lands on 2024-02-04 — crossing cleanly from January into February. A leap year edge case: starting from 2024-02-28 and adding just 1 day lands on 2024-02-29, since 2024 is a leap year and that date genuinely exists; add 2 days instead of 1, and it rolls past Feb 29 straight into 2024-03-01. Run that same 2-day addition from 2023-02-28 — a non-leap year, so there's no Feb 29 to land on at all — and it goes straight to 2023-03-01 after just 1 day, immediately rolling into March. Subtraction works the same way in reverse: 2024-01-10 minus 5 days lands on 2024-01-05.

How to Add or Subtract Days Manually

Add the day count to the current day-of-month first; if that number is larger than the current month has days, subtract that month's length and carry the remainder into the next month (repeating if it spans several months). Starting January 25 and adding 10: 25 + 10 = 35, but January only has 31 days, so subtract 31 to get 4, and carry into February — landing on February 4. The same leap year rule from date-difference math applies here too: check whether February has 28 or 29 days for the year you're crossing through, since that changes exactly where a span lands if it runs through late February.

FAQ

How do I add days to a date?
Enter your start date and the number of days to add. Use a negative number to subtract days. The result shows the new date.
Does this handle month and year boundaries?
Yes, the calculator correctly wraps across months and years using date-fns, accounting for variable month lengths and leap years.