Find the days between two dates, or add/subtract days, weeks, months, or years from a date.
How it works
"Days between" subtracts the two dates in milliseconds and converts to whole days, then divides by 7 for weeks and by 365.25 for years to account for leap years on average. "Add/subtract" hands the amount straight to JavaScript's native date arithmetic, which is why adding months or years can shift the day of the month when the target month is shorter.
FAQ
Why does the years figure use 365.25 instead of 365?
To account for leap years on average — dividing by a flat 365 would overstate the number of years across any multi-year span, since roughly every fourth year has an extra day.
What happens if I add a month to January 31st?
JavaScript's native date math rolls over to the next valid date — since February 31st doesn't exist, adding a month typically lands on March 2nd or 3rd instead of clamping to February's last day.
Free, unlimited, no account. If this saved you a paid tool, a small thanks is appreciated.