Date Add / Subtract

Add or subtract years, months, days, hours, minutes, or seconds from any date or Unix timestamp.

Starting Point

enter a date or paste a timestamp

Add or Subtract

fill in any combination of fields

The date add/subtract calculator takes a starting date and a duration, then computes the resulting date in every useful output format: full date and time, ISO 8601, Unix timestamp, and a relative description. Add 90 days to today, subtract 6 months from a contract date, or shift a Unix timestamp by 3 hours - the calculator handles leap years, varying month lengths, and end-of-month edge cases without writing code.

How Date Add / Subtract Works

The calculator takes a single starting date plus a duration broken into six fields: years, months, days, hours, minutes, and seconds. It then applies the operation (add or subtract) and returns the result in five formats simultaneously. You can fill any combination of duration fields - leaving the others at zero - or use them together (for example "+1 year, +3 months, +10 days").

The result card lists the new date as a full readable string, the date and time on separate rows, the Unix timestamp, the ISO 8601 format, and a relative description (for example "in 3 months and 12 days" or "5 years ago"). Click any row to copy that value to your clipboard. If you need the gap between two specific dates instead of shifting one date, the date difference calculator handles that.

When to Use Date Add / Subtract

Date arithmetic comes up constantly in business, legal, and engineering contexts. Doing it by hand is error-prone because months have different lengths and leap years insert extra days. Common scenarios:

How Months and Years Are Handled

Adding a month is not the same as adding 30 days. The calculator uses calendar-aware month arithmetic: adding 1 month to January 31 gives February 28 (or 29 in a leap year), not March 3. The same logic applies in reverse - subtracting 1 month from March 31 gives February 28 or 29. This matches how database functions like DATEADD and programming language date libraries behave, so the result is consistent with what your code would compute.

Years work the same way. Adding 1 year to February 29, 2024 gives February 28, 2025 (because 2025 is not a leap year). The calculator never produces an invalid date like "February 30" - it always clamps to the last valid day of the target month. If you specifically need to count whole days regardless of calendar shifts, fill the Days field instead of the Months or Years field.

Combining Multiple Units

You can fill any combination of the six fields and the calculator applies them in a predictable order: years first, then months, then days, hours, minutes, and seconds. This avoids order-of-operations ambiguity (for example, adding "1 month and 1 day" to January 30 produces March 1, not February 31). If you need a specific arithmetic order, work in smaller chunks - add the larger units first, copy the result, then use it as the starting date for the next addition.

For more complex schedules - like "every 5 minutes" or "every weekday at 9 AM" - the cron expression builder generates the matching cron syntax. To decode a Unix timestamp into a readable date, use the main converter. For ISO 8601 duration strings like P1Y2M3D, the ISO 8601 duration parser converts between machine-readable durations and human units.

Frequently Asked Questions

Enter your starting date in the top section, then click Add and type the number of days into the Days field. The result card below shows the new date in every standard format: full date and time, ISO 8601, Unix timestamp, and a relative description. Other fields can stay at zero, or you can combine them (for example 1 month and 15 days at the same time).

The calculator returns February 28 (or February 29 in a leap year) because there is no February 31. Adding a month always means moving to the same day in the next month, and clamping to the last valid day if that day does not exist. This matches the standard behavior of database functions and programming language date libraries.

Not in a single calculation - the operation toggle applies to all fields at once. To do a mixed calculation (for example add 1 year and subtract 5 days), run two separate operations: add the year first, copy the result back into the date field, then switch the toggle to Subtract and enter 5 days.

Yes. Click Subtract and enter the duration you want to go back in time. For example, subtracting 90 days from today gives the date that was 3 months ago. The starting date itself does not need to be today - you can enter any date and subtract from it.

Yes. February has 29 days in leap years (years divisible by 4, except century years not divisible by 400). Adding 365 days to February 28 in a non-leap year reaches February 28 the next year; in a leap year the same operation reaches February 27. The calculator follows the standard Gregorian calendar rules.

Yes. Paste a 10-digit (seconds) or 13-digit (milliseconds) Unix timestamp into the Unix Timestamp field, then enter the duration to add or subtract. The result card includes the new Unix timestamp ready to paste into a database, a script, or an API request.

Adding 30 days always moves the date forward by exactly 30 calendar days. Adding 1 month moves to the same day number in the next month, which can be 28, 29, 30, or 31 days depending on the source month. Use Days for fixed-length intervals (payment terms, retention windows) and Months for calendar-aligned intervals (renewals, anniversaries).

Years are applied first, then months, days, hours, minutes, and seconds in that order. This avoids ambiguity when the result of one step affects the next (for example adding a month before a day handles the end-of-month cases correctly). If you need a specific custom order, split the calculation into multiple steps using the result as the new starting date.

The calculator works in a timezone-neutral way using absolute time arithmetic. Adding 24 hours always advances the result by 86,400 seconds regardless of any clock changes that happen in between. If you need timezone-aware reasoning - for example moving a meeting time across a DST boundary - convert the moment to the target timezone using the timezone converter before or after the calculation.

The date add/subtract calculator starts from one date and shifts it by a known duration to find a new date. The date difference calculator works the other way: you give it two dates and it tells you the duration between them. Use this tool when you know the duration and want the resulting date, and use the difference tool when you know both dates and need the gap.