How to Calculate the Difference Between Two Dates
Learn how date differences are calculated and when they are useful.
Published by QuickUtilaUpdated 3 min read
How long is it between two dates? The answer can be given as a number of days, or as years, months and days. Both are useful — and both depend on a small but important choice about whether the end date is counted.
Counting the days between two dates
Start from the first date and count forward to the second. The quickest way by hand is to count the days left in the first month, add the full months in between, then add the days into the final month.
- 1Days left in February: 28 − 10 = 18
- 2All of March: 31
- 3Days into April: 5
- 418 + 31 + 5 = 54
Therefore: There are 54 days from February 10 to April 5, 2026.
Should the end date be included?
The count above measures elapsed time: the number of days you move forward, not counting the start date. It is how you would count nights in a hotel.
If both the first and last days count — for example a festival that runs from Friday to Sunday — add one. Friday to Sunday is 2 days of elapsed time but 3 days of festival. The Days Between Dates tool offers both options.
Expressing the gap in years, months and days
For longer periods, count whole years first, then whole months, then the leftover days. From January 10, 2024 to April 15, 2026 is 2 years (to January 10, 2026), 3 months (to April 10) and 5 days.
Because months vary from 28 to 31 days, there is no fixed number of days in a month. Two periods of “1 month” can differ by up to three days, which is why the total in days is the most precise measure.
Leap years
A leap year has 366 days, with February 29 added. Years divisible by 4 are leap years, except century years, which must also be divisible by 400. So 2024 and 2000 were leap years, but 1900 was not.
Weekdays vs calendar days
QuickUtila assumes a Monday–Friday workweek. Its weekday count removes Saturdays and Sundays. Its business-day count also excludes the observed holiday dates you supply. It does not select a country or fetch a public-holiday calendar. A different workweek or official deadline rule needs a separate calculation.
A workweek example you can check
| September 21–28, 2026 | Calendar days | Weekdays | Business days with September 25 excluded |
|---|---|---|---|
| Start excluded | 7 | 5 | 4 |
| Both endpoints included | 8 | 6 | 5 |
September 21 and 28 are Mondays. Excluding the start counts Tuesday through the following Monday: five weekdays. Removing the supplied Friday holiday leaves four business days. Repeated holiday entries count once, and a holiday on a weekend does not remove another weekday. Use the observed date if a holiday is moved to a Monday.