About This Tool

What this tool does

Days Between Dates counts the exact number of full calendar days between two dates. Pick a start date and an end date, and it returns three things at once: the total day count, the same span written as whole weeks plus leftover days, and the equivalent number of hours. It runs entirely in your browser, with no submit button and no network call.

It is not a business-day calculator and not a date-and-time calculator. It treats each input as a calendar date with no clock time attached, and it counts the gap between them, not an inclusive range.

Who actually needs this

Most people reaching for this tool are doing one of a small number of things:

  • Counting down to a deadline, exam, due date, wedding, trip, or contract expiration.
  • Counting up from a milestone: time since a job started, since a baby was born, since a relationship began, since a project kicked off.
  • Working out how long a hotel stay, lease, subscription, prison sentence, hospital stay, or rental period lasted.
  • Filling in a form that asks for "duration in days" between two events.
  • Sanity-checking a date arithmetic result from a spreadsheet or a piece of code.

If your question is "how many working days," or "how many days including both endpoints," or "what date is 90 days from now," this is the wrong tool. The related links at the bottom of the page point at the right ones.

How to use it

There are two fields, and that is the entire interface.

  • Start Date — your earlier date, picked from your device's native date control. The display format follows your operating system's locale (US users see MM/DD/YYYY, most of the rest of the world sees DD/MM/YYYY), but the underlying value the tool reads is always the standard YYYY-MM-DD.
  • End Date — your later date, picked the same way.

As soon as both fields hold a valid date, the Result card appears with three rows: Total Days, In Weeks (formatted as "X weeks, Y days"), and Total Hours. There is no Calculate button. If you change either date, the answers update instantly.

Order does not matter. The tool uses the absolute difference between the two dates, so swapping start and end gives the same positive number. Entering the same date in both fields gives 0.

How it works under the hood

Each YYYY-MM-DD string is parsed by JavaScript as a calendar date anchored at midnight UTC. The tool then subtracts the two dates to get a difference in milliseconds, takes the absolute value, and divides by 86,400,000 — the number of milliseconds in 24 hours (24 hours x 60 minutes x 60 seconds x 1000 ms). It floors the result to get whole days.

Anchoring both endpoints at midnight UTC has one quiet but important consequence: daylight-saving-time shifts never add or drop an hour. If you were doing this calculation in local time, two dates straddling a DST transition could come out 23 or 25 hours apart in milliseconds, and a naive floor would shave a day off. Working in UTC sidesteps that completely.

Because the math runs against real calendar dates rather than a 30-day "banker's month," leap years and varying month lengths are handled automatically. February 29 in a leap year just exists as another day, and the count includes it without any adjustment on your part.

The other two figures are derived directly from the day count:

  • In Weeks is the day count divided by seven and floored, with the remainder shown as leftover days. A 16-day span shows as "2 weeks, 2 days." A 7-day span shows as "1 weeks, 0 days." (Yes, the label always reads "weeks" — there is no singular form.)
  • Total Hours is the day count multiplied by 24. Because the inputs are dates with no time of day, this number is always a multiple of 24. It is not tracking actual hours and minutes within a day.

A worked example

Say you start a 90-day notice period on 2025-01-15 and want to know the exact end date — or, the other way around, you have a contract running from 2025-01-15 to 2025-04-15 and want to confirm the duration.

Drop those two dates in. The result is:

  • Total Days: 90
  • In Weeks: 12 weeks, 6 days
  • Total Hours: 2160

Note that this is the gap: 90 days have elapsed between Jan 15 and Apr 15. If your contract says "for 90 days starting Jan 15" and you want the last day inclusive, that is a different question — see the pitfalls section below.

Common pitfalls

A handful of misunderstandings come up over and over with day-counting tools. None of them are bugs; they are just things to be aware of.

  • Exclusive vs inclusive counting. June 1 to June 4 returns 3, not 4. The tool counts the gap between the dates, not "how many calendar days from start through end." If you need the inclusive count, add 1.
  • Weekends and holidays are counted. Every calendar day in the range counts equally. There is no filtering for Saturdays, Sundays, public holidays, or company-specific non-working days. For that, use the Work Days Calculator.
  • No time of day. The tool only knows dates. If your real question is "how many hours between 3pm Monday and 9am Wednesday," this answer will be off — it will treat both as midnight UTC and report a clean multiple of 24.
  • Time zones for events. Because both dates are anchored at midnight UTC, the day count is correct as a calendar comparison no matter where you live. It does not account for the case where two events happen on the "same date" in different time zones but at instants more than 24 hours apart.
  • Very old dates. JavaScript's Date handles dates back to the year 1 and beyond, but the Gregorian calendar was only adopted in 1582 (and later in many countries). For historical research before that, the count is mathematically correct against the proleptic Gregorian calendar but may not match historical records that used the Julian calendar.
  • Result card not showing. Until both fields contain a valid date, the Result card stays hidden. If you only fill one in, nothing renders — that is intentional, not a bug.

When this is not the right tool

Reach for something else if you are trying to:

  • Count business days (skipping weekends and holidays). Use the Work Days Calculator.
  • Add or subtract days from a date ("what is the date 45 days from today?"). Use Date Add/Subtract.
  • Measure precise elapsed time down to hours, minutes, or seconds. You want a date-and-time difference tool, not a date-only one.
  • Calculate age in years, months, and days. The day count is correct, but converting it to "X years, Y months, Z days" is not straightforward because months are different lengths; an age calculator handles that conversion properly.
  • Schedule recurring events ("the 15th of every month"). That is a calendar problem, not a subtraction problem.

If the result looks wrong

The most common reasons a result surprises someone:

  • You expected inclusive counting. Add 1 to the displayed total.
  • You expected business days. The Work Days Calculator is the right tool.
  • You typed the dates in the wrong fields and forgot the absolute difference. The number is still correct, just maybe not what you intended to ask.
  • Your locale displays dates differently from what you typed. Open the date picker and confirm the underlying value — the calendar grid shows the actual selected day, regardless of the display format.

If you want to double-check by hand for a short span: count whole months at their actual lengths (28/29/30/31), add the leftover days, and compare. For longer spans, every non-leap year is 365 days and every leap year is 366.

The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.

Frequently Asked Questions

Does the count include both the start and end date, or just the gap between them?
It counts the gap, not an inclusive range. June 1 to June 4 returns 3 days, not 4. If you need the inclusive count — every calendar day from start through end — add 1 to the result.
Does the order of the two dates matter?
No. The tool takes the absolute difference, so you get the same positive number whether the earlier date is in the Start Date or End Date field. Entering the same date in both fields returns 0.
Are leap years and different month lengths handled correctly?
Yes. The calculation works from actual calendar dates rather than a fixed 30-day month, so February 29 in a leap year is counted automatically — you don't have to adjust anything. Every February 29 the range passes over adds one day to the total.
Does it count business days or skip weekends and holidays?
No. It counts every calendar day in the range, including weekends and public holidays. For weekdays only, use the Work Days Calculator linked at the bottom of the page.
Why is Total Hours always a round multiple of 24?
The inputs are calendar dates with no time of day, so the tool multiplies the whole-day count by 24. It doesn't track hours and minutes within a day. If you need precision down to the hour, you'd need a date-and-time difference tool, not this one.
What does the "In Weeks" result mean?
It restates the total day count as whole weeks plus leftover days, shown as "X weeks, Y days." For example, a 16-day span displays as "2 weeks, 2 days," and a 30-day span as "4 weeks, 2 days." A clean 7-day span shows as "1 weeks, 0 days" — the label is always pluralized.
Why don't I see a result yet?
The Result card only appears once both the Start Date and End Date fields contain a valid date. Until then nothing renders. Fill in both and the totals appear instantly with no Calculate button.
Does the time zone I'm in affect the answer?
No. Both dates are read as midnight UTC, so your local time zone and any daylight-saving-time changes during the range don't shift the count. You always get the same day count for the same two calendar dates.
Can I use dates before the year 1900, or very far in the future?
Yes — JavaScript's date handling covers a huge range in both directions, so historical dates and far-future planning both work. One caveat for serious historical work: dates before 1582 (or later, depending on the country) predate Gregorian adoption, so the count is correct against the proleptic Gregorian calendar but may not match records kept in the older Julian calendar.
Is anything sent to a server?
No. The math runs entirely in your browser. The dates you type, and the results, never leave your device.