Days Between Dates Calculator

Use this calculator to find the exact number of days between two dates and quickly compare exclusive and inclusive counting.

Counts the date boundaries between the two dates.
Use this when you want to count both the start day and the end day.
On means the main answer can be negative (end date is earlier). Off means the main answer shows the distance either way.
Advanced options

These only change how results are displayed.

Did we solve your problem today?


How to use our Days Between Dates Calculator

  1. Enter a Start date and End date.
  2. Choose How to count days: Exclude the end date or Include the end date.
  3. If you want a negative answer when the dates are reversed, turn on Show negative result when end date is earlier.
  4. Click Calculate, then read Days between dates first and check Compare both counting rules to make sure you used the right counting rule.
  5. Use the extra results like Date order note, Weekday and weekend days, and Middle date to double-check that the date range matches your real situation.
Example inputs for Days Between Dates Calculator
Example inputs for Days Between Dates Calculator

Definitions

Start date: The first date in the range.

End date: The second date in the range.

Exclude the end date: Count the day boundaries between the two dates, but do not count the last date itself.

Include the end date: Count both the starting date and the ending date.

Days between dates: The main answer in days using your chosen counting rule.

Date order note: A short message that explains which entered date comes first when the dates are reversed.

Weekday and weekend days: A split of the counted range into weekdays and weekend days.

Middle date: The halfway point of the counted span when that halfway point lands exactly on a calendar date.


Common mistakes and quick fixes

Mistake: Picking the right Start date and End date but forgetting that some situations count the last day and some do not.
Fix: Check How to count days and compare the answers in Compare both counting rules .

Mistake: Thinking Days between dates should never be negative when the End date is earlier than the Start date .
Fix: Leave Show negative result when end date is earlier off for an easy distance, or turn it on if you want the sign to show date order.

Mistake: Entering the dates in reverse order and assuming the calculator is wrong.
Fix: Read Date order note to see which date is earlier and how the range was interpreted.

Mistake: Using Weekday and weekend days like it is a holiday-aware business-day count.
Fix: Treat that output as a simple Saturday-and-Sunday breakdown only.

Mistake: Seeing a same-day answer of 0 in Days between dates and thinking the tool failed.
Fix: With Exclude the end date , the same date gives 0 days; switch to Include the end date if you need to count that day.

Mistake: Expecting Middle date to always be one exact date.
Fix: If the span has no whole-date midpoint, read the Note because the true middle falls between two dates.


Limitations & Key Assumptions / Boundary Conditions

  • This calculator counts calendar dates, not clock hours, so daylight saving time changes do not change the day count.
  • Weekday and weekend days uses a simple weekend definition for the chosen setting and does not remove holidays.
  • If Show negative result when end date is earlier is off, the main answer is shown as a distance, so date order is explained in Date order note instead of with a negative number.
  • If the span midpoint falls between two dates, Middle date cannot be shown as one exact date and the calculator shows a note instead.
  • Results depend on valid calendar dates entered in Start date and End date.
  • This tool is for finding days between dates only. It does not add or subtract days from a date.

Methodology

How the calculator counts days

The calculator turns each entered date into a whole-day serial value at midnight and subtracts them. This avoids off-by-one problems caused by time of day or daylight saving time changes.

days_exclusive = end_serial - start_serial

days_inclusive = days_exclusive + 1

days_absolute = abs(days_exclusive)

If you choose Exclude the end date, the main result uses days_exclusive. If you choose Include the end date, the main result uses days_inclusive. If reversed dates are entered and signed mode is off, the calculator still reports the distance clearly and explains the order in Date order note.

Weeks, weekdays, weekends, and midpoint

Same span as weeks and days is based on the size of the main day result, ignoring the sign so it is easier to read.

whole_weeks = floor(abs(main_days) / 7)

leftover_days = abs(main_days) - 7 * whole_weeks

Weekday and weekend days is found by checking each counted date in the range and labeling it as a weekday or weekend day. This is a calendar split only, not a holiday-aware business-day count.

for each date d in counted range: if weekend(d) then weekend_days += 1 else weekday_days += 1

Middle date is shown only when the midpoint lands on a whole date. Otherwise, the note explains that the exact middle falls between two dates.

Mini example

Example: from January 1, 2026 to January 10, 2026, the exclusive count is 9 because there are 9 day boundaries between those dates. The inclusive count is 10 because you also count the last date. That is why the comparison box helps catch off-by-one mistakes.

Assumptions used

The calculator uses standard calendar dates and handles leap years automatically. Weekend counts are based on the selected weekend setting. Results are meant for date spans, so they can differ from work schedules, holiday calendars, or rules used by a specific school, job, or legal form.


Sources