How To Calculate Days Between Dates In Google Sheets

One of the most common uses for Google Sheets is to create calendars and to handle information about dates, such as timesheets or vacation schedules. Many users who create a spreadsheet dealing with dates find themselves needing to calculate how many days there are between two dates; that is, they need to find how many days there are between (as an example) July 1, 2018, and January 31, 2019.

You could just look on a calendar and count the days up by hand, and that would work fine if the dates were very close together, but for large numbers of dates or dates that are far apart, a little help from the computer would sure be nice. Fortunately, Google Sheets has a number of ways to find the number of days between two dates.

Let’s take a look at the functions you can use to calculate days between dates in Google Sheets.

How to Calculate Days Between Dates in Google Sheets

Before getting started, it’s important to note that these methods only work when using the American date format. If you’re not in the United States, you can go into Google Sheets and change your Locale and Time Zone if you want to use these methods.

That being said, let’s take a look at how to find the number of days between two dates in Google Sheets.

How to Calculate Days Between Dates in Google Sheets using the MINUS Function

Unlike Excel, Google Sheets has a subtraction function that is very handy for calculating simple date differences. MINUS is Google Sheets’ subtraction function, and, because of the way dates are stored internally (as integers describing the number of days since a certain date in the past), it works just fine for deducting one date from another. That is, as long as the dates are both in the same format. The syntax for MINUS is: =MINUS(value 1, value 2).

  1. Open a blank Google Sheets spreadsheet in your browser and enter (as an example) 4/5/2017 and 5/15/2017 in cells B3 and C3.
    How To Calculate Days Between Dates In Google Sheets
  2. Now, select cell D3, which is where we’ll put the MINUS function. Click inside the fx bar, and then type =MINUS(C3, B3) and press Enter. Cell D3 will now return the value 40, as shown directly below.
    How To Calculate Days Between Dates In Google Sheets

This means there are 40 days between 4/5/2017 and 5/15/2017.

You can also find the difference between the dates just by entering the cell references and not bothering with the MINUS function.

  1. For example, click cell E3 and input =C3-B3 in the function bar, as shown in the snapshot directly below. That will also return 40. Although, since you are directly subtracting dates without MINUS, the value in cell E will probably display in date format and look very strange.

You can convert the cell format to show an integer value by selecting Format > Number and Number.

How To Calculate Days Between Dates In Google Sheets

You might also input the cell references with the earlier date first. If you entered =B3-C3 in the function bar, the cell would contain the value -40. This highlights that 4/4/2017 is 40 days behind 5/15/2017.

How to Calculate Days Between Dates in Google Sheets using the DATEDIF Function

DATEDIF is a function that helps you find the total days, months, or years between two dates. You can find the total days between two dates entered on the spreadsheet or include the dates within DATEDIF instead.

The syntax for DATEDIF is:

DATEDIF(start_date, end_date, unit). The unit for the function can be D (days), M (months), or Y (years).

  1. To find the difference between 4/4/2017 and 5/15/2017 with DATEDIF, you should select a cell to add the function to (F3, in our case) and input =DATEDIF(B3, C3, “D”) in the fx bar.

How To Calculate Days Between Dates In Google Sheets

DATEDIF will also work if you put the date information directly into the formula.

  1. Click a spreadsheet cell to add DATEDIF to, and then type in =DATEDIF(“4/5/2017”, “5/15/2017″,”D”) in the fx bar.

How To Calculate Days Between Dates In Google Sheets

As you can see, the results are the same.

How to Calculate Days Between Dates in Google Sheets using the DAYS360 Function

Google Sheets includes DAY360, which calculates the difference between dates for a 360-day year. The 360-day calendar is used primarily for financial spreadsheets in which interest rate calculations might be required.

The syntax for DAYS360 is:

=DAYS360(start_date, end_date, [method]). The [method] is an optional indicator you can include for the day count method.

  1. As an example, enter 1/1/2016 in cell B4 as the start date, and then input 1/1/2017 in C4 as the end date for the function.
    How To Calculate Days Between Dates In Google Sheets
  2. Now, select cell D4, input the function =DAYS360(B4, C4) in the fx bar, and press Enter.
    How To Calculate Days Between Dates In Google Sheets

Cell D4 will include a total of 360 days between the selected dates. Note that the only real use for this particular function is if you are working with interest rates.

How to Calculate Days Between Dates in Google Sheets using the NETWORKDAYS Function

NETWORKDAYS also calculates the number of days between dates, but it’s not entirely the same as the others. This function only counts the weekdays, so it leaves weekends out of the equation. (Read it as “Net Workdays” rather than “Network Days”.)

As such, you can find the total number of weekdays between a couple of dates with NETWORKDAYS, and you can also specify extra holidays so that it excludes other dates.

The syntax for NETWORKDAYS is:

NETWORKDAYS(start_date, end_date, [holidays])

  1. Using dates from the previous example, 4/4/2017 and 5/15/2017 entered in cells B3 and C3. How To Calculate Days Between Dates In Google Sheets
  2. Select a cell and input =NETWORKDAYS(B3, C3) and press the EnterHow To Calculate Days Between Dates In Google Sheets
  3. To add a holiday date to the function, first, enter 4/17/2017 in cell A3 and then modify the function by adding the cell reference A3 to it. So, the function would then be =NETWORKDAYS(B3, C3, A3), which will return 28 with the extra bank holiday also deducted from the total days.
    How To Calculate Days Between Dates In Google Sheets

Other Important Date-Related Functions

There are a number of date-related functions in Sheets that you should be familiar with if you are going to be doing a lot of work with dates.

  • The DATE function converts a provided year, month, and day into a date. The format is DATE(year, month, day). For example, DATE(2019,12,25) returns 12/25/2019.
  •  The DATEVALUE function converts a properly-formatted date string into a date integer. The format is DATEVALUE(date string); the date string can be any appropriate string, such as “12/25/2019” or “1/23/2012 8:5:30”.
  • The DAY function returns the day of the month that a specific date falls on, in numeric format. The format is DAY(date). For example, DAY(“12/25/2019”) returns 25.
  • The DAYS function returns the number of days between two dates. The format is DAYS (end date, start date). For example, DAYS(“12/25/20189”, “8/31/2019”) returns 116.
  • The EDATE function returns a date a specific number of months before or after the given date. The format is EDATE(start date, number of months). For example, EDATE(“8/31/2019”, -1) returns “7/31/2019”.
  • The MONTH function returns the month of the year that a specific date falls on in numeric format. The format is MONTH(date). For example, MONTH(“8/30/2019”) returns 8.
  • The TODAY function returns the current date as a date value. The format is TODAY(). For example, at the time of this writing, TODAY() would return “8/31/2019”.
  • The WEEKDAY function returns a numeric value showing the day of the week of the date provided. The format is WEEKDAY(date, type), and the type can be 1, 2, or 3. If type is 1, days are counted from Sunday, and Sunday has a value of 1. If type is 2, days are counted from Monday and the value of Monday is 1. If type is 3, days are counted from Monday, and the value of Monday is 0. For example, 4/30/2019 is a Tuesday, and WEEKDAY(“4/30/2019”,1) would return 3, while WEEKDAY(“4/30/2019”,2) would return 2 and WEEKDAY(“4/30/2019”,3) would return 1.
  • The YEAR function returns a numeric value showing the year of the date provided. The format is YEAR(date). For example, YEAR(“12/25/2019”) would return 2019.

Calculate the Day Away

Google Sheets is an incredibly powerful program, especially for an application that’s completely free. While it may not be quite as powerful as something like Microsoft Excel, it can still handle a wide range of tasks, including this one.

Sign up and earn $1000 a day ⋙

How to fix error 0xa00f4288 in Camera app on Windows 10 & 11

How to fix error 0xa00f4288 in Camera app on Windows 10 & 11

How to fix error 0xa00f4288 in the Camera app on Windows 10 & 11. Windows' default Camera App is the main tool for taking photos. So in the case of Win 10 & 11 cameras

How to open multiple programs with one shortcut on Windows 10

How to open multiple programs with one shortcut on Windows 10

How to open multiple programs with one shortcut on Windows 10, You can actually open multiple programs at the same time with a single key. Here's how to use one

How to delete old boot menu options on Windows

How to delete old boot menu options on Windows

How to remove old boot menu options on Windows, Windows 10 dual boot is useful but can leave redundant boot options in the menu. Here's how to remove the menu

Instructions for fixing Snipping Tool errors on Windows 11

Instructions for fixing Snipping Tool errors on Windows 11

Instructions for fixing Snipping Tool errors on Windows 11. Windows 11 has officially been released for a while, but during use there are still many errors

Instructions for entering text by voice on Windows 11

Instructions for entering text by voice on Windows 11

Instructions for entering text by voice on Windows 11, Entering text by voice on Windows 11 helps you significantly improve your work efficiency. Here's how

How to turn on/off Sticky Key on Windows 11

How to turn on/off Sticky Key on Windows 11

How to turn on/off Sticky Key on Windows 11, Sticky Key makes the PC keyboard easier to use. Here's how to turn Sticky Key on and off on Windows 11.

What is Windows Modules Installer?

What is Windows Modules Installer?

What is Windows Modules Installer?, Windows Modules Installer sometimes takes up a lot of system resources. Is Windows Modules Installer important or not?

How to increase volume in Windows 10

How to increase volume in Windows 10

How to increase volume in Windows 10, How to increase computer volume to maximum level? Let's learn with WebTech360 how to increase Windows 10 computer volume

How to use Windows 11 Installation Assistant to install Windows 11

How to use Windows 11 Installation Assistant to install Windows 11

How to use Windows 11 Installation Assistant to install Windows 11, Windows 11 Installation Assistant is one of the best ways to upgrade your computer to Windows 11.

How to turn off the startup sound in Windows 11

How to turn off the startup sound in Windows 11

How to turn off the startup sound in Windows 11, Does the PC startup sound bother you? Then please refer to how to turn off the startup sound for PC running Windows 11 below

Instructions for changing the screen lock timeout on Windows 11

Instructions for changing the screen lock timeout on Windows 11

Instructions for changing the screen lock timeout on Windows 11. While using Windows 11, there are times when users will need to leave the computer for a period of time.

Windows 11 optimization guide to increase FPS when playing games

Windows 11 optimization guide to increase FPS when playing games

Instructions for optimizing Windows 11 to help increase FPS when playing games, Windows 11 is an operating system platform that is introduced as more improved in gaming quality, helping games

Windows 11: How to use and customize the Quick Settings menu

Windows 11: How to use and customize the Quick Settings menu

Windows 11: How to use and customize the Quick Settings menu, Windows 11 brings some great new features and the Quick Settings menu is no exception. Here it is

How to fix the error of not being able to start Windows 11 after enabling Hyper-V

How to fix the error of not being able to start Windows 11 after enabling Hyper-V

How to fix the error of not being able to start Windows 11 after turning on Hyper-V. Hyper-V helps you run virtual machines on Windows. However, after enabling Hyper-V, you cannot post again

How to fix error 0xc00007b in Windows

How to fix error 0xc00007b in Windows

How to fix error 0xc00007b in Windows, Windows displays error 0xc00007b when the application does not work properly. Below is a step-by-step guide to fix error 0xc00007b in

How to change the login screen on Windows 10/11

How to change the login screen on Windows 10/11

How to change the login screen on Windows 10/11, Don't like the blurry screen when logging in on Windows 10/11? So, instructions on how to turn off and change the login screen

How to uninstall drivers in Windows 11

How to uninstall drivers in Windows 11

How to uninstall drivers in Windows 11, Do you want to remove unwanted drivers on Windows 11? Then please see instructions on how to remove drivers in Windows

How to fix No Internet Secured error on Windows 10

How to fix No Internet Secured error on Windows 10

How to fix No Internet Secured error on Windows 10, No Internet Secured is a common error on Windows 10. Below are simple ways to fix No Internet Secured error

How to fix the error of not being able to save Excel files on Windows

How to fix the error of not being able to save Excel files on Windows

How to fix the error of not being able to save an Excel file on Windows. If you can't save the Excel file, don't worry too much. Below are ways to fix the error of not being able to save the above Excel file

How to open DMG files on Windows

How to open DMG files on Windows

How to open DMG files on Windows, DMG is a file format specific to the macOS operating system. However, you still have a way to open DMG files on Windows.