Skip to content

Date Calculator

Add or subtract years, months, weeks, and days from a date, or measure the gap between two dates as a years-months-days breakdown plus total days and weeks.

Two questions, one tool

Most date math comes down to one of two things. Either “what’s the date 90 days from now?” or “how long is it between these two days?” This handles both, and it answers the instant you type, no calculate button.

Flip between the two modes with the tabs up top.

Add or subtract

Pick a start date. Punch in any mix of years, months, weeks, and days. Choose Add or Subtract. The result lands underneath with the full date and the weekday, because half the time the reason you’re doing this is to find out whether something falls on a weekend.

Say you sign a contract today with net-45 terms. Add 45 days and you’ve got the due date, and you can see it’s a Saturday, so payment really lands the Monday after. That kind of thing.

Month math has a famous trap, and it’s handled sensibly here. Add one month to January 31 and there’s no February 31 to land on, so the result clamps to the last valid day of the target month instead of silently rolling into March. Order of operations is years, then months, then weeks and days.

Date difference

Drop in two dates and you get three numbers back:

  • A calendar breakdown in years, months, and days, counted the way you’d work out someone’s age. From March 15 to June 2 isn’t just “79 days,” it’s 2 months and 18 days. The remainder days borrow from the previous month’s real length, so February’s short month is accounted for correctly.
  • Total days, the raw count between the two dates.
  • Total weeks, the day count divided by seven, with any leftover days shown alongside (so 7 weeks + 3d rather than a rounded-off “7”).

Order doesn’t trip it up. Put the later date first and the magnitudes stay the same; it just tells you the second date sits before the first.

A note on accuracy

Everything runs on your browser’s own clock and calendar, the standard JavaScript Date. Calculations stay in your local time zone, and to dodge a classic bug, dates are anchored at midday internally so daylight-saving shifts can’t bump a result onto the wrong calendar day. Whole-day counts ignore the clock entirely and compare calendar dates, so a difference is always a clean integer, never 89.96 days.

Nothing’s sent anywhere. The page does the arithmetic locally and updates live as you change any field.

Questions people ask

What happens when I add a month to the 31st?

It clamps to the last day of the next month. January 31 plus one month gives February 28 (or 29 in a leap year), not a phantom February 31 that spills into March. Same rule applies for any short-month landing.

Does the difference include both the start and end day?

It measures the span between them, so the start date is day zero. From the 1st to the 8th is 7 days. If you need to count both endpoints as occupied days, like booking nights versus billable days, add one.

Are leap years handled?

Yep. Because it leans on the browser’s real calendar, February 29 exists in leap years and the month-length borrowing in the breakdown uses each month’s actual length, so February isn’t assumed to be 30 days.

Can I go backwards in time?

Sure. Switch to Subtract in the add/subtract mode, or in difference mode just put the dates in whatever order, it reports the gap either way and notes the direction.

Why is the weekday useful?

Deadlines, shipping estimates, and “X business days out” calculations all hinge on it. Seeing that a target date is a Sunday tells you at a glance the real working deadline is a day or two off.

date calculator difference days time

Related Tools

More in Data Tools