BCBetter Calculators

Date Add Calculator

Add years, months, and days to a starting date to find the resulting date.

🧮

Enter your values and click Calculate

How It Works

The start date is constructed as a UTC midnight Date object. Years are added by calling setUTCFullYear(year + addYears), months by setUTCMonth(month + addMonths), and days by setUTCDate(day + addDays). Each setter is applied separately so that month-end clamping occurs at the correct step: if the start date is January 31 and you add 1 month, setUTCMonth moves to February and the Date constructor clamps February 31 to February 28 (or 29). Days are added last so that adding 1 day to February 28 correctly yields March 1. All operations use UTC to prevent DST clock shifts from affecting the result. Total days added is computed as the millisecond difference between the result and the start, divided by 86,400,000.

Examples

Add 3 months and 14 days to March 7, 2025
A common project deadline calculation.
Result: June 21, 2025.
Add 1 year to February 28, 2024 (leap year)
Checking whether a 12-month period lands on a leap day.
Result: February 28, 2025.
Add 90 days to January 15, 2026
Post-surgery or prescription follow-up in days.
Result: April 15, 2026.

Frequently Asked Questions

What happens when adding months crosses a year?
The calculator handles this automatically — adding 3 months to November 2025 correctly returns February 2026. JavaScript's setUTCMonth handles year rollover without any extra logic.
What if the resulting day doesn't exist, like February 31?
JavaScript's Date constructor clamps invalid dates to the last valid day of the month. Adding 1 month to January 31 produces February 28 (or 29 in a leap year) rather than an error.
Can I subtract dates instead?
Use the Date Subtract Calculator for working backwards from a date. It supports subtracting any combination of days, weeks, and months with the same edge-case handling.

Related Calculators