Days Between Dates
Calculate the exact number of days between any two dates
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
Datehandles 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.