LocalTools All tools →

Date Difference Calculator

Find the exact time between any two dates — years, months, weeks, days, hours and minutes. Includes business days, custom weekend settings, and end-date inclusion.

Dates to compare

Quick set:

Calculate the exact time between any two dates

This date difference calculator finds how much time separates any two dates — in years, months, days, weeks, hours and minutes all at once. It handles leap years, months with different lengths, business days, custom weekend days, and even time-of-day precision. Everything runs in your browser, so nothing is uploaded and no account is needed.

It's used by project managers tracking deadlines, legal teams counting notice periods, HR departments calculating notice or leave, accountants reconciling interest periods, event planners counting weeks until a wedding, and anyone who has ever needed to know "how many days until X?" The calculator answers that question for every unit at once, so you don't need to pick.

How to use it

  1. Enter the two dates. Pick a From date and a To date. Or use a quick preset — Today to Today, Start of month to Today, Start of year to Today.
  2. Add options. Turn on Include end date if the last day counts. Turn on Business days only to exclude weekends. Turn on Include time of day for hour-level precision.
  3. Customise weekends if needed. If your working week isn't Monday to Friday, toggle the weekend days. The business-day count updates instantly.
  4. Read the results. The top card shows the calendar breakdown (years, months, days). The stats grid shows totals in every other unit. The info grid shows weekday counts and the starting and ending weekdays.
  5. Copy or share. Click Copy summary for a plain-text report or Share link for a URL that pre-fills the calculator with your inputs.

What you get

  • Years, months, days — the exact calendar difference, not a rough approximation.
  • Total units — the same span expressed in every common unit: total years, months, weeks, days, hours and minutes.
  • Business days — the number of working days between the two dates, with configurable weekend days.
  • Weekdays vs weekends — how many of the days in the span were weekdays versus weekend days.
  • Starting and ending weekday — useful for scheduling and for catching "the deadline falls on a Sunday" issues.
  • Time-of-day precision — optional hours and minutes for the exact interval.

Include or exclude the end date

By default, the difference is exclusive of the end date. That is, the difference from 1 January to 31 January is 30 days. This is how most duration calculations work — the same convention Excel uses with simple subtraction.

Turn on Include end date and the calculator adds 1 day to the count. 1 January to 31 January becomes 31 days. This is how day-count conventions work in some contracts, hotel bookings, and business-day calculations where both endpoints count as service days.

Rule of thumb: if you're computing "how long until X", exclude the end date. If you're computing "how many service days are there", include it. If unsure, run both and check which matches the convention used by the party that needs the number.

Business days and custom weekends

Turn on Calculate business days only to exclude weekend days from the count. The default weekend is Saturday and Sunday, which matches most Western countries.

But weekends vary:

  • Friday and Saturday — most Middle Eastern countries (UAE, Saudi Arabia, Egypt, Israel)
  • Saturday only — some countries where Sunday is a normal working day
  • Friday only — parts of Iran and some religious communities
  • Sunday only — some industries where Saturday is a working day
  • Custom closures — for example, a shop closed on Mondays

The calculator lets you toggle any of the seven days as weekend days, so the business-day count matches your actual working week. It does not include public holidays — you'd need to subtract those manually.

Calendar vs 30-day months

This calculator counts calendar months, not fixed 30-day blocks. From 15 January to 15 February is exactly one month, whether February has 28 or 29 days that year. From 31 January to 28 February is also one month, because the end date is the last day of the following month.

This matches how age is counted on official documents. An infant born on 1 January is "one month old" on 1 February, "two months old" on 1 March, and "one year old" on 1 January of the next year — regardless of the number of days in between.

The calculator also gives you the total month count as a single number. From 1 January 2020 to 1 July 2021 is 18 months total. That can be more useful than "1 year 6 months" when computing interest or seniority.

Leap years and historical dates

The calculator uses the proleptic Gregorian calendar, which extends the modern Gregorian calendar backwards to year 1. This is the standard for historical date arithmetic in computing.

A year is a leap year when it is divisible by 4, except that century years are leap years only if divisible by 400. So 2000 was a leap year (divisible by 400), but 1900 was not (divisible by 100 but not 400). The calculator handles all of this automatically.

Any date from year 1 to 9999 is supported, so you can calculate the difference between a historical event and today, or between two historical dates.

Common real-world uses

  • Project deadlines — how many working days remain before delivery.
  • Event countdowns — weeks and days until a wedding, exam, holiday or launch.
  • Contract terms — days from notice to termination, or days of a cooling-off period.
  • Age calculation — exact age in years, months and days between a birth date and a target date.
  • Interest and finance — day count between two payment dates for simple or compound interest.
  • Leave and HR — working days between a leave start and end date.
  • Hotel and travel — nights between check-in and check-out.
  • Warranty periods — days remaining on a warranty from a purchase date.
  • Legal filings — days from an event to a filing deadline.
  • Visa stay limits — days spent in a country against a permitted maximum.

Worked examples

FromToDays (excl.)Days (incl.)Notes
1 Jan 20241 Jan 20253663672024 is a leap year
1 Jan 20231 Jan 2024365366Standard year
15 Jan15 Feb3132One calendar month
15 Jan15 Mar59 or 6060 or 61Depends on leap year
1 Apr 202430 Apr 20242930Tax-month convention
MonFri (same week)45Includes both endpoints

These are the exact counts the calculator produces. If your contract, tax authority or accounting system uses a different convention, adjust the Include end date toggle accordingly.

Your privacy is protected

Every calculation runs in your browser. No date is sent to any server. Your inputs are stored only in your browser's local storage on your own device so they persist between visits — they never leave your computer or phone.

The only network requests the page makes are for Google Fonts and the AdSense script. After the page loads, the calculator works entirely offline.

What this calculator can't do

Being honest about limits is more useful than pretending they don't exist. This calculator does not:

  • Include public holidays. It counts weekend days based on your configured weekday toggles, but doesn't know about Diwali, Thanksgiving, Christmas or any other public holiday. Subtract those manually from the business-day count if they matter.
  • Handle multiple date ranges. It compares exactly two dates. For a list of ranges, run them one at a time or use a spreadsheet.
  • Work with non-Gregorian calendars. Hindu, Islamic, Chinese and other calendars aren't supported. If you need conversion, use a dedicated calendar converter first.
  • Understand time zones. If Include time of day is on, the calculation treats both times as being in the same zone. Cross-timezone durations aren't adjusted.
  • Calculate recurrence or schedules. It gives a single duration, not a series of dates. For "every second Tuesday for 6 months", use a recurrence tool.
  • Work with ISO week numbers alone. You need actual dates. Week-number-only input isn't supported.

Common questions

How is the difference between two dates calculated?

The difference is counted in calendar terms: full years first, then full months, then remaining days. This matches how age and duration are counted on official documents.

Does it include or exclude the end date?

You choose. Excluding the end date is standard for duration (1 Jan to 31 Jan = 30 days). Including the end date counts both endpoints (1 Jan to 31 Jan = 31 days).

Can it calculate business days?

Yes. Turn on "Calculate business days only" and choose your weekend days. Default is Saturday and Sunday.

How many days are between two dates?

Enter both dates and the calculator shows the total number of days. By default the end date is excluded, so 1 January to 31 January is 30 days. Enable Include end date for 31 days.

Does it count leap years correctly?

Yes. The calculator uses the proleptic Gregorian calendar, so 29 February is counted when the year is a leap year (divisible by 4, except centuries not divisible by 400).

Can I calculate my exact age with it?

Yes. Set the From date to your birth date and the To date to today. The Years, Months, Days result is your exact age. For age-specific formatting, use the dedicated Age Calculator.

What happens if the From date is after the To date?

The calculator still works. It shows the absolute difference and labels the result with the direction you entered. Use the Swap preset to reverse it if you want the calculation to run the other way.

Can I include the time of day in the calculation?

Yes. Enable Include time of day and enter hours and minutes for both dates. Total hours and total minutes are then computed with that precision.

Does it work for historical dates?

Yes. Any date from year 1 to 9999 works. The calculation uses the proleptic Gregorian calendar, which is the standard for historical date arithmetic.

How does it handle months of different lengths?

Calendar months are counted, not 30-day blocks. From 15 January to 15 February is exactly one month, whether or not February has 28 or 29 days.

What is the difference between total months and years, months, days?

Total months is the span expressed entirely in months — 18 months, for example. Years, months, days breaks that same span into its calendar components: 1 year 6 months 0 days.

Is my data saved?

Your inputs are stored only in your browser's local storage on your own device. Nothing is sent to any server.

Does it work offline?

Yes. After the page has loaded once, the calculator works without an internet connection.

Is this calculator free?

Yes. It is completely free, runs entirely in your browser, and requires no signup.