How to Calculate Days Between Two Dates
Learn how to find the number of days between dates, choose inclusive or exclusive counting, and handle leap years, times, and workdays.

Finding the number of days between two dates sounds simple, but the answer depends on what you mean by between. The most common mistakes come from counting both endpoints, overlooking a leap day, or mixing calendar days with working days.
The Short Answer
For elapsed calendar days, subtract the start date from the end date:
Days between = End date - Start date
If March 15 is the start and March 16 is the end, the elapsed difference is 1 day. This is exclusive counting because the start date is treated as the zero point.
If a rule says to count both March 15 and March 16, add 1. The inclusive result is 2 days.
Exclusive vs Inclusive Counting
Use exclusive counting for elapsed time, countdowns, ages, and most software calculations. Use inclusive counting when every named calendar date counts, such as hotel occupancy rules, benefit periods, or a project schedule that explicitly includes both boundary dates.
- Exclusive count: end date minus start date
- Inclusive count: end date minus start date, plus 1
Always state the rule. A one-day disagreement is often a counting convention, not a math error.
A Manual Example
Calculate the days from March 15 to June 10 in a non-leap year:
- Days remaining after March 15: 16
- Full days in April: 30
- Full days in May: 31
- Days through June 10: 10
- Total elapsed days: 16 + 30 + 31 + 10 = 87
The inclusive count is 88 because it also counts March 15.
Using Day-of-Year Numbers
For two dates in the same year, convert each date to its ordinal day. January 1 is day 1, January 2 is day 2, and December 31 is day 365 or 366.
If the start is day 74 and the end is day 161, subtract 74 from 161 to get 87 elapsed days.
This method is fast, but dates after February have a day-of-year value one higher in leap years. Confirm whether February 29 exists before using a reference table.
Dates in Different Years
For dates that cross New Year:
1. Count the days after the start date to December 31. 2. Add every complete year in between. 3. Add the days from January 1 to the end date.
Complete years contribute 365 days, or 366 when they are leap years. Under the Gregorian rule, a year is a leap year when it is divisible by 4, except century years must also be divisible by 400.
Calendar Days vs Business Days
Calendar days include Saturdays, Sundays, and holidays. Business days usually exclude weekends and may also exclude local public holidays.
Do not subtract weekends with a rough percentage when a deadline matters. The exact result depends on which weekdays the range begins and ends on, plus the holiday calendar and local workweek.
Excel and Spreadsheet Formulas
In Excel, subtracting one valid date cell from another returns elapsed days. If the start date is in A2 and the end date is in B2, use:
=B2-A2
The DAYS function expresses the same idea as DAYS(end_date, start_date). For workdays, NETWORKDAYS or NETWORKDAYS.INTL can account for weekends and a supplied holiday list.
When Times and Time Zones Matter
Two calendar dates alone are enough for ordinary day counting. Exact elapsed time is different. A daylight saving change can make a local day 23 or 25 hours, and two identical local times in different zones can represent different moments.
For exact durations, include the date, local time, and named time zone. Convert both moments to a common timeline before subtracting.
Common Mistakes
- Counting the start date without saying the result is inclusive
- Forgetting February 29
- Treating business days as calendar days
- Parsing 03/04 as March 4 in one system and April 3 in another
- Subtracting local clock readings across a daylight saving change
For a quick answer, use the TimeKit Date Difference tool. Enter the two dates, then decide whether your real-world rule needs elapsed, inclusive, or business-day counting.