Date Difference Calculator

Count exclusive days (nights between) and inclusive calendar days between two dates, plus a years/months/days span. Reversed dates stay positive.

Last updated: October 4, 2026

Tool

This tool will load here.

What this calculator does

A date difference calculator answers “how far apart are these two dates” without pretending the answer is a single number. Monday to Tuesday is one night (exclusive) and two calendar dates if you count both ends (inclusive). Hotel stays, leave requests, and “how many days is this invoice period” disagree about which count they want. This page shows both, plus a calendar span in years, months, and days.

That is a different job from age. Age is “how old on this date,” with a birth-date orientation and a leap-day birthday rule. Date difference is any start and any end. If you want age, use the Age Calculator. If you want hours and minutes between two clock times, use the Time Duration Calculator.

If the end date is earlier than the start, the duration is still shown as a positive span. The status states that the dates were reversed. The tool does not print a negative day count that people then take the absolute value of by hand and forget which inclusive rule they used.

How to use

  1. Pick the start date.
  2. Pick the end date.
  3. Calculate. Read exclusive days, inclusive days, and the calendar span. Example is 1 January 2024 to 31 January 2024.

Same-day start and end: exclusive 0, inclusive 1, span 0 years 0 months 0 days. That is deliberate. Two identical dates share no nights and one calendar date.

Formula

Exclusive days = difference of the UTC day numbers of the two calendar dates. That avoids local DST shifting a midnight timestamp by an hour and breaking the day count. Inclusive days = exclusive + 1. Calendar span uses the same year/month/day borrow as age, from the earlier date to the later date, without the leap-birthday clamp.

Example

1 January 2024 to 31 January 2024: exclusive 30, inclusive 31, span 0 years, 0 months, 30 days. 1 January 2024 to 1 January 2024: exclusive 0, inclusive 1. 1 March 2024 to 1 January 2024: same figures as the reverse pair, with a reversed-dates status.

2024-01-01 → 2024-01-31
exclusive 30, inclusive 31

Limits

  • Dates only. No hours. Overnight clock math is the time-duration page.
  • No business-day calendar and no holidays.
  • No time zones. You pick civil dates.
  • Inclusive always counts both ends. If your policy excludes the end date, use exclusive.

Week counts are not shown because a week is just exclusive days divided by 7, and people disagree about leftover days versus rounding. If you need weeks, take exclusive days and divide. Business days, holidays, and “working days excluding weekends” need a calendar of exceptions this page does not have. Adding a weekend toggle without a holiday list would look complete and be wrong for any real leave policy.

Leap days inside the span are included automatically because exclusive days use real calendar day numbers. 1 February 2024 to 1 March 2024 is 29 exclusive days; 1 February 2025 to 1 March 2025 is 28. You do not add the extra day yourself.

For a person’s age on a date, including the leap-day note, go to the Age Calculator. For 22:15 to 06:45, go to the Time Duration Calculator. Do not enter clock times here; the date control will not accept them.

On this page

Related Articles

Related solutions

Need another tool ?

Open the free tools — no signup.

FAQs

newsletter signup

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Innovative Solutions For Modern Needs
Copyright © 2026 Yallasolve. all rights reserved.