# Google Sheets: Calculate the Number of Months Between Dates

You can use the following formulas to calculate the number of months between two dates in Google Sheets:

Formula 1: Calculate Full Months Between Two Dates

```=DATEDIF(A2,B2,"m")
```

Formula 2: Calculate Fractional Months Between Two Dates

```=DATEDIF(A2, B2, "m") + DATEDIF(A2, B2, "md")/(365/12)
```

Both formulas assume that cell A2 contains the start date and cell B2 contains the end date.

The following examples show how to use each formula in practice.

### Example 1: Calculate Full Months Between Two Dates

The following screenshot shows how to calculate the number of full months between a list of start and end dates in Google Sheets: Here’s how to interpret the output:

• There is 1 full month between 1/1/2022 and 2/4/2022.
• There are 4 full months between 1/7/2022 and 5/29/2022.
• There are 0 full months between 1/20/2022 and 2/5/2022.

And so on.

### Example 2: Calculate Fractional Months Between Two Dates

The following screenshot shows how to calculate the number of fractional months between a list of start and end dates in Google Sheets: Here’s how to interpret the output:

• There are approximately 1.099 months between 1/1/2022 and 2/4/2022.
• There are approximately 4.723 months between 1/7/2022 and 5/29/2022.
• There are approximately 0.526 months between 1/20/2022 and 2/5/2022.

And so on.

Note #1: This formula uses 365/12 to approximate the number of days in a month. You can replace this value with 30 if you’d like to simplify the formula and make the assumption that a typical month has 30 days.

Note #2: You can find the complete documentation for the DATEDIF function in Google Sheets here.