glunty

Date Difference Calculator (Days Between Dates)

Total days, weeks, hours, business days, and a years, months, and days breakdown between two dates. Local math.

What this tool does

Measures the gap between two calendar dates. It reports the total number of days, the same span expressed as weeks plus leftover days, the total hours, and a calendar-correct breakdown in years, months, and days. It also counts business days by excluding Saturdays and Sundays. Dates are parsed at UTC midnight and compared by their year, month, and day components, so daylight saving time never causes an off-by-one error. Calculation is local; nothing you enter is uploaded.

How to use it

Pick a start date and an end date, then press Calculate difference. The result updates automatically when you change either field. If you enter the end date before the start date, the tool shows the absolute difference and notes the order, so you can type the dates in whichever order you have them. Example: from 2020-01-01 to 2020-12-31 is 365 days, because 2020 is a leap year and January 1 to December 31 spans 365 day boundaries.

Common use cases

  • Counting the days remaining until a deadline, birthday, or launch.
  • Working out how old something is in years, months, and days.
  • Measuring a contract term or subscription period in exact days.
  • Counting business days between two dates for billing or SLA windows.
  • Converting a date range into weeks or hours for planning.

Common pitfalls

  • Business days ignore holidays. The count excludes weekends only. Public holidays vary by country, so they are left in. For US federal holidays, use the project deadline calculator.
  • Months are not all 30 days. The years, months, and days breakdown follows the real calendar, so it will not match total days divided by 30. A leap day inside the span adds one extra total day.
  • Endpoint counting is a convention. Total days is the count of day boundaries from start to end, so the same date entered twice is zero days, not one. Add or subtract one if your context counts both endpoints.

Frequently asked questions

How do you calculate the difference between two dates?
The tool parses both dates at UTC midnight and subtracts them, so the total days figure is exact and never off by one because of daylight saving time. It then derives weeks, hours, and a calendar-correct years, months, and days breakdown from the same two dates.
How many days are between two dates?
Total days is the plain count of calendar days from the start date to the end date. For example, 2023-01-01 to 2023-02-01 is 31 days, and 2020-01-01 to 2020-12-31 is 365 days because 2020 is a leap year and January 1 to December 31 spans 365 day boundaries.
Why is the years, months, and days breakdown different from total days divided by 30?
Months have different lengths (28 to 31 days) and years can be 365 or 366 days, so a fixed 30-day month is only an approximation. The breakdown here walks the calendar month by month with a borrow step, so a span such as one month and two days is exact rather than rounded.
How are business days counted?
Business days count only Monday through Friday in the span, excluding Saturdays and Sundays. Public holidays are not removed, since holiday lists differ by country and region. If you need working days minus US federal holidays, use the project deadline calculator instead.
What happens if the end date is before the start date?
The tool shows the absolute difference and adds a note that the end date comes before the start date. The numbers are the same size either way; only the direction changes, so you can enter the dates in whichever order you have them.
Does the calculation run on a server?
No. Everything runs in your browser with local date arithmetic. Nothing you type is uploaded, so you can use it offline and on private dates without any data leaving your machine.
Does the tool handle leap years correctly?
Yes. Because it counts real calendar day boundaries rather than assuming 365-day years, leap days such as February 29 are included when they fall inside the span. A range crossing February 29 shows one extra total day compared with the same range in a non-leap year.

Embed this tool

Free for any use; attribution appreciated. Paste this on your site:

The embed runs the same tool that lives at this URL. No tracking; no ads inside the embed. Resize height as needed for your layout.

Cite this tool

For academic, journalistic, or technical references. Pick a format:

Citations use 2026 as the publication year. Access date is left as a fillable placeholder where the citation style expects one.

Embedded tool from glunty.com