How to Count Days Between Two Dates
Last reviewed on May 4, 2026
"How many days from January 15 to March 4?" sounds like a question with one answer. It has at least three. The number depends on whether you count both endpoints, only one, or neither — and whether you mean calendar days, weekdays, or business days. This page sets out the rules, walks through worked examples on the site's 2026 calendars, and points out the places these distinctions matter most.
Three ways to count
- Exclusive both ends. "Days between" in the strictest sense — neither endpoint counts. This is what most spreadsheet date-difference functions return.
- Inclusive of one end. "Days from January 15 to January 20" usually means five days have passed (15, 16, 17, 18, 19, then arrive at 20). Day 1 is the day after the start.
- Inclusive of both ends. "January 15 through January 20 inclusive" is six days. Used in hotel night counts only when the convention is explicit, and in some contracts where the deadline day itself counts.
The most common source of off-by-one errors is mixing two of these conventions in the same calculation — for example, taking a spreadsheet difference (exclusive) and reading it as a "days through" count (inclusive).
Worked example: January 15 to March 4, 2026
January 15, 2026 is a Thursday. March 4, 2026 is a Wednesday. Counting:
- Exclusive both ends: 47 days.
- Inclusive of end date only ("days from… to…"): 48 days.
- Inclusive of both ends ("days through…"): 49 days.
For the inclusive-both count, think of it as 17 days remaining in January (15 through 31), plus 28 days in February (it's not a leap year), plus 4 days in March = 49.
How spreadsheets calculate the difference
- Excel and Google Sheets
=B1-A1returns exclusive-both-ends. Both dates as serial numbers, simple subtraction. DAYS(end, start)in Excel does the same.NETWORKDAYS(start, end, [holidays])counts weekdays between two dates, inclusive of both endpoints if they are weekdays. Holidays you supply as a list are excluded.NETWORKDAYS.INTLlets you redefine which days are weekend — useful for jurisdictions where the working week is Sun–Thu (e.g., parts of the Middle East).
Counting only weekdays (Monday–Friday)
A weekday count excludes Saturdays and Sundays. The fastest mental shortcut for a span shorter than a few weeks: count total days, divide by 7 to get the number of full weeks (which contribute 5 weekdays each), then add the leftover weekdays in the last partial week.
Worked example: January 15 (Thursday) through February 5 (Thursday), 2026 — that's 22 days inclusive. Three full weeks contribute 15 weekdays. The leftover Thursday at the end is 1 more. Total: 16 weekdays.
Counting only business days
Business-day counts exclude weekends and public holidays. The list of holidays to exclude depends on jurisdiction: in the US, the standard list is the ten federal holidays (see 2026 federal holidays); in finance, the list often follows the Federal Reserve calendar; in shipping, the carrier's published holiday list.
Worked example: January 15 through February 5, 2026, excluding US federal holidays. The only federal holiday in that range is Martin Luther King Jr. Day on Monday, January 19. So 16 weekdays minus 1 holiday = 15 business days. For the rules and longer worked examples, see the working days vs calendar days guide.
Whole-week and whole-month counts
When the start and end dates are the same day of the week, divide the day count by 7 to get whole weeks. February 5 to March 5, 2026 are both Thursdays — exactly 28 days, exactly 4 weeks.
Whole-month counts are trickier because months have different lengths. "One month from January 31" is February 28 in a non-leap year, February 29 in a leap year, or March 3 if the convention is to add 30 days. Most banking and legal "one month later" conventions use "the same day-of-month in the next calendar month, or the last day of the next month if it doesn't exist." Always check the contract.
Counting across a leap year
Spans that cross February 29 in a leap year are one day longer than you might expect by analogy with a non-leap year. February 1, 2027 to February 1, 2028 is 365 days. February 1, 2028 to February 1, 2029 is 366 days, because 2028 is a leap year and February 29, 2028 falls inside the range.
Time zones change the answer
If the start and end timestamps are in different time zones, two events that happen at "the same moment" can have different calendar dates. A meeting that starts at 23:00 New York time on December 31 starts at 04:00 London time on January 1. A "days from… to…" calculation that mixes local-clock dates from different zones can be off by one in either direction. Convert both timestamps to the same time zone (or to UTC) before counting.
Common scenarios
Hotel nights
A reservation from June 5 to June 8 is three nights, not four — the count is the number of nights slept (5→6, 6→7, 7→8), not the number of dates touched.
Subscription months
"30 days from purchase" usually means 30 calendar days. Buying on January 31, 2026 means a renewal date of March 2, 2026 — not "the 31st of February," which doesn't exist.
Notice periods
"30 days notice" varies by jurisdiction. Some statutes count the day notice is given as day 0 and start counting from the next day; others include the day of notice as day 1. Read the statute or the contract.
Travel
A passport that says "valid until December 31, 2026" is normally usable through the end of that date. Many countries also require six months of remaining validity beyond your travel date — count forward from your last day in the destination, not from your first day.
Common mistakes
- Reading a spreadsheet difference as "days through" instead of "days between."
- Forgetting that February has 28 days in most years.
- Counting weekends in a "business days" claim.
- Using local-clock dates from different time zones in the same calculation.
- Adding 30 to a date and assuming you've added "one month."
- Trusting "days until X" widgets that round at midnight in your local time even when the event is in another zone.
Quick checklist before you trust a count
- Are both endpoints counted, only one, or neither?
- Are weekends counted? Holidays?
- Is the result in calendar days, weekdays, or business days?
- Whose time zone?
- Does the span cross a leap day?
Related
- Working days vs calendar days — the business-day rule.
- Leap years — the rule and the next leap year.
- 2026 US federal holidays — the dates to exclude from a US business-day count.
- ISO 8601 week numbers — the cleaner unit for cross-year comparisons.