Date Difference

The exact gap between two dates in years, months and days — plus the total in weeks, days, hours and minutes, and a date-adder that counts forwards or backwards.

Instant answers Works offline once loaded Nothing you type is sent anywhere Exact calendar breakdown Add or subtract a duration Optional times of day

Two dates

Include times of day
Hotels count nights; holiday entitlement counts days

Time between

Total days
Total weeks
Total months
Total hours
Total minutes
Total seconds
Weekdays
Weekend days
Full weekends

About each date

FromTo

Add or subtract from a date

Resulting date

Milestones from the start date

MilestoneFalls onDayStatus

The month the range ends in

Instructions

How to use this calculator

Step by step

  1. Pick a start date and an end date. The big numbers show the gap the way people actually say it — years, months and days — and the line underneath gives the same gap as a plain total.
  2. Choose the counting style. Exclusive counting gives the nights between two dates, which is what hotels and rentals charge for. Inclusive counting includes both end days, which is how holiday entitlement and jury service are usually counted.
  3. Open "include times of day" if you need the answer to the hour. The totals in hours, minutes and seconds then reflect the exact times rather than midnight to midnight.
  4. The facts grid gives the same span in every unit at once, along with how many of those days are weekdays and how many are weekend days.
  5. The about-each-date table covers the questions that usually come next: day of the week, day of the year, ISO week number, quarter, and whether it is a leap year.
  6. Use the date adder to go the other way — start from a date and count forwards or backwards by years, months, weeks and days. Press "use as the To date" to feed the answer back into the comparison above.
  7. The milestone table counts 100, 500, 1,000 and 10,000 days from the earlier date, along with the round-number anniversaries, and tells you whether each has already passed.

Good to know

  • The difference between inclusive and exclusive counting is always exactly one day, and it is the single most common source of off-by-one errors in date arithmetic. Decide which one your situation needs before trusting any number.
  • Adding months is not the same as adding thirty days. One month after 31 January is 28 or 29 February, and this calculator uses that convention — the day is pulled back to the end of the month when the target month is shorter.
  • A year is 365.2425 days on the Gregorian calendar, which is why "a year and a day" is not a fixed number of days. The calendar breakdown here counts real calendar years, not averages.
  • ISO week numbers are not the same as "the nth week of the year". Week 1 is the week containing the first Thursday of January, so early January can belong to week 52 or 53 of the previous year.
  • All the arithmetic here uses UTC internally, so a range that crosses a daylight-saving change still counts whole days correctly. If you include times of day, remember they are treated as clock times without a timezone.
  • For anything to do with working days, holidays or notice periods, use the business days calculator instead — this page counts every calendar day.

The maths behind it

  • Total days (end − start) / 86,400,000 ms Computed on UTC midnights so daylight saving cannot shift the count.
  • Inclusive count days = exclusive + 1 Counting both the first and last day.
  • Calendar breakdown borrow days from the previous month, then months from the year Walks the calendar rather than dividing by an average month.
  • Leap year divisible by 4, except centuries not divisible by 400 2000 was a leap year; 1900 and 2100 are not.
  • ISO week number floor((Thursday of this week − 1 Jan) / 7 days) + 1 Week 1 always contains the first Thursday of the year.
  • Average month 365.2425 / 12 = 30.436875 days Used only for the approximate "average months" figure.
Why do I get a different answer from another date calculator?
Almost always because of inclusive versus exclusive counting. Booking a room from the 3rd to the 7th is four nights but five days. This page lets you choose, and states which one it used in the summary line.
What is one month after 31 January?
By the convention used here and by most legal and financial systems, it is 28 February — or 29 February in a leap year. The day of the month is clamped to the end of the shorter month, and the calculator tells you when that clamping has happened.
Why are years, months and days not interchangeable?
Because months vary from 28 to 31 days and years from 365 to 366. "Two months" starting on 1 January is 59 days; starting on 1 July it is 62. The breakdown at the top counts real calendar units, which is why it cannot simply be derived from the total day count.
Does this handle dates before 1970, or far in the future?
Yes. The arithmetic works across the whole range your browser supports, which is roughly 271,000 years either side of 1970. Bear in mind that the Gregorian calendar was only adopted between 1582 and 1923 depending on the country, so dates before then are proleptic — mathematically consistent but not what was written down at the time.
How are weekdays and weekend days counted?
Saturday and Sunday are treated as the weekend, and the count follows your chosen inclusive or exclusive style. Public holidays are not considered here — the business days calculator handles those.
What is a "full weekend"?
A Saturday and its following Sunday both falling inside the range. It is simply the weekend-day count divided by two and rounded down, which is the number people usually mean when planning trips.