Home Calculators Blog About Contact
Home Calculators Days Between Dates
Date & Time

Days Between Dates

Count calendar days, business days, or working days between any two dates — instantly and accurately.

Reviewed & Maintained by
Aadil MalikSoftware Engineer
6 min read  ·  1,109 words

Figuring out how many days sit between two dates sounds simple until you actually try it by hand. Months don't all have the same length, leap years throw an extra day into February every four years, and there's a genuine judgment call about whether the end date itself should count. This guide walks through exactly how to calculate the number of days between two dates — by calendar days, business days, or a full years/months/days breakdown — and where people most often get the count wrong.

Whether you're figuring out how many days until a deadline, how many days you've been at a job, how long a rental period runs, or how many working days fall inside a project window, the method is the same underlying math with a few important variations depending on what you're actually trying to measure.

What "Days Between Two Dates" Actually Means

A days-between-dates calculation is the count of calendar days separating a start date and an end date. There are two ways to express that count:

  • Total days — a single number representing the full span (e.g., 47 days)
  • Calendar breakdown — the same span expressed as years, months, and leftover days (e.g., 1 month, 17 days)

Both are correct; they just answer different questions. Total days is what you want for deadlines, invoices, or countdowns. The calendar breakdown is more useful for things like age, tenure, or contract length, where "1 year, 2 months" is more meaningful than "427 days."

The Inclusive vs. Exclusive Counting Problem

This is the single most common source of an "off by one" day count, and it trips up manual calculations and even some online tools.

Counting MethodHow It WorksJuly 1–5 Result
Exclusive (default)Measures the gap between two dates — neither endpoint is counted twice4 days
InclusiveBoth the start and end date count as full days5 days

The distinction matters most for:

  • Rental or lease periods (does the move-out day count as a full day?)
  • Hotel or Airbnb stays (nights vs. calendar days)
  • Attendance or billing periods
  • Same-day spans — exclusive gives 0 days, inclusive gives 1

If a calculation ever looks "one day off" from what you expected, this is almost always why.

How to Calculate Days Between Two Dates by Hand

  1. Subtract the years — take the end year minus the start year.
  2. Adjust for incomplete years — if the end date's month/day comes before the start date's month/day, subtract one year and carry the difference forward as months.
  3. Work out the leftover months, then the leftover days, from what remains.
  4. Convert to a single day count if needed, using 365 days per year (365.25 to average in leap years) plus the appropriate days for whichever months are included.
  5. Account for leap years — any February 29 falling inside the range adds one day to the total that a naive 30/31-day month count would miss.

This works, but it's easy to make a small error anywhere in the process — which is exactly why a calculator (or a spreadsheet formula) is the more reliable option for anything that matters.

Calculating Days Between Two Dates in Excel or Google Sheets

Spreadsheets handle this natively, and it's faster and less error-prone than doing the arithmetic manually.

Basic Day Count

=END_DATE - START_DATE

Format the result cell as a Number (not a date), or Excel will display it as a date instead of a day count.

Years, Months, and Days Breakdown — DATEDIF Function

=DATEDIF(START_DATE, END_DATE, "y") → full years
=DATEDIF(START_DATE, END_DATE, "ym") → remaining months after full years
=DATEDIF(START_DATE, END_DATE, "md") → remaining days after full months

Business Days Only (Excluding Weekends)

=NETWORKDAYS(START_DATE, END_DATE)

Add a holiday range as a third argument to exclude public holidays too:

=NETWORKDAYS(START_DATE, END_DATE, HOLIDAY_RANGE)

Google Sheets uses identical syntax for all three formulas — the same cells work without modification if you're moving a sheet between the two platforms.

Calendar Days vs. Business Days vs. Working Days

These three terms get used almost interchangeably, but they answer different questions:

TermWhat It CountsTypical Use Case
Calendar daysEvery day, including weekends and holidaysDeadlines, ages, countdowns
Business daysMonday–Friday onlyContract terms, shipping estimates
Working daysBusiness days, minus public holidaysPayroll, legal notice periods

A quote of "5 business days" for shipping, for example, means something different from "5 calendar days" — the business-day version could stretch across a full calendar week or more if a weekend falls inside it.

Common Mistakes When Counting Days Between Dates

  • Forgetting leap years. Any range crossing a February in a leap year is one day longer than a naive month-length count would suggest.
  • Mixing up inclusive and exclusive counting, especially for rentals, stays, and attendance periods.
  • Ignoring time zones when the dates come from timestamped data (e.g., server logs or booking systems) rather than plain calendar dates — a date can flip depending on which time zone it's read in.
  • Assuming "business days" and "working days" are always the same thing — working days often subtracts public holidays that a pure business-day count wouldn't.
  • Entering the dates in the wrong order. Reversing the start and end date without correcting for it produces a negative count instead of a valid one.

Practical Examples

ScenarioStartEndResult
Deadline planningJuly 16, 2026September 30, 202676 calendar days (approx. 54 business days)
Age in daysSeptember 5, 1970June 5, 2022~18,627 days (using 365.25/year to average leap years)
Rental period (exclusive)August 1August 3029 days — affects prorated rent calculations
Rental period (inclusive)August 1August 3030 days

Final Thoughts

The simplest way to count days between two dates accurately is to use an online calculator or a spreadsheet formula — both handle leap years, month-length variation, and the inclusive/exclusive boundary automatically. For anything where the exact count matters (legal deadlines, payroll, contract terms), always double-check whether the tool you're using counts the start and end date themselves, and whether "business days" in that context includes public holidays or not. Getting those two settings right eliminates almost every off-by-one day count error in practice.

Frequently Asked Questions

Subtract the start date from the end date; the result is the total number of calendar days between them. Most calculators default to exclusive counting, meaning the start date is not counted as a full day.
Use =END_DATE - START_DATE for a simple day count, or =DATEDIF(START_DATE, END_DATE, 'y') to break the result into years, months, and days. Format the result cell as a number, not a date.
Calendar days count every day of the week; business days count only Monday through Friday, excluding weekends.
Not by default. Standard business-day counts include weekdays regardless of holidays; 'working days' specifically excludes public holidays too.
Add 1 to the exclusive day count, or select 'include end date' if the calculator offers that option.
It's almost always the inclusive vs. exclusive counting difference — check whether the end date itself is being counted as a full day.
Any range that includes a February 29 has one additional day compared to what a standard 365-day year assumption would produce.
Yes — subtract years, then adjust for incomplete years and months, then account for leftover days and any leap years in the range. It is more error-prone than using a tool.
Roughly 20 to 22, depending on how many weekends fall in that month and whether any holidays land on a weekday.
Treat today's date as the start date and the future date as the end date, then run the same subtraction.
It can, if the dates come from timestamped data rather than plain calendar dates — a timestamp near midnight can fall on a different calendar day depending on the time zone applied.
The same formulas as Excel work directly — =END_DATE - START_DATE and =DATEDIF() behave identically in Google Sheets.
Using an online calculator or a spreadsheet formula — both avoid the manual leap-year and month-length adjustments that make hand calculation error-prone.
Set today's date as the start date and the target date as the end date, then subtract — this also works in reverse for counting days since a past date.
A well-built calculator detects when the end date is earlier than the start date and swaps them automatically rather than returning a negative or invalid result.