Calculate

Date Calculator

Add or subtract years, months, and days from a specific date.

Date Operation

Resulting Date

--
Advertisement

Why Date Math is Complex

Calculating dates manually is deceptively difficult. It's not just base-10 math; it's a mix of base-12 (months), base-7 (weeks), and base-28/29/30/31 (days).

The Leap Year Rule

We add a leap day (Feb 29) every 4 years to keep our calendar in sync with the Earth's orbit around the sun, which takes approx 365.24 days. However, the rule is more complex:

  • Divisible by 4? Yes (Leap Year).
  • ...Unless divisible by 100? No (Not a Leap Year).
  • ...Unless divisible by 400? Yes (Leap Year again).

This is why the year 2000 was a leap year, but 1900 was not.

Time Zones & Epochs

Computers store dates as the number of milliseconds since January 1, 1970 (UTC), known as the Unix Epoch. When you see a date bug showing "1969" or "1970", it usually means the timestamp value is 0 or -1.