In this article:

How to Subtract Dates in Google Sheets (Best Method!)

May 8, 2024

It is not uncommon for spreadsheet users to find themselves in a situation where they need to subtract dates in Google Sheets. Thankfully Google Sheets has multiple methods available to subtract or find the time difference between two dates. In this article we will cover all of them.  

Click here to follow the examples below with our sample data

Minus Sign METHOD

Syntax

=final_date - initial_date

Where initial_date and final_date use one of the following formats:

  1. In YYYY/MM/DD format enclosed in double quotes
  2. References to the cells storing initial and final dates, respectively

Step 1: Identify the initial and final date

Initial and final dates

The initial date is at column A while the final date is at column B. 

Step 2: Apply the formula final_date - initial_date

Format 1: April 8, 2022 should be written as “2022/04/08” and June 1, 2022 as “2022/06/01”:

="2022/06/01"-"2022/04/08"

Format 2: For Row 2, the initial date is at A2 while the final date is at B2. The formula becomes:

=B2-A2

Step 3: Press Enter

Minus sign method output

DAYS Method

Syntax

=DAYS(final_date,initial_date)

Where initial_date and final_date use one of the following formats:

  1. In YYYY/MM/DD format enclosed in double quotes
  2. References to the cells storing initial and final dates, respectively

Step 1: Identify the initial and final date

Initial and final dates

The initial dates are at column A while the final dates are at column B. 

Step 2: Apply the formula =DAYS(final_date,initial_date)

Format 1: April 8, 2022 should be written as “2022/04/08” and June 1, 2022 as “2022/06/01”:

=DAYS("2022/06/01","2022/04/08")

Format 2: For Row 2, the initial date is at A2 while the final date is at B2. The formula becomes:

=DAYS(B2,A2)

Step 3: Press Enter

Days function method output

DATEDIF Function Method

The DATEDIF function does the same thing as the Days function but detects whether you have incorrectly set the order of initial and final dates.

Syntax

=DATEDIF(initial_date,final_date,”D”)

Where initial_date and final_date use one of the following formats:

  1. In YYYY/MM/DD format enclosed in double quotes
  2. References to the cells storing initial and final dates, respectively

The “D” option in the function ensures that the output is counted in days. You can change it to other options; “M” sets the output in terms of months. 

Step 1: Identify the initial and final date

Initial and final dates

The initial dates are at column A while the final dates are at column B. 

Step 2: Apply the formula =DATEDIF(initial_date,final_date,”D”)

Format 1: April 8, 2022 should be written as “2022/04/08” and June 1, 2022 as “2022/06/01”:

=DATEDIF("2022/06/01","2022/04/08",”D”)

Format 2: For Row 2, the initial date is at A2 while the final date is at B2. The formula becomes:

=DATEDIF(B2,A2,”D”)

Step 3: Press Enter

Datedif method output

The function detects when you accidentally switched the initial and final dates in the formula, giving out the #NUM! error.

DAYS360 Function Method

The DAYS360 function is designed to accommodate financial calculations that define a year as having 360 days.

Syntax

=DAYS360(initial_date,final_date)

Where initial_date and final_date use one of the following formats:

  1. In YYYY/MM/DD format enclosed in double quotes
  2. References to the cells storing initial and final dates, respectively

Step 1: Identify the initial and final date

Initial and final dates

The initial dates are at column A while the final dates are at column B. 

Step 2: Apply the formula =DAYS360(initial_date, final_date)

Format 1: April 8, 2022 should be written as “2022/04/08” and June 1, 2022 as “2022/06/01”:

=DAYS360("2022/06/01","2022/04/08",”D”)

Format 2: For Row 2, the initial date is at A2 while the final date is at B2. The formula becomes:

=DAYS360(B2,A2)

Step 3: Press Enter

Days360 method output

NETWORKDAYS Method

This function counts only the workdays between two dates, essential for estimating the number of days for business transactions.

Syntax

=NETWORKDAYSinitial_date,final_date,holidays)

Where initial_date and final_date use one of the following formats:

  1. In YYYY/MM/DD format enclosed in double quotes
  2. References to the cells storing initial and final dates, respectively

Besides weekends, the function can also deduct holidays as long as you specify it in the holidays. The list can be either stored in a range or added to the formula by wrapping it in DATEVALUE function. For this article, we will store the list in another range.

Step 1: Identify the initial and final date

Initial and final dates

The initial dates are at column A while the final dates are at column B. 

Step 2: Apply the Formula

Format 1: April 8, 2022 should be written as “2022/04/08” and June 1, 2022 as “2022/06/01”: 

=NETWORKDAYS("2022/06/01","2022/04/08")

The list of holidays is stored in E2:E5:

=NETWORKDAYS("2022/06/01","2022/04/08",E2:E5)

Format 2: For Row 2, the initial date is at A2 while the final date is at B2. The formula becomes:

=NETWORKDAYS(B2,A2)

The list of holidays is stored in E2:E5:

=NETWORKDAYS(B2,A2,E2:E5)

Step 3: Press Enter

Networkdays method output

If you enjoyed this article, you might also like our article on how to subtract time in Google Sheets or our article on how to change column width in Google Sheets. 

If you want to learn how to set up data validation for email addresses in Google Sheets, we also suggest checking out our detailed guide.

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.
Get your copy of our free Google Sheets automation guide!
  • 27 pages of Google Sheets tips and tricks to save time
  • Covers pivot tables and other advanced topics
  • 100% free

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->