Days Between Two Dates
Pick two dates to calculate the difference in days. Great for planning trips, tracking deadlines, and measuring project timelines.
Order doesn't matter — dates are sorted automatically
Select two dates and click Calculate
What this calculator does
When you need to know exactly how many days separate two dates, this tool gives you the answer in seconds. Whether you're planning a vacation, tracking a deadline, or measuring how long a project took, you pick a start date and an end date, then the calculator shows you the precise day count.
The main result is the exclusive day count, which ignores the first and last days and counts only the full 24-hour periods in between. This is what most people need when they ask "how many days between these dates?" For example, from January 1 to January 4 gives you 3 days, because there are three complete days sitting between those endpoints.
The details panel also shows the inclusive count, which adds both the start and end dates to the total. This is useful when you need to count every calendar day in a range, like calculating how many days a conference runs if it starts Monday and ends Wednesday (that's 3 inclusive days: Monday, Tuesday, Wednesday).
Everything runs locally in your browser. No data is sent to a server for the calculation itself, which keeps the experience fast and private. The tool also normalizes both dates to UTC midnight before doing the math, so daylight saving time shifts and device clock differences won't skew your results.
Why exclusive and inclusive counts matter
Different scenarios call for different counting methods:
- Travel nights: If you check into a hotel on Friday and check out on Monday, you're paying for 3 nights (Friday night, Saturday night, Sunday night). The exclusive count gives you this number directly.
- Project deadlines: When a task starts on the 5th and is due on the 10th, you have 5 full working days in between (the 6th, 7th, 8th, 9th, and 10th). The exclusive count shows this gap.
- Event duration: A three-day conference that starts Monday and ends Wednesday spans 3 calendar days total. The inclusive count covers this.
- Age gaps: If you want to know how many days separate two birthdays, the exclusive count shows the pure distance between them.
The tool shows both numbers side by side, so you can use whichever makes sense for your situation.
How the calculation works
Behind the scenes, the calculator converts each date you pick into a UTC timestamp at midnight. This removes any confusion from time zones or the time of day you're using the tool. It then subtracts the earlier timestamp from the later one and divides by the number of milliseconds in a day (86,400,000) to get the day count.
Because the math uses actual calendar dates, leap years are handled automatically. If your date range includes February 29, that extra day is counted. The weeks, months, and years shown in the details use standard averages: 7 days per week, 30.44 days per month, and 365.25 days per year.
Common use cases
- Planning travel itineraries and calculating trip length
- Tracking how many days until a deadline or how many days a project took
- Comparing age differences or anniversary gaps
- Measuring contract periods, rental agreements, or subscription lengths
- Estimating time between medical appointments or important events
- Calculating leave days or vacation time
How This Days Between Dates Calculator Works
Calculating the number of days between two dates sounds simple, but the math behind it involves more than basic subtraction. This calculator converts both of your chosen dates into standardized UTC timestamps set to midnight, then measures the gap in milliseconds and divides by 86,400,000 (the number of milliseconds in a single 24-hour day). The result is a clean, whole-number day count that is immune to time-zone offsets and device clock variations. Historically, date arithmetic relied on Julian Day Numbers, a continuous count of days since January 1, 4713 BC. Modern JavaScript Date objects use a similar concept internally, storing time as milliseconds since January 1, 1970 UTC (the Unix epoch). By normalizing both inputs to UTC midnight before computing the difference, this tool avoids the subtle one-hour discrepancies that daylight saving time transitions can introduce.
Why accurate day counting matters
Getting the exact number of days right is critical in many areas of daily and professional life. Project managers rely on precise day counts to set milestones, track sprint durations, and measure velocity. In legal contexts, statutes of limitations, notice periods, and contract durations are defined in calendar days, and a single-day miscalculation can have real consequences. Pregnancy tracking counts days from the last menstrual period to estimate due dates, where precision is medically important. Rental agreements, lease terms, and interest calculations on loans all hinge on the exact number of days elapsed. Even in personal life, knowing the gap between two events helps you budget time, plan study schedules, and coordinate travel itineraries without guesswork.
Handling edge cases
Date calculations have several well-known edge cases that trip up manual counting. Leap years add an extra day to February every four years (with century exceptions), meaning a span that crosses February 28 in a leap year has one more day than the same span in a common year. Month boundaries vary from 28 to 31 days, so "one month later" does not always mean the same number of days. This calculator handles all of this automatically because it works with actual calendar dates rather than month-length assumptions. If you enter the same date for both fields, the exclusive count correctly returns zero, confirming that there are no full days between a date and itself.
Business days vs calendar days
Calendar days count every day on the calendar including weekends and holidays. Business days (also called working days) typically exclude Saturdays, Sundays, and public holidays. The distinction matters when you need to meet a legal filing deadline measured in business days, calculate shipping delivery windows, or estimate how many workdays a project will consume. This calculator provides calendar day counts, which serve as the foundation for business-day estimates. As a rough guideline, multiply calendar days by 5/7 to approximate business days, though the exact number depends on your locale's holiday schedule.
Practical uses for date calculations
Beyond the obvious deadline tracking, date calculations appear in surprisingly many scenarios. Contract managers use day counts to verify service-level agreements and penalty clauses. Travel planners count days to determine visa validity periods and booking windows. Academic institutions measure semester lengths and enrollment windows in calendar days. Fitness enthusiasts track the duration of training programs and recovery periods. Event coordinators count backwards from a target date to build preparation timelines. Knowing the exact gap in days, weeks, and approximate months gives you a multi-angle view of the same time span, making it easier to communicate schedules to different audiences.
Related date tools
If you need to count from today to a future event, try the How Many Days Until countdown calculator. To find out your exact age in years, months, and days, the Age Calculator is purpose-built for that. And if you want to see how long until your next birthday, the Birthday Countdown tool finds the nearest upcoming birthday automatically. Each tool shares the same UTC-normalized date math under the hood, ensuring consistent results across the suite.
Privacy and accuracy
This calculator runs entirely in your browser using client-side JavaScript. The dates you enter are never transmitted to a server, stored in a database, or shared with third parties. There is no account requirement, no cookies tracking your inputs, and no analytics on the specific dates you choose. The calculation is deterministic: given the same two dates, you will always get the same result regardless of your device, operating system, or browser. You can verify the output by counting days on a physical calendar or cross-referencing with any other date-difference tool that uses UTC normalization.