In project management, it is common to set deadlines for different parts of the project. While the start and end dates are usually shown in the chart, the time in between is not often clear. In this article, we will learn how to calculate years and months between two dates in excel.
➤ Take a helper column with the same rows
➤ Insert this formula:
=DATEDIF(C2,D2,”y”)&” years “&DATEDIF(C2,D2,”ym”)&” months “
➤ Replace C2 with the cell containing the first date, and D2 with the cell containing the second date.
➤ Press Enter, and autofill other cells if you want.
That was an easy solution, but there is more. If you want to use the formula in the future, it would be better to understand how it works. To know about the functions and the explanation, keep reading.
Steps to Calculate Years and Months Between Two Dates in Excel
In this dataset, we have the schedule for a project. There are assigned dates and due dates, but not the durations. We are going to add that to make it clear for the project executives. Follow the steps below:
Step 1: Add a Helper Column
➤ Go to the rightmost cell of the dataset and choose the cell to the right of it.
➤ Add a sensible heading to it; we are choosing Duration
Step 2: Use the DATEDIF Function
➤ In the first cell of the new column under the heading, write this formula:
=DATEDIF(C2,D2,”y”)&” years “&DATEDIF(C2,D2,”ym”)&” months ”
➤ Replace C2 with your starting date, and D2 with the ending date, and press Enter.
Step 3: Autofill the Other Cells
➤ Select the cell where you have entered the formula.
➤ Find the little plus (+) sign in the lower right corner of the cell.
➤ Drag that sign to the last cell of the column using your mouse.
Frequently Asked Questions
Why I can’t use DATEDIF in Excel?
The function will not show up naturally in excel, as it is an undocumented function. But if you use the parameters correctly, it will work.
What is today’s formula in Excel?
Write this formula for today’s date: =TODAY()
Can Excel calculate days between dates?
Use this formula to calculate the days between dates: =DAYS(D2, C2)
Replace D2 with the end date, and C2 with the start date.
What is the formula between two dates in Excel?
If you only want the days, you can use just the minus sign. Write the formula like this: =D2-C2
Replace D2 with the end date, and C2 with the start date.
How to calculate age in Excel?
Use this formula: =INT((TODAY()-A1)/365.25)
Replace A1 with the cell that has the birthdate, and the formula will return the age in years.
Wrapping Up
In this article, we have learned how to calculate years and months between two dates in excel. We hope that you learned something from this article, and the explanation was enough for you to implement the formula in your real life. Consider leaving a comment, and do not forget to download the practice file for your own use.