# Calculating the Difference Between Two Dates in Google Sheets

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.

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

May 13, 2024
April 25, 2024
April 19, 2024
April 18, 2024
April 18, 2024

## One Reply to “Calculating the Difference Between Two Dates in Google Sheets”

1. Kezia says:

LOVE your posts – very clear & easy to follow.

Feedback: You should put the formulas also as text, not just in the image – so people can copy & paste.