We have the following dataset containing some workers’ names and dates of Birth (DOB). We will show some step-by-step methods to calculate their age in Excel in years and months.
Method 1 – Using the Excel DATEDIF Function to Calculate Age in Years and Months
Steps:
- Select cell D5.
- Enter the following formula:
=DATEDIF(C5,$C$14,"y")&" Years "&DATEDIF(C5,$C$14,"ym")&" Months "
Here, in the DATEDIF function, we selected cell C5 as start_date, and cell C14 as end_date. We used “y” and “ym” as units to calculate the year and month.
- Press ENTER to get the age value in years and months.
- Drag down the Fill Handle tool to AutoFill the formula for the rest of the cells.
You will get the age values calculated using the DATEDIF function.
Method 2 – Combining DATEDIF and TODAY Functions to Calculate Age
Steps:
- Select cell D5.
- Enter the following formula:
=DATEDIF(C5,TODAY(),"y")&" Years "&DATEDIF(C5,TODAY(),"ym")&" Months "
Here, in the DATEDIF function, we selected cell C5 as start_date and used the TODAY function to get today’s date as end_date. We used “y” and “ym” respectively as units to calculate the year and month.
- Press ENTER to get the age value in years and months.
- Drag down the Fill Handle tool to AutoFill the formula for the rest of the cells.
You will get the age values calculated using the DATEDIF and TODAY functions.
Method 3 – Using DATEDIF and DATE Functions to Calculate Age in Years and Months
Steps:
- Select cell D5.
- Enter the following formula:
=DATEDIF(C5,DATE(2022,6,13),"Y")&" Years "&DATEDIF(C5,DATE(2022,6,13),"YM")&" Months"
Here, in the DATE function, we used today’s date. In the DATEDIF function, we selected cell C5 as start_date and used the DATE function as end_date. We used “y” and “ym” as units to calculate the year and month.
- Press ENTER is used to get the age value in years and months.
- Drag down the Fill Handle tool to AutoFill the formula for the rest of the cells.
You will get the age values calculated using the DATEDIF and DATE functions.
Read More: How to Calculate Age in Excel in dd/mm/yyyy
Method 4 – Using YEARFRAC Function to Calculate Age in Excel
Steps:
- Select cell D5.
- Enter the following formula:
=YEARFRAC(C5,TODAY(),1)
In the YEARFRAC function, we used C5 as the start date, the TODAY function as the end date, and 1 as a basis.
- Press ENTER to get the age value for the year.
- Drag down the Fill Handle tool to AutoFill the formula for the rest of the cells.
You will get the values of Age in years.
- Select cell E5.
- Enter the following formula:
=D5*12
- Press ENTER to get the age value for the year.
- Dag down the Fill Handle tool to AutoFill the formula for the rest of the cells.
You will get the age values in months.
Method 5 – Using Combined Excel Formula to Calculate Age in Years and Months
Steps:
- Select cells D5:E12.
- From the Home tab, go to Number.
- Select General.
- Select cell D5.
- Enter the following formula:
=(YEAR(NOW())-YEAR(C5))*12+MONTH(NOW())-MONTH(C5)
Here, we first calculated the year difference between the DOB and NOW, which returns the date and time of today. Then, we converted it into months and added this value to the rest of the months.
- Press ENTER to get the age value for the year.
- Drag down the Fill Handle tool to AutoFill the formula for the rest of the cells.
You will get the age values in months.
- Select cell E5.
- Enter the following formula:
=D5/12
- Press ENTER to get the age value for the year.
- Drag down the Fill Handle tool to AutoFill the formula for the rest of the cells.
You will get the values of age in Years.
Read More: Excel Formula to Calculate Age on a Specific Date
Download the Practice Workbook
Related Articles
- How to Convert Date of Birth to Age in Excel
- How to Calculate Age in Excel for Entire Column
- How to Calculate Current Age in Excel
- How to Calculate Age Between Two Dates in Excel
- Excel VBA: Calculate Age from Date of Birth
<< Go Back to Calculate Age | Date-Time in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!
I am a simple user without much knowledge on the subject.
For a long time I was looking for a formula that would give an age that would include years and months together. After realizing that the caption that appears can be changed, I was infinitely happy. Many many many thanks
Dear Rafi,
Thanks for your appreciation.
Regards
ExcelDemy