We use dates for various reasons in Google Sheets. Sometimes we need to find information out of dates like age, duration, job experience, and other things. At these times we need to find the difference between the two dates. In this article, you will learn how to calculate the number of months between two dates in Google Sheets.
A Sample of Practice Spreadsheet
You can download the practice spreadsheet from the download button below.
3 Useful Examples of Calculating Number of Months Between Two Dates in Google Sheets
Here, the dataset contains two columns named Start Date and End Date. Now, we will find out the number of months between the two dates in Google Sheets.
Follow the article below to find out the number of months.
1. Calculating Full Months
You can use the DATEDIF function to calculate full months between two specific dates in Google Sheets. The DATEDIF function finds the difference between two dates. It returns the day, month, and year between two given dates as arguments.
Follow the steps below to learn how to do that.
📌 Steps:
- In the beginning, select cell D5 and insert the following formula.
=DATEDIF(B5,C5,"m")
- Next, drag down the fill handle tool to copy the formula to the following cells.
- Finally, you will get the months between the dates for all cells in the table.
Read More: Calculate Number of Years Between Two Dates in Google Sheets
Similar Readings
- How to Find Correlation Between Two Columns in Google Sheets
- Insert Rows Between Other Rows in Google Sheets (4 Easy Ways)
- How to Move Between Tabs in Google Sheets (3 Easy Ways)
- Google Sheets Count Cells Between Two Numbers with COUNTIF Function
- How to Use IF Condition Between Two Numbers in Google Sheets
2. Finding Fractional Months
It is also possible to find the fractional months between two dates. You can use the DATEDIF function to do that. See the steps below to do it by yourself.
📌 Steps:
- First, enter the following formula in cell D5.
=DATEDIF(B5,C5,"m")+DATEDIF(B5,C5,"md")/(365/12)
Formula Breakdown
- DATEDIF(B5,C5,”m”): It will return the full months between the dates mentioned in B5 and C5.
- DATEDIF(B5,C5,”md”)/(365/12): This will return the remaining days between two given dates in a fractional month.
- Subsequently, double-click or drag down the fill handle tool to copy the formula up to D9.
- As a result, you will get all the required fractional months.
Read More: How to Calculate Hours Between Two Times in Google Sheets
3. Calculating Months with Days
Furthermore, we can get both months and days between two dates using the DATEDIF formula. In the next few steps, the process to do that is mentioned.
📌 Steps:
- Initially, select cell D5 and insert the following formula in the formula bar.
=DATEDIF(B5,C5,"m")&" Months and "&DATEDIF(B5,C5,"md")&" Days "
Formula Breakdown
- DATEDIF(B5,C5,”m”): This will return the months between cell B5 and cell C5.
- &” Months and “: It will add “Months and” following the returned value.
- &DATEDIF(B5,C5,”md”): The “md” will return the remaining days subsequently after the months.
- &” Days “: This will add “Days” following the previous result.
- After that, use the fill handle tool and copy.
- Finally, the output will be in all the relevant cells.
Read More: How to Calculate Time Between Dates in Google Sheets (6 Ways)
Things to Remember
- Please keep in mind that the units in the formulas must be inside inverted commas.
- The DATEDIF function does not count the first day in the calculation.
Conclusion
We have tried to show you some examples of calculating the number of months between two dates in Google Sheets. Hopefully, the examples above will be enough for you to understand the applications of the function. Please use the comment section below for further queries or suggestions. You may also visit our OfficeWheel blog to explore more about Google Sheets.
Related Articles
- How to Find Missing Values Between Two Columns in Google Sheets
- Conditional Formatting Between Two Values in Google Sheets
- How to SUMIF Between Two Dates in Google Sheets (3 Ways)
- Generate Random Numbers or Text Between Limits in Google Sheets
- How to Find Unique Values Between 2 Columns in Google Sheets
- Calculate Percentage Difference Between Two Numbers in Google Sheets
- How to Filter Between Two Dates in Google Sheets