Date Difference Calculator

Days between two dates, age calculator, or add/subtract days from a date.

{{ opt.label }}
{{ __t('tz_no_results') }}
{{ opt.label }}
{{ __t('tz_no_results') }}
{{ __t('unit_days') }}
{{ __t('unit_weeks') }}
{{ __t('unit_months') }}
{{ __t('unit_hours') }}
{{ __t('unit_minutes') }}
{{ __t('unit_seconds') }}
{{ __t('unit_workdays') }}
{{ __t('unit_holidays') }}
{{ __t('label_holidays_in_range') }}:
 
{{ __t('result_date') }}:

What can you use this for?

  • Age calculation — exact age in years, months and days
  • Deadlines — how many days remain until a target date?
  • Vacation / trip length — days, weeks, working days
  • Pregnancy & due date — weeks since the last menstrual period
  • Anniversaries — how many days have we been together?
  • Time-zone comparison — meeting in Berlin at 14:00 = when in Tokyo?

How is the difference calculated?

The calculator returns the difference as a calendar Y/M/D breakdown (e.g. 2 years, 3 months and 14 days). Months have variable lengths — January is 31, February 28 or 29 — so the Y/M/D view is exact while the total-months figure is averaged.

The Include end date option adds one day — useful for hotel nights or contract periods where both the start and end day count.

Working days

Enable Working days only to exclude weekends (Saturday and Sunday). Public holidays are not subtracted automatically — they vary by state and country. As a rough estimate, ~250 working days per year is a typical baseline.

Select a region (Germany federal/state, Austria, Switzerland) to automatically deduct public holidays from the working-day count. Calculations are algorithmic (Gauss's Easter formula for movable feasts) — fully offline in your browser. All affected holidays in the range are listed as badges.

Time-of-day and time zones

Enable Use time to include hours, minutes and seconds. With time zones you can compare e.g. Berlin 14:00 with New York 09:00 — daylight saving transitions are handled correctly. The list includes over 150 major cities mapped to IANA zones, or type an IANA zone (e.g. Europe/Berlin) directly.

What "days between two dates" really means

An ISO 8601 date (YYYY-MM-DD) is a pure calendar value without time-of-day — a "day" has no unique second count and simply refers to a 24-hour block in some time zone. As soon as you include clock times and zones, the difference is computed from the corresponding UTC timestamps: each local moment is first converted to its UTC representation, then milliseconds are subtracted. The IANA time-zone database (also called "tzdata", maintained since 1986) provides the historically correct UTC offset for each region — including every DST transition of the past decades.

Calendar operations like "plus 1 month" are tricky. Months have 28 to 31 days; 2026-01-31 + 1 month can be 2026-02-28 (or 2026-02-29 in a leap year) depending on the convention — some libraries clamp the overflowing day, others roll over. This calculator uses the JavaScript standard semantics (Date.setMonth) which rolls over: 2026-01-31 + 1 month → 2026-03-03. Keep this in mind for rental contracts, probation-period ends, or contract renewals. EU consumer law defines withdrawal periods in business days (Art. 9 of Directive 2011/83/EU); the "day" count here is purely calendar-based.

Workdays and public holidays depend on the country and, in Germany, on the federal state. This calculator covers the regular holidays for Germany (all 16 states), Austria and Switzerland; movable feasts such as Good Friday and Easter Monday are derived from Gauss's Easter formula for the given year. Shift systems, collective agreements, and individual employment contracts may deviate — for German construction contracts, for instance, VOB/B §1(1) defines workdays as Monday through Saturday, while government offices typically mean Mon–Fri.

Formula and conversion

The simplest form: days = floor((utc2 - utc1) / 86,400,000), where both timestamps are UTC milliseconds. A week is 7 days = 604,800 seconds, a common year 365 days = 31,536,000 seconds, a leap year 366 days = 31,622,400 seconds. The Y/M/D breakdown ("3 years 4 months 2 days") is computed on the calendar by subtracting years, then months, then days, borrowing from the previous month when the day remainder is negative. Note: 3 years 4 months is between 1,217 and 1,218 days depending on the start year — months are not a fixed number of seconds. With include end, one day = 86,400 seconds is added to the day total.

Concrete examples

Here are real date pairs and their results:

  • From 2024-01-15 to 2026-03-20 is exactly 795 days, equivalent to 2 years 2 months 5 days or about 113.57 weeks.
  • Born 1990-04-12 on reference date 2026-06-09: 36 years 1 month 28 days old = 13,207 days.
  • Rental contract from 2026-06-01 to 2027-05-31 (incl.): 365 days, of which roughly 261 workdays in Germany after deducting weekends and 9 national holidays.
  • Pregnancy week 40 equals 280 days from the last menstrual period. LMP 2026-01-04 → due date 2026-10-11.
  • Flight Frankfurt 2026-07-10 11:35Tokyo 2026-07-11 06:50: 11 h 15 min gross travel time (Tokyo is 7 h ahead of Berlin in summer).

Limits and pitfalls

Three things regularly cause "wrong" results: first, DST transitions — on the last Sunday of March/October a local day is 23 or 25 hours long. Second, leap seconds — 27 have been inserted since 1972, the most recent on 2016-12-31; they skew pure second differences over long periods by a few dozen seconds. Third, the choice of whether the end date is included: rental contracts, vacation days, and notice periods often have statutory rules (German BGB §§ 187 and 188 distinguish "the day the event falls" vs. "the day after"). Also note ISO 8601 calendar weeks (week 1 contains the first Thursday, running Mon–Sun) versus the US convention (week 1 contains January 1). Finally, this calculator assumes the Gregorian calendar — for dates before its adoption (1582 in Catholic countries, 1700 in Protestant ones, 1923 in Russia) a separate Julian-to-Gregorian conversion is required.

Frequently asked questions

Is the end date counted?
By default no — the difference from Monday to Wednesday is 2 days. With "include end date" enabled it becomes 3 days, which is usually correct for vacation days or rental periods.
How are leap years handled?
Automatically. February 2024 counts as 29 days, February 2025 as 28. So "1 year" can equal 365 or 366 days depending on the start date.
Why does my workday total disagree with my HR department?
Likely your collective agreement uses a different workday definition (e.g. including Saturday) or HR works with a flat 30-day month. Pick the matching federal state in the holiday filter and compare the listed holidays.
What happens when DST falls in the middle of the range?
With time + zone enabled, timestamps are converted directly to UTC — the DST jump is therefore captured correctly. An exact-one-week interval can be 167 or 169 hours depending on the transition.
Which holidays are supported?
Germany including all 16 federal states, Austria and Switzerland at the national level. Movable feasts (Good Friday, Easter Monday, Ascension, Whit Monday, Corpus Christi) are computed from Gauss's Easter formula for the year.
Can I share the result as a link?
Yes — start, end, time, and region are stored in the URL. Just copy the address bar; the recipient sees the exact same calculation.

Related tools