🛠️

date calculator

Calculate the difference between two dates, or add and subtract days, weeks, months, and years.

Years
Months
Weeks
Days

About Our Date Calculator

Dates are everywhere in our daily lives — deadlines, anniversaries, vacations, project schedules, legal contracts, and medical records. Yet working with dates manually is surprisingly tricky. How many days are there between today and December 31? If I add 6 months to January 31, what date do I get? How many weeks until my next vacation?

Our date calculator handles all of these questions instantly. It works in two modes: one for finding the exact difference between two dates, and another for adding or subtracting days, weeks, months, or years from a starting date. Both modes handle leap years, varying month lengths, and edge cases correctly.

How to Use the Date Calculator

The tool has two modes. Pick the one that matches your task:

Mode 1 — Difference Between Dates

  1. Click the "Difference Between Dates" tab.
  2. Enter a From Date and a To Date using the date pickers.
  3. Optionally click a quick preset like Today, Last week, or Last month to auto-fill the From date.
  4. Tick "Include end date" if you want to count both start and end days (useful for hotel stays, subscription periods, etc.).
  5. The result appears instantly: years, months, days breakdown plus total days, weeks, hours, and minutes.

Mode 2 — Add / Subtract

  1. Click the "Add / Subtract" tab.
  2. Enter a Start Date.
  3. Choose Add or Subtract.
  4. Enter amounts for years, months, weeks, and/or days. You can mix them freely — e.g. add 1 year, 3 months, and 2 weeks all at once.
  5. The resulting date is shown in full, along with its day of the week, the ISO week number, and the days remaining in that year.

Why Use Our Date Calculator

Plenty of date tools exist online, but ours is built with a few advantages that matter in everyday use:

  • Two tools in one. Difference and add/subtract modes are combined into a single page — no need to switch between tools.
  • Leap-year aware. Our calculation correctly handles leap years and month-length variations, so results match real calendar behavior.
  • Detailed breakdown. Instead of just showing "120 days," we show years, months, days, total weeks, hours, and minutes.
  • Extra context. In add/subtract mode, you also see the day of the week, ISO week number, and days remaining in the year — useful for scheduling and planning.
  • Privacy first. Everything runs in your browser. Your dates are never sent to a server or stored anywhere.

Common Uses for a Date Calculator

People use date calculators for many practical tasks:

  • Calculating exact age or tenure for official forms and documents
  • Counting days until a vacation, wedding, or deadline
  • Working out how many days remain in a project timeline
  • Figuring out legal deadlines (30 days, 60 days, etc.)
  • Tracking subscription or contract end dates
  • Planning events and checking availability in advance
  • Calculating business day ranges (approximation)

How the Calculation Works

The date difference calculation is more nuanced than it looks at first glance. We first compare year, month, and day components separately to derive a precise "years, months, days" breakdown. If the day of the To date is less than the day of the From date, we borrow one month from the month count and add that month's length to the days.

For the add/subtract mode, we apply each addition (years, then months, then weeks, then days) in that order, using standard JavaScript Date arithmetic. This means month additions correctly roll over when a target month is shorter (e.g. adding 1 month to January 31 lands on February 28 or 29).

Frequently Asked Questions

What is a date calculator?

A date calculator is a tool that helps you work with dates in two main ways: finding the difference between two dates (for example, how many days between two events), and adding or subtracting days, weeks, months, or years from a starting date to get a new date.

How does the "Include end date" option work?

By default, our calculator counts the difference between the two dates excluding one of them. When you enable "Include end date", it counts both the start and end days, adding 1 to the total. This is useful for counting inclusive date ranges, like the number of days of a hotel stay.

Does the calculator handle leap years correctly?

Yes. The calculation uses the standard Gregorian calendar rules, so leap years (with 366 days, where February has 29 days) are fully accounted for. If you add 1 year to February 29, 2024, you will correctly get February 28, 2025.

Can I add months to a date like January 31?

Yes. When you add 1 month to January 31, the result depends on the target month. If the target month has fewer days (like February), the result rolls to the last day of that month. Our calculator uses standard JavaScript Date logic, which handles this automatically.

What is the ISO week number?

The ISO week number is a standard way of numbering weeks within a year, used by businesses and governments worldwide. Week 1 is the week containing the first Thursday of the year. Our calculator shows the ISO week number of the resulting date.

How do I use presets like "Last week" or "Last month"?

In the Difference mode, click any preset button to quickly fill the "From Date" with the appropriate date. For example, "Last week" sets the From date to exactly 7 days before today, making it easy to calculate weekly reports or review past periods.

Is my date input saved or shared?

No. All calculations happen entirely in your browser using JavaScript. Your dates are never sent to any server, stored, or shared. Even if you disconnect from the internet, the tool continues to work.

Can I calculate the number of working days between two dates?

This calculator shows total calendar days, not working days. For a business-day calculation (excluding weekends and holidays), you would need a dedicated business day calculator. However, the total days shown here can be a useful starting point for manual calculation.

Related Tools You Might Find Useful

If you found this date calculator helpful, you might also want to try our age calculator for precise age tracking, our percentage calculator for quick math, or our BMI calculator for health tracking.