Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Date Difference Calculator: How to Find Days Between Dates

· 6 min read · Home Tech

In this article
  1. How to Calculate Date Differences in Google Search
  2. Using Google Sheets for Reusable Date Calculations
  3. Simple Subtraction in Google Sheets
  4. Common Mistakes and Misconceptions
  5. Alternatives to Google for Date Difference Calculations
  6. Calculating Business Days (Weekdays Only)
  7. Frequently Asked Questions

Google does not have a dedicated date difference calculator, but you can calculate the exact number of days between two dates directly in the Google search bar or in Google Sheets. Typing a simple query like "days between March 1 2024 and June 15 2024" into Google returns an instant answer, and the built-in DATEDIF function in Google Sheets provides a more flexible, reusable way to do the same calculation.

The quickest method requires no tools at all. Open Google.com and type a natural-language query into the search box. Google's built-in date calculator recognizes several phrasings:

  • "days between" followed by two dates: days between 2024-01-15 and 2024-03-20
  • "how many days until" for a future date: how many days until December 25 2025
  • "date difference" with two dates: date difference April 1 2023 October 1 2023

Google interprets dates in several common formats, including month-day-year (April 15, 2024), day-month-year (15 April 2024), and numeric forms (04/15/2024 or 2024-04-15). The result appears directly under the search bar in a small box labeled with the number of days. This method counts the full 24-hour periods between the two dates, meaning it does not include the start date but does include the end date. For example, the difference between January 1 and January 2 is 1 day, not 2.

Using Google Sheets for Reusable Date Calculations

When you need the same calculation repeatedly, or you want the result to update automatically as dates change, Google Sheets is the better option. The spreadsheet application has a dedicated function for this exact purpose.

The primary function is DATEDIF, which stands for "date difference." Its syntax is:

=DATEDIF(start_date, end_date, unit)

The unit argument controls what the function returns:

  • "D" — complete days between the two dates
  • "M" — complete calendar months
  • "Y" — complete calendar years
  • "MD" — days remaining after subtracting whole months
  • "YM" — months remaining after subtracting whole years
  • "YD" — days remaining after subtracting whole years

For instance, if cell A1 contains 2024-01-01 and cell B1 contains 2024-03-01, the formula =DATEDIF(A1, B1, "D") returns 60. The same formula with "M" returns 2, and with "Y" returns 0.

Simple Subtraction in Google Sheets

For a plain day count, you do not even need DATEDIF. Because Google Sheets stores dates as serial numbers (where each day is one integer), simple subtraction works:

=B1 - A1

This returns the number of days between the date in A1 and the date in B1. The result is identical to DATEDIF with the "D" unit for most cases. One difference: DATEDIF will return an error if the start date is after the end date, while plain subtraction returns a negative number, which can be useful if you want to know by how many days one date precedes another.

To format the result as a plain number rather than a date, select the cell, click Format in the menu, then Number, then Number (not "Automatic" or "Date"). If you skip this step, Sheets may display something like 01/03/1900 instead of 60, because it interprets the result as a date.

Common Mistakes and Misconceptions

Several errors trip up users when calculating date differences, whether in Google Search or Sheets:

  • Inclusive vs. exclusive counting: Most date calculators, including Google's, count the number of full days between dates, not including the start date. If you need to count both the start and end dates (for example, counting the days of a vacation from check-in to check-out), add 1 to the result.
  • Date format confusion: In the search bar, Google generally interprets 04/05/2024 as April 5, 2024 (US format), not May 4. To avoid ambiguity, spell out the month or use the ISO format YYYY-MM-DD, which Google always reads unambiguously.
  • Time components: If your Google Sheets cells contain both a date and a time (for example, 2024-03-01 14:30), subtracting the cells gives a fractional number of days. The integer part is the full days, and the decimal is the fraction of a day. Use =INT(B1-A1) to get only the whole days.
  • Leap years: February 29 exists only in leap years. Google and Sheets both handle this correctly, but manual mental math often forgets it. For example, the difference between February 28, 2024 and March 1, 2024 is 2 days because 2024 is a leap year.

Alternatives to Google for Date Difference Calculations

While Google Search and Google Sheets cover most needs, other free options exist:

  • Dedicated online date calculators: Many websites offer a date difference tool with a visual calendar picker. These are useful when you want to see the result alongside a calendar view or when you need to calculate business days (excluding weekends and holidays), which Google's basic search does not do.
  • Excel: Microsoft Excel has the same DATEDIF function and simple subtraction behavior as Google Sheets. The formulas are identical, so knowledge transfers directly.
  • Programming languages: Python's datetime module, JavaScript's Date object, and similar tools in other languages can compute date differences. These are overkill for a one-off question but useful for automation.
  • Calendar apps: Most calendar applications (Google Calendar, Outlook) show the number of days when you create an event spanning multiple days, but they do not provide a general-purpose calculator.

Calculating Business Days (Weekdays Only)

A common request is to find the number of working days between two dates, excluding Saturdays and Sundays. Google Search does not support this directly. In Google Sheets, the function NETWORKDAYS handles it:

=NETWORKDAYS(start_date, end_date)

This counts the number of weekdays (Monday through Friday) between the two dates, including both the start and end dates. For example, NETWORKDAYS for Monday, March 4, 2024 to Friday, March 8, 2024 returns 5. If you need to exclude holidays as well, add a third argument with a range of holiday dates:

=NETWORKDAYS(start_date, end_date, holiday_range)

Note that NETWORKDAYS includes both endpoints, unlike the basic day difference which excludes the start date. This is a frequent source of off-by-one errors when switching between the two functions.

Frequently Asked Questions

Does Google Search count the start date in the result?
No. The "days between" result counts full 24-hour periods, so the start date is not included but the end date is. For example, "days between January 1 and January 3" returns 2. If you need to include both dates, add 1 to the result.

Why does my Google Sheets subtraction show a date instead of a number?
Sheets is applying automatic date formatting to the result. Select the cell, go to Format > Number > Number to display the raw integer. The underlying value is correct; only the display format is wrong.

Can I calculate months or years instead of days in Google Sheets?
Yes. Use the DATEDIF function with the unit argument "M" for complete months or "Y" for complete years. For example, =DATEDIF("2023-01-15", "2024-03-20", "M") returns 14, because 14 full months have elapsed.

What does the error #NUM! mean in DATEDIF?
This error appears when the start date is later than the end date. DATEDIF requires the first date to be earlier than or equal to the second. If you need to handle reverse order, use simple subtraction instead, which returns a negative number.

How do I count only weekdays between two dates?
Use the NETWORKDAYS function in Google Sheets. It counts Monday through Friday and includes both the start and end dates. To exclude holidays, add a range of holiday dates as a third argument.

Is there a way to see the date difference without typing a formula?
Yes. Type a natural-language query into Google Search, such as "how many days between March 1 2024 and June 15 2024." Google displays the answer instantly without requiring any formula syntax.