๐ Days Between Dates
Calculate the exact number of days between any two dates.
This days between dates calculator helps you find the exact number of calendar days separating any two dates. Whether you are planning a project timeline, counting down to a special event, or tracking how much time has passed since an important milestone, this tool gives you an instant, accurate result without any manual counting.
Common use cases include calculating the duration of a vacation or trip, measuring the length of a subscription or billing period, determining how many days until a deadline, or simply satisfying your curiosity about the gap between two dates. The calculator handles any valid date range and accounts for month and year boundaries automatically.
For example, if you need to know how many days there are between January 1 and December 31 of the same year, simply enter those dates and the tool will tell you it is 364 days (or 365 in a leap year). No more counting on your fingers or flipping through calendars.
How Does the Calculation Work?
This calculator works entirely in UTC. It appends "T00:00:00Z" to each date you pick, turning both into midnight UTC, then subtracts the two timestamps and takes the absolute value so the order in which you enter the dates never matters. The difference in milliseconds is divided by 86,400,000 (the number of milliseconds in one day) and rounded to the nearest whole day.
Because both dates are pinned to midnight UTC, the result is a pure count of calendar days rather than a measure of elapsed time. A leap day (February 29) counts like any other calendar date, and your device time zone or daylight-saving setting has no influence on the answer.
Practical Examples
A hotel stay that runs from June 10 to June 21 returns 11 days, matching the number of nights you book. A two-week project sprint from Monday, March 4 to Monday, March 18 returns 14 days. And from April 15, 1990 to April 15, 2026 the result is 13,149 days โ 36 years of 365 days each, plus the nine February 29ths that fell within that span.
Edge Cases and Common Pitfalls
The tool counts full days between the two dates and does not include both endpoints: January 1 to January 2 is 1 day, so add 1 whenever you need an inclusive count, such as the number of nights in a stay. It also differs from Excel's DATEDIF or DAYS functions, which sometimes measure elapsed 24-hour periods and can report a value one day lower than a pure calendar count. Because everything is normalized to UTC, a spring-forward or fall-back DST weekend never shifts the result the way local-timestamp math can.
Country and Practical Differences
How a day count is interpreted varies by context and country. In many European jurisdictions, including the Netherlands, a notice period (opzegtermijn) for a rental or employment contract is often expressed in calendar days or months, and whether the start or end day counts can shift a deadline by a full day. Some countries count both endpoints for legal deadlines while others use exclusive counting, so it is always worth confirming which convention applies before acting on a number.
Similarly, a subscription or free-trial period is usually measured from the activation moment and can differ by one day from a pure calendar count depending on whether the provider bills in 24-hour periods or full calendar days. For billing disputes or warranty claims, check whether the day the service started is counted as day one. This tool gives you the plain calendar-day count; knowing which convention your situation uses lets you apply the right adjustment.
Try also:
Frequently Asked Questions
Does the calculator include both the start and end date?
The calculator measures the exact difference between the two dates. It counts the full days between the start date and the end date, so if you select January 1 and January 2, the result is 1 day. If you need to count inclusively (including both the start and end date), simply add 1 to the result.
Can I calculate days between dates across different years?
Yes, the tool works with any two dates regardless of the year. You can calculate the days between March 15, 2023 and July 22, 2025 just as easily as two dates in the same year. The date picker lets you select any date from the past, present, or future.
Does the calculation account for leap years?
Yes, the JavaScript Date object used by this calculator correctly handles leap years. February 29 is recognized in leap years, and the day count between dates spanning a leap year will reflect the extra day. For example, the days between March 1, 2023 and March 1, 2024 is 366 days because 2024 is a leap year.
What is the maximum date range I can calculate?
There is no hardcoded limit on the date range. The tool uses standard JavaScript date handling, which works reliably for dates within a few centuries of the current date. For very distant dates (thousands of years apart), the calculation still runs, but the result may be less meaningful for practical planning purposes.
Does the order in which I enter the dates matter?
No. The calculator takes the absolute difference between the two timestamps, so entering the dates in either order returns the same positive number of days.
Why might my result differ from a spreadsheet?
Excel's DATEDIF and DAYS functions measure elapsed 24-hour periods and can occasionally report a value one day lower than a pure calendar-day count. This tool counts calendar days directly by normalizing both dates to UTC midnight.
How do I convert the day count into weeks or months?
Divide by 7 for a rough week count โ 90 days is about 12.9 weeks. Months range from 28 to 31 days, so they can only be approximated; 90 days is roughly three months for practical purposes.