There are a couple of useful functions that will quickly calculate the number of days between dates in Google Sheets.
This kind of calculation can be useful if you’re creating a schedule for your students or while creating project plans that have the start and end dates.
In this tutorial, I will show you how to calculate the number of days between dates in Google Sheets, as well as the number of weekdays, and the number of weekends between two dates in Google Sheets.
Calculate Days Between Dates In Google Sheets
Suppose you have the two dates as shown below:
The easiest way to calculate the number of days between the two specified dates is to subtract the start date from the end date.
The below formula would work in this case:
=B2B1
Another way to calculate the same is to use the DAYS function.
The below formula would also give the same result:
=DAYS(B2,B1)
Note that the result here would not include both the start and end date in the calculation. For example, if the start date is January 1, 2018, and the end date is January 2, 2018, the result would be 1.
For example, if the start date is January 1, 2018, and the end date is January 2, 2018, the result would be 1.
If you want both the start and end date included in the result, you need to add 1 back to the result.
Google Sheets Days Between Date and Today
There are two simple ways to do this and both of these methods use the DAYS Function to figure out the number of days between two dates inclusive of the current date.
The first method is to use the TODAY() function as part of your syntax like:
=DAYS(TODAY(),B1)
You must make sure to use the TODAY function as the first argument, otherwise, the Google Sheets date math programming will give the result as a minus figure.Â
The functions still work and you could consider the minus figure as that many days have passed and a positive number as days are still yet to pass if the other date is in the future. Itâ€™s a good way to use Google Sheets to subtract days from todayâ€™s date.
Yet, the simplest way is just to use the TODAY functions as the first argument to use Google Sheets to calculate days between two dates.
Instead of having using the TODAY() Function in the syntax you could also just add todayâ€™s date into Google Sheets to subtract dates from the current date. Youâ€™d use the same formula as you would for any other DAYS function such as:
=DAYS(B2,B1)
You could use the TODAY() function for the cell with the current date or type it manually. The NOW function would also work.
Calculate the Number of Working Days Between Two Dates in Google Sheets
If you’re creating a project plan for work, it’s likely that you are interested in the working days only.
Now to calculate the working days, you need to exclude all the weekend days and all the holidays occurring on weekdays.
Here are the two functions we will use to calculate the number of working days in Google Sheets:
 NETWORKDAYS function – Use this function when the weekend days are Saturday and Sunday (both included).
 NETWORKDAYS.INTL function – Use this function when the weekend days are days other than Saturday and Sunday.
Let’s first have a look at the syntax of NETWORKDAYS in Google Sheets.
NETWORKDAYS Function – Syntax & Arguments
=NETWORKDAYS(start_date, end_date, [holidays])
 start_date â€“ a date value that represents the start date.
 end_date â€“ a date value that represents the end date.
 [holidays] â€“ (this is an Optional argument) This argument specifies the dates that are holidays and need to be excluded when calculating net working days. These could be public/national holidays. You can have these holidays in a range of cells and use the reference in this argument or create a named range for these cells and use the named range in the formula. You could alsoÂ import a rangeÂ if you so desire.
Now let’s see an example where we calculate the number working days between two dates.
Suppose you have a data set as shown below and you want to calculate the number of working days for each activity (the result should exclude holidays and Saturdays/Sundays).
Below is the formula that will give you the total number of working days:
=NETWORKDAYS(B2,C2,$F$2:$F$5)
In most cases, the weekend days are Saturday and Sunday.
However, it may not always be the case.Â For example, in some countries, the weekend days are Friday and Saturday, and in some jobs, you may have a working Saturday and only Sunday is the weekend holiday.
In such cases, you need to use the NETWORKDAYS.INTL function.
Let’s first have a look at the syntax of the NETWORKDAYS.INTL function in Google Sheets.
NETWORKDAYS.INTL Function – Syntax & Arguments
NETWORKDAYS.INTL stands for Networkdays International function.
=NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays])
 start_date â€“Â a date value that represents the start date.
 end_dateÂ â€“ a date value that represents the end date.
 [weekend] â€“Â (Optional) Here, you can specify the weekend. There are two ways you can specify the weekend. It could be a string of numbers or a numeric value. If you omit this, Saturday and Sunday are taken as the weekend.
 Using String of numbers – in this function, seven days are represented by seven numbers (each number being a 0 or a 1). A ‘0’ would mean a working day a ‘1’ would mean a nonworking day. So the string for a week with Saturday and Sunday as weekend (nonworking days) would be “0000011”, where the first number represents Monday, second represents Tuesday and so on.
 Using a Number – 1 represents Saturday and Sunday as weekends, 2 represents Sunday and Monday and weekend as so on. You can use a number between 1 to 7 for all combinations of 2 consecutive weekend days. If you only have one single day as weekend day, use numbers from 1117. 11 means that only Sunday is the weekend, 12 means that only Monday is the weekend and so on.
 [holidays] â€“ (this is an Optional argument) This argument specifies the dates that are holidays and need to be excluded when calculating net working days. These could be public/national holidays. You can have these holidays in a range of cell and use the reference in this argument or create a named range for these cells and use the named range in the formula.
Now let’s see an example where we need to calculate the number of working days between two dates and the weekend days are Friday and Saturday.
Below is the formula that will give us the number of working days for each activity:
=NETWORKDAYS.INTL(B2,C2,7,$F$2:$F$5)
Note that the third argument of the formula is 7, which is the number that represents Friday and Saturday and weekend days.
If you want to use the string method of specifying weekends, you can use the below formula and it will give the same result:
=NETWORKDAYS.INTL(B2,C2,"0000110",$F$2:$F$5)
Remember the 0 in the string represents a working day and 1 represents a nonworking day. “0000110” means that Friday and Saturday are nonworking days.
Calculate the Number of Weekends Days Between Two Dates in Google Sheets
To calculate the number of weekends days between two dates, we can use the NETWORKDAYS function along with the DAYS function.
Suppose you have the data set as shown below:
Here is the formula that will give you the total number of weekend days between two specified dates in Google Sheets:
=DAYS(B2,A2)+1NETWORKDAYS(A2,B2)
Note that here we have assumed that the weekend days are Saturday and Sunday. In case you want to calculate it for days other than Saturday and Sunday, use the NETWORKDAYS.INTL function.
Calculating the Number of Mondays Between Two Dates
Sometimes, when scheduling classes for student or creating project plans, you may want to know exactly how many Mondays, or Tuesdays, or any other specific days are there between two dates.
You can use the NETWORKDAYS.INTL function to get the number of any specific day(s) in Google Sheets. The trick here is to specify only Monday as the working day and all the remaining days as the nonworking days.
Here is the formula that will give the number of Mondays between two dates:
=NETWORKDAYS.INTL(A2,B2,"0111111")
Note that the string used in the formula is “0111111”. This string means that Monday is a working day and all other days are nonworking days.
Hence this formula only returns the number of Mondays.
You can use the same concept to find the number of any other weekday or combinations of weekdays. A situation where this could be useful is when you want to calculate the number of working days in a parttime job (where let’s say you work only on Mondays and Wednesdays).
Now you know how to calculate the number of days between dates in Google Sheets. We hope this was useful for you!
You May Also Like the Following Google Sheets Tutorials:
 How to Create a Drop Down List in Google Sheets.
 The Ultimate Guide to Google Sheets VLOOKUP Function.
 How to Quickly Freeze / Lock Rows in Google Sheets.
 Using Query Function in Google Sheets.
 How to Use COUNTIF Function in Google Sheets.
 Google Sheets Weekday Function – Explained with Examples
 How To Calculate Weighted Average In Google Sheets
Google Sheets and Microsoft Excel Expert.

Sumithttps://productivityspot.com/author/sumitbansal23/

Sumithttps://productivityspot.com/author/sumitbansal23/

Sumithttps://productivityspot.com/author/sumitbansal23/

Sumithttps://productivityspot.com/author/sumitbansal23/