4.2 C
London
Friday, December 20, 2024
HomeSoftware TutorialsGoogle SheetsCalculating the Difference Between Two Dates in Google Sheets

Calculating the Difference Between Two Dates in Google Sheets

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

We can use the DATEDIF() function to calculate the difference between two dates in Google Sheets.

This function uses the following syntax:

=DATEDIF(start_date, end_date, unit)

where:

  • start_date: The start date
  • end_date: The end date
  • unit: Unit of time to use (“Y”, “M”, “D” for years, months, dates)

The following examples show how to use this function to calculate the difference between two dates in Google Sheets.

Example 1: Difference in Days

The following image shows how to calculate the difference (in days) between two dates:

This tells us that there are 1,127 full days between 1/1/2018 and 2/1/2021.

Example 2: Difference in Months

The following image shows how to calculate the difference (in months) between two dates:

Example 3: Difference in Years

The following image shows how to calculate the difference (in years) between two dates:

Example 4: Difference in Years & Months

The following image shows how to calculate the difference (in years and months) between two dates:

The difference between the start and end dates is 3 years and 1 month.

Additional Resources

The following tutorials explain how to perform other common operations in Google Sheets:

How to Compare Two Columns in Google Sheets
Google Sheets: How to Sum Across Multiple Sheets
Google Sheets: How to Use SUMIF with Multiple Columns

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories