Skip to content
CalculatorsRuns in your browser

Date Difference Calculator

Find the exact gap between two dates in days, weeks, months and years.

Input
No upload needed — instant
Privacy
Nothing is uploaded
Cost
Free · no sign-up · no watermark

Loading tool…

The tool is loading its code on your device. This happens once and is cached for later visits.

Processed entirely on your device

Everything you type or paste is handled by JavaScript running in this tab. No request is sent, nothing is logged and nothing is stored. Close the page and it is gone.

Overview

About the Date Difference Calculator

Calculate the number of days between two dates free. Get calendar days, business days, weeks, months and years, with holiday and weekend exclusions.

Counting days between dates is arithmetic that humans do badly and computers do inconsistently. The difficulty is not the subtraction — it is deciding what you are subtracting, and every answer is defensible until you state your assumptions.

The three counting conventions

Exclusive elapsed days. The plain difference. 1 January to 5 January is 4. This is what a timestamp subtraction gives you and what "how long has it been" means.

Inclusive calendar days. Both endpoints counted. 1 January to 5 January is 5. This is what hotel nights plus one, event durations and "days remaining including today" mean.

Business days. Weekends and holidays removed. 1 January to 5 January 2026 spans 3 business days if 1 January is a holiday. This is what notice periods, delivery windows and project plans run on.

Choosing the wrong one is a one-day error, which is small enough to go unnoticed and large enough to miss a deadline.

Why calendar arithmetic beats timestamp arithmetic

Subtracting two JavaScript Date objects gives milliseconds. Dividing by 86,400,000 gives days — and is wrong twice a year in any timezone that observes daylight saving, because those days are 23 or 25 hours long.

The robust approach operates on the year, month and day fields directly, using Date.UTC() to build a fixed-offset representation of each calendar date. That removes both the timezone shift and the DST problem, at the cost of no longer knowing anything about time of day — which for a date difference is exactly right.

Months and years are not fixed durations

A "month" between two dates is ambiguous: 31 days in some pairs, 28 in others. This tool reports whole calendar months plus a remainder in days, using the same borrowing logic as an age calculation. 15 January to 10 March is 1 month and 23 days, not 1.77 months.

If you need a decimal month count — for financial interest or amortisation — you must pick a day-count convention first. Actual/365, Actual/360 and 30/360 all produce different numbers for the same pair of dates, and contracts specify which one applies precisely because the difference is money.

Common uses

  • Project planning. Business days between milestones, accounting for public holidays.
  • Notice periods. Contractual notice is almost always stated in working days.
  • Subscriptions and renewals. Days until the next billing date.
  • Pregnancy and medical intervals. Typically counted in weeks plus days.
  • Historical research. Elapsed time between two documented events.
  • Deadlines. Working backwards from a due date to a start date.

A note on holidays

There is no universal holiday list. Statutory holidays vary by country, by state or province within a country, and by industry. The tool lets you add specific dates rather than guessing a jurisdiction, which is the honest approach — the calculation is only as good as the holiday list you supply.

Step by step

How to use the Date Difference Calculator

  1. Enter a start date and an end date in either order.

  2. Choose whether to count calendar days or business days only.

  3. Optionally add holidays to exclude and decide whether the end date is inclusive.

  4. Read the result in days, weeks, months, years and total hours.

  5. Copy any figure, or use the breakdown to plan a schedule.

Why use it

Benefits and common use cases

What this tool is good for, and what it deliberately does not try to do.

Business days, not just calendar days

Excludes weekends and any holidays you add, which is what project timelines, notice periods and delivery estimates actually run on.

Inclusive or exclusive counting

The difference between 1 Jan and 5 Jan is four days or five depending on whether both endpoints count. The toggle makes the choice explicit instead of ambiguous.

Every unit at once

Days, weeks, months, years, hours and minutes from one pair of dates — no need to convert afterwards or guess which unit the question wanted.

Handles direction

Enter the dates in either order and get a correct positive interval plus a clear statement of which date comes first.

Questions

Frequently asked questions

Short, honest answers about quality, limits and privacy.

Is the difference between 1 January and 5 January four days or five?

Four days elapsed, five calendar days inclusive. Both answers are correct for different questions. Elapsed time uses exclusive counting; 'how many days are you staying' uses inclusive. The toggle exists because the ambiguity causes real scheduling errors.

How are business days calculated?

By excluding Saturdays and Sundays, plus any specific holidays you add. The count is not adjusted for local working conventions — in many countries Friday and Saturday are the weekend, and some jurisdictions have additional statutory rest days.

Why does the month count not equal days ÷ 30?

Because months differ in length. The tool reports whole calendar months plus remaining days, computed the same way age is: 15 January to 10 March is one month and 23 days, not 1.8 months.

Does it handle leap years and daylight saving?

Leap years are handled by real calendar arithmetic — 28 February to 1 March is two days in a leap year and one in a common year. Daylight saving is avoided entirely by computing on calendar dates rather than timestamps, so a 23-hour or 25-hour day still counts as one day.

Can I add days to a date instead of subtracting?

The interval mode measures between two dates. To find a date a given number of days from now — a deadline, a renewal, a due date — add the interval to your start date; the business-day count tells you how many working days that spans.