Date Difference Calculator

Get the exact difference between two dates, or add/subtract days from a date, with correct handling of leap years, month lengths, and DST.

Estimates only, not professional advice. This calculator is provided for general informational purposes and uses standard, documented formulas (shown in the sections below). It doesn't account for every factor a lender, employer, physician, or other professional would consider for your specific situation — verify important decisions with a qualified professional before relying on these numbers.

Pick a start and end date to see the difference broken down into days, weeks, months, and years, with an optional business-days-only count. Switch modes to instead add or subtract a number of days from a single date — useful for deadlines, due dates, and countdowns.

How it works

  1. Choose a mode

    The "Difference between two dates" mode compares a start and end date; "Add/subtract days" takes one date and a number of days to shift by.

  2. Enter your dates

    Pick dates using the date pickers, or type them directly. Results recalculate immediately as you change either value.

  3. Read the breakdown

    See the total difference in days, and also broken into weeks, calendar months, and years, plus an optional count of business days (Monday-Friday) only.

  4. Share or bookmark the result

    The calculation is encoded in the page's URL as query parameters, so copying the address bar link preserves your exact inputs for sharing or revisiting later.

Why date math is trickier than it looks

Subtracting two dates seems like simple arithmetic, but calendars aren’t uniform: months range from 28 to 31 days, leap years insert an extra day roughly every four years (with exceptions — a year divisible by 100 isn’t a leap year unless it’s also divisible by 400, which is why 2000 was a leap year but 1900 wasn’t), and daylight saving time transitions mean some days genuinely have 23 or 25 hours rather than 24 in the timezone where the clocks change. Any date calculator that works by converting dates to timestamps and dividing by a fixed number of milliseconds-per-day will silently produce wrong answers across a DST transition, because the elapsed milliseconds between two calendar dates aren’t a fixed multiple of 24 hours when a clock change falls in between. This calculator works directly with calendar date components (year, month, day) rather than raw timestamps specifically to avoid that class of bug.

Inclusive vs. exclusive counting, and why it matters

“How many days between January 1 and January 3?” has two defensible answers depending on what you’re actually asking. As elapsed time (how much time has passed), the answer is 2 days — you go from the 1st to the 3rd by advancing 2 days. As an inclusive count (how many calendar days does this span touch), the answer is 3 — the 1st, 2nd, and 3rd. Both conventions are used in the real world: “a 3-day event from the 1st to the 3rd” uses inclusive counting, while “how many days until my flight” uses elapsed time. This calculator defaults to elapsed time, matching the most common interpretation of “date difference,” and labels the result clearly so there’s no ambiguity about which convention produced the number you’re looking at.

How month and year differences are calculated

Because months vary in length, “the number of months between two dates” can’t be computed by simple division. This calculator instead counts complete calendar-month boundary crossings: starting from the start date, it checks whether advancing one full calendar month (same day-of-month, next month) would still be at or before the end date, and repeats. This is the same logic used to calculate a person’s age in years — you don’t turn a year older at 365-day intervals, you turn a year older on your birthday’s calendar date regardless of whether the intervening year had a leap day. The same logic extended to months means, for example, that January 31 to February 28 in a non-leap year counts as a full month (since February doesn’t have a 31st, the month is considered to complete at its last valid day), which matches how most people intuitively think about “a month later” when the starting day-of-month doesn’t exist in the following month.

Business days: a simple, deliberately unambiguous definition

Business-day counting in this calculator means Monday through Friday, full stop — it does not attempt to exclude public holidays, because holiday calendars differ by country, region, and even individual company policy, and silently guessing wrong would be worse than being explicit about the definition used. If you need holiday-aware business-day counting for a specific jurisdiction, treat this calculator’s business-day count as the weekday baseline and manually subtract any holidays that fall within your date range.

The “add or subtract days” mode

Switching to add/subtract mode answers a different, equally common question: “what date is 45 days from now?” or “what date was it 90 days before this deadline?” This is calculated by advancing (or reversing) the given date by exactly that many calendar days — again operating on calendar date components rather than raw timestamps, so a calculation that crosses a DST transition or a leap year still lands on the correct calendar date rather than being off by an hour or a day. This mode is commonly used for calculating due dates from an invoice date, return-policy deadlines from a purchase date, or a follow-up date from today.

Sharing a calculation via URL

Every input to this calculator is reflected in the page’s URL as query parameters, so copying the link from your address bar after entering your dates preserves the exact calculation — useful for sharing a specific date-difference result with someone else, or bookmarking a recurring calculation (like a fixed deadline countdown) to revisit without re-entering the dates each time.

Frequently asked questions

Why do different date calculators sometimes give different answers for the same two dates?

The most common cause is whether the calculation counts both the start and end date as whole days ("inclusive") or treats the difference as pure elapsed time ("exclusive"). January 1 to January 3 is 2 days elapsed but 3 days if you count both endpoints. This calculator shows elapsed time by default (matching how "days until" and "days since" are conventionally meant) and clearly labels which convention is in use.

How are months and years calculated, since months have different lengths?

The calculator counts a full calendar month as having elapsed once the day-of-month of the end date reaches or passes the day-of-month of the start date — for example, March 15 to April 15 is exactly 1 month, while March 15 to April 10 is not quite a full month. This matches how age and anniversaries are conventionally counted, rather than assuming every month is a fixed 30 days, which would give inaccurate results across months of different lengths.

Does this handle leap years correctly?

Yes — the underlying date math operates on actual calendar dates rather than a fixed 365-day assumption, so February 29 in a leap year is counted correctly, and a date range spanning a leap year's extra day reflects that day in the total.

What counts as a "business day" in the business-days mode?

Monday through Friday, inclusive of both the start and end date if they fall on weekdays. This mode doesn't account for public holidays, since those vary by country and region — it's a pure weekday count, which is the most common baseline definition used for deadline and delivery-estimate calculations.

Does the calculator account for time zones and daylight saving time?

Yes — date differences are calculated using calendar dates directly rather than converting to a fixed timezone and counting elapsed milliseconds, which avoids a common bug where a daylight-saving-time transition (a 23-hour or 25-hour day) causes an off-by-one error in the day count. Adding or subtracting days likewise moves by calendar days, not by a fixed number of hours, so it lands on the correct calendar date even across a DST change.

Can I calculate a date far in the past or future?

Yes, there's no practical range limit — the calculator works the same way for historical dates and dates decades into the future.