How to Count the Days Between Two Dates in Google Sheets

Last Updated on April 13, 2023 by Jake Sheridan

In this tutorial, you will learn how to count the days between two dates in Google Sheets.

How to Count the Days Between Two Dates in Google Sheets

When working with dates, you may want to know how much time has passed between them.

For example, given a start date and end date for a particular employee, you want to know how many days that employee has been at your company.

Luckily Google Sheets comes with several ways to count days between two dates. The easiest option to try is by subtracting both dates.

Since Google Sheets stores dates as serial numbers, subtraction should result in a valid number of days.

Google Sheets also comes with several built-in functions that count days between dates.

In this guide, we will look into how we can use the DAYS, DATEDIF, and NETWORKDAYS to count the number of days between two dates. We will also explain the differences between each method.

How to Calculate the Difference between Two Dates in Google Sheets

Here’s how to calculate the difference between two dates in Google Sheets.

Step 1

The easiest method to count the days between two dates is by using simple subtraction.

First, select an empty cell to place the final result.

In the example above, we want to know how many days apart is the starting date and ending dates in cells B2 and B3.

Step 2

In the empty cell, subtract the starting date value from the ending date. The ending date must come first to ensure that the resulting value is a positive number.

In the example above, we’ve determined that 55 days have passed from the starting date to the ending date.

Step 3

Another way to count days between two dates is by using the DATEDIF function.

The DATEDIF function allows users to find the number of days, months, and years between two given dates.

The first argument refers to the start date to consider while the second argument refers to the end date. The third argument indicates the unit of time to return.

A value of “Y” will return the number of whole years between the dates. Specifying M” will return the number of whole months between the start and end date. Inputting a value of “D” will return the number of whole days between the dates.

Besides these units, the function also accepts “MD”, “YM”, and “YD” if the user needs to return a mix of different units of time.

In the example above, we’ve used several DATEDIF functions to determine that 3 years, 1 month, and 24 days elapsed between the given start and end dates.

Step 4

We can also use the DAYS function to count the number of days between two dates.

In the example above, we used the formula DAYS(B3,B2) to count the number of days between the given dates.

Step 5

There are some cases where we want to only count the work days that have elapsed between two days.

The NETWORKDAYS function also includes a third argument where the user can pass an array of holidays to consider.

In the example above, we’ve added two additional holidays in row D. Adding these holidays as our third argument will ensure that these days are not counted in the NETWORKDAYS result.

Summary

This guide should be everything you need to count the days between two dates in Google Sheets.

You may make a copy of this example spreadsheet to test it out on your own.