Date Difference Calculator — Calculate Days, Weeks, Months & Years Between Two Dates

Two tools in one: add or subtract days from a starting date to jump to a future/past date, or measure the exact time between two dates.

Enter both dates to calculate.

📚 Official sources

Use the Date Calculator to figure out when a deadline lands, when a contract ends, or what date is 90 days from today. Use the Date Difference Calculator to count how long between any two dates — in years, months, weeks, business days, hours and minutes. Both tools use the Gregorian calendar with ISO 8601 dates, so leap years and month-length differences are handled correctly.

💡 Also explore: Unit Converter · Final Grade Calculator · Age Calculator

How to use it
  1. 📆 Date Calculator tab — pick a starting date (defaults to today) and enter a number of days to add. Negative numbers subtract. The result date appears instantly with its day of the week.
  2. 📏 Date Difference tab — pick a start and end date, and read the calendar breakdown (years/months/days) plus totals in days, weeks, business days, hours, minutes.
  3. Both modes handle leap years automatically and are timezone-independent.
How is the date difference calculated?

Date arithmetic is dominated by the Gregorian calendar, which Pope Gregory XIII introduced through the bull Inter gravissimas in 1582 to correct the drift accumulated under the Julian calendar. The reform skipped ten days (Thursday 4 October 1582 was followed by Friday 15 October 1582 in Catholic Europe) and revised the leap-year rule to keep the calendar year aligned with the tropical year. Different countries adopted the reform at different times — Britain and its colonies waited until 1752, Russia until 1918, Greece until 1923 — so for any historical research before 1923 you may have to pick which of the two calendars to count in. The calculator uses the proleptic Gregorian calendar, which extrapolates today's rule backwards in time even before 1582; this is the convention used by ISO 8601 and almost all modern programming languages, including JavaScript, Python and SQL.

The leap-year rule is precise: a year is a leap year if it is divisible by 4, except for century years, which must additionally be divisible by 400. So 1900 was not a leap year, but 2000 was; 2100, 2200 and 2300 will not be, but 2400 will. This rule produces an average year length of 365.2425 days, only about 27 seconds longer than the actual mean tropical year of roughly 365.2422 days — accurate enough that the next correction is not expected for several thousand years. The calculator applies the rule mechanically when computing the day count of any span that crosses 29 February.

Under the hood, the most reliable way to compute the difference between two dates is to convert each date to its Julian Day Number (JDN), an integer counting elapsed days since 1 January 4713 BC in the proleptic Julian calendar — and subtract. The Fliegel–Van Flandern formula (Communications of the ACM, 1968) gives JDN directly from the Y/M/D triple in a closed form using only integer arithmetic and integer division, avoiding any floating-point error. Once both endpoints are JDNs, the difference in days is simply JDN_end − JDN_start. From there the converter expresses the same span in weeks (÷ 7), hours (× 24), minutes (× 1440) and seconds (× 86400). For 'business days' the calculator iterates over each date in the span and counts only Monday–Friday (weekday derivation uses Sakamoto's algorithm or, equivalently, Zeller's congruence). Public-holiday handling is intentionally not country-specific because public-holiday calendars change every year and differ even between regions of the same country (e.g. German Länder, Swiss cantons, Spanish autonomous communities); the calculator therefore reports raw weekday-based working days and lets the user subtract national or regional holidays manually.

The calendar breakdown into years/months/days is more subtle than total-day counting because months have variable length (28, 29, 30 or 31 days). The standard procedure is: take Y_end − Y_start as the year delta, then M_end − M_start as the month delta, then D_end − D_start as the day delta; if D_delta is negative, borrow one month from M_delta and add the number of days in the previous month; if M_delta is then negative, borrow one year from Y_delta and add 12 months. This is exactly how every official 'years/months/days' breakdown works, including German Lebensjahre/Monate/Tage, Romanian ani/luni/zile and the US 'age in years, months, days' standard used on legal forms. Note that 'one month' is therefore not a fixed length: from 31 January to 28 February is 'one month' (and also 28 days), while from 31 January to 1 March is 'one month and one day' (and 29 or 30 days depending on the year). Both views — calendar breakdown and absolute day count — are correct simultaneously because they answer different questions.

Date format is a frequent source of error in cross-border use. ISO 8601, the international standard published in 1988 and revised in 2019, prescribes YYYY-MM-DD with a four-digit year and zero-padded month and day; this representation sorts correctly as a string and is unambiguous globally. The American convention MM/DD/YYYY and the European DD/MM/YYYY look identical for dates such as 03/04/2025 (which can mean either 3 April or 4 March), so any contract, lease or international shipment is best dated in ISO 8601 to avoid disputes. The calculator outputs ISO format by default and accepts ISO input on every locale.

Leap seconds, the additional second occasionally inserted into UTC by the International Earth Rotation and Reference Systems Service (IERS) to keep clock time aligned with Earth's rotation, are intentionally ignored in date-difference calculations: civil dates do not include them, and counting them would misalign with how legal deadlines, contracts, ages and government records are computed. This is also the convention of every major operating system clock when handling civil time. For everyday and legal use this calculator's output therefore matches official documents to the second.

💡 Worked example

Date Difference: Start 2024-01-01 · End 2025-06-15 → Calendar duration: 1 year, 5 months, 14 days → Total: 531 days · Business days (Mon–Fri): ~379 Date Math: Start 2025-03-01 + 45 days = 2025-04-15

Frequently Asked Questions

How are business days counted?

We count Monday through Friday in the interval (both endpoints included). Public holidays are not excluded — holiday calendars differ by country, so a generic site can't apply them reliably. If you need a country-specific workday count, subtract the holidays manually.

Are leap years handled?

Yes. The calculator applies the Gregorian calendar rules (every 4 years except centuries not divisible by 400). A one-year span that crosses Feb 29 is correctly counted as 366 days.

Why might the years + months + days total look 'off' vs. total days?

Calendar months have 28–31 days. Going from, say, Feb 15 to Mar 15 is 'one month', but also 28 or 29 days depending on the year. Both views are correct — they just measure different things.

Does time zone affect the result?

No. Dates are treated as local calendar dates (midnight anchor), so neither your system's time zone nor daylight-saving transitions change the count.

Is the end date included or excluded in the count?

The calculator uses inclusive counting — both start and end are part of the span. Example: Jan 1 to Jan 2 = 2 days. For exclusive counting (common in contracts and project scheduling), subtract 1. Always double-check how your specific contract or lease defines the span; different industries use different conventions.

How is this different from the Age Calculator?

This tool measures any span between two arbitrary dates and expresses it in years/months/days, total days, weeks, or working days. The Age Calculator specifically measures from a birth date to a target date and adds age-specific context (next birthday, zodiac, generation). Use this for deadlines, anniversaries, leases, contracts; Age Calculator for birthday-centric output.

How do I count working days excluding my country's holidays?

This tool subtracts weekends but doesn't know your country's public holidays. Workaround: calculate working days here, then manually subtract the number of public holidays in the span. For countries with many regional holidays (Germany, Switzerland), consult your national labor portal for the authoritative count.

Does this support dates before 1582 or BC?

The calculator uses the proleptic Gregorian calendar — dates before the 1582 Gregorian reform are extrapolated backward using today's rules. Historical documents used the Julian calendar before 1582 (and some countries until the 1920s), so for genealogy or historical research, results may be off by up to 13 days vs. primary sources.

Why do pregnancy due-date calculators show 'weeks' instead of months?

Gestation uses weeks because pregnancy milestones (embryonic stages, viability thresholds, prenatal screening windows) are weekly. Our date tool gives you weeks and days; for obstetric-specific 'weeks + days' output (e.g. '24w 3d'), divide total days by 7 and keep the remainder.

What's the difference between 'calendar months' and '30-day months'?

Calendar months have 28–31 days; financial contracts often use a 30-day fixed month for interest calculations (30/360 convention). The calculator shows calendar months (real-world time elapsed). For financial or legal date math using 30/360, multiply elapsed months by 30 rather than using total days.