How to Calculate the Difference Between Dates in Google Sheets

To calculate the difference between dates in Google Sheets, you can use the DATEDIF function, which calculates the difference between two dates and returns the result in days, months, or years. Here's how to use the DATEDIF function in Google Sheets:

  1. Open your Google Sheet, and click on an empty cell where you want to display the difference between dates.
  2. Enter the DATEDIF function using the following syntax:
=DATEDIF(start_date, end_date, "unit")
  1. Close the parenthesis and press Enter. The result will be displayed in the selected cell.

Example

Let's say you have these two dates in your Google Sheet, and you want to calculate the difference in days, months, and years:

To calculate the difference in days, you can use the following formula in an empty cell:

=DATEDIF(A1, A2, "D")

To calculate the difference in months, you can use the following formula in another empty cell:

=DATEDIF(A1, A2, "M")

To calculate the difference in years, you can use the following formula in another empty cell:

=DATEDIF(A1, A2, "Y")

The results will be displayed in the respective cells:

Did you find this useful?