How To Calculate Age in Excel [12 Easy Examples]

Calculating ages can be a tedious affair if youโ€™re doing it manually. Luckily, Excel provides several functions and techniques to calculate age based on a person’s date of birth using the current date or a specific date.

Using these tools, you can generate precise age calculations with ease. In this guide, we will explore different methods to calculate age in Excel, accommodating both the current date and specific reference dates. Read on to learn more.

How To Calculate Age in Excel

Hereโ€™s how Excel can calculate DOB to age:

  1. In a cell, type in the โ€œequalsโ€ sign (=) and the โ€œDATEDIFโ€ย function.
  2. Select the cell with the date of birth.
  3. Add a comma and write the โ€œTODAYโ€ย function.
  4. Add another comma and โ€œyโ€ in quotation marks to return the results in years.
  5. Press โ€œEnterโ€ย and drag the formula down to copy it.

How Do You Calculate Age in Excel? (Which Functions)

There are a couple of different functions you can use in Excel to calculate age, just like in Google Sheets. The most commonly used function is the โ€œDATEDIFโ€ย function. However, you can also use other functions like โ€œYEARFRACโ€ย and โ€œROUNDDOWN.โ€

Weโ€™ll cover all of the ways Excel can convert data to age. You can take your pick from the table of contents below!

Related:ย Google Sheets vs. Microsoft Excel

How To Calculate Age from Date of Birth in Excel in Years

You can calculate a person’s age in Excel from their date of birth to their current date. To do this, youโ€™ll need to use the โ€œDATEDIFโ€ย function along with the โ€œTODAYโ€ย function or a specific date.

The โ€œDATEDIFโ€ย function in Excel calculates the difference between two dates in various units, such as years, months, or days.

The syntax of the โ€œDATEDIFโ€ย function is as follows:

=DATEDIF(start_date, end_date, unit)
  • start_date: The starting date or the earlier date in the calculation.
  • end_date:ย The ending date or the later date in the calculation.
  • unit:ย The unit of measurement to calculate the difference. It can be one of the following options:
    • “y” – Calculates the difference in complete years.
    • “m”ย – Calculates the difference in complete months.
    • “d”ย – Calculates the difference in days.
    • “ym”ย – Calculates the difference in months, excluding years.
    • “md”ย – Calculates the difference in days, excluding years and months.

For this example of how to calculate current age in Excel, weโ€™ll be using the worksheet below:

Calculate age in Excelโ€”Example worksheet for the first DATEDIF calculation

Here’s a step-by-step guide for how to convert DOB to age in Excel:

  1. In a cell, type in the โ€œequalsโ€ย sign (=) and the โ€œDATEDIFโ€ function.
In a cell, type in the equal sign and the DATEDIF function.
  1. Select the cell with the date of birth.
Select the cell with the date of birth.
  1. Add a comma and write the โ€œTODAYโ€ function.
Add a comma and write the TODAY function.
  1. Add another comma and โ€œyโ€ to return the results in years.
Type "y" to specify years
  1. Press โ€œEnterโ€ to calculate age in Excel from a birthday. Click and drag the formula if you want to apply it to other cells.
    Click Enter and drag the formula down to copy it.

The complete formula will be:

=DATEDIF(B2, TODAY(), "y")

This formula calculates the difference in years between the date of birth (cell B2) and the current date.

How To Calculate Age from Date of Birth in Months

You can calculate a person’s age in Excel from their date of birth to the current date in months. To do this, youโ€™ll need to use the โ€œDATEDIFโ€ function along with the โ€œTODAYโ€ function or a specific date.

For this example of how to calculate age from DOB in Excel, weโ€™ll be using the worksheet below:

Calculate age in Excelโ€”Example worksheet for the first DATEDIF calculation

Here’s a step-by-step guide for how to convert DOB to age in Excel:

  1. In a cell, type in the โ€œequalsโ€ย signย (=) and the โ€œDATEDIFโ€ function.
In a cell, type in the equal sign and the DATEDIF function.
  1. Select the cell with the date of birth.
Select the cell with the date of birth.
  1. Add a comma and write the โ€œTODAYโ€ function.
Add a comma and write the TODAY function.
  1. Add another comma and โ€œmโ€ to return the results in years.
Use "m" to get the results in months
  1. Press โ€œEnterโ€ and drag the formula down to copy it.
Click and drag the formula down to apply it to other cells

The complete formula will be:

=DATEDIF(B2, TODAY(), "m")

To get the age in days, you can follow the same procedure and replace the โ€œmโ€ with โ€œdโ€ in the formula.

How To Calculate Age Between Two Dates

You can also use the โ€œDATEDIFโ€ function to calculate the age between two dates in Excel. This function allows you to determine the difference in years, months, or days between two dates.

Weโ€™ll use the following example to calculate the age between two dates:

Sample data for calculating age between 2 dates

The syntax for this formula is:

=DATEDIF(start_date, end_date, "y")

Here’s a step-by-step guide on how to calculate the age between two dates in Excel:

  1. In a cell, type in the equal sign and the โ€œDATEDIFโ€ function.
Add the DATEDIF function to the results cell
  1. Select the cell with the start date.
Select the cell with the start date
  1. Add a comma and select the cell with the end date.
Select the cell with the end date
  1. Add another comma and โ€œyโ€ to return the results in years.
An example of the complete the formula to calculate age between two dates
  1. Press โ€œEnterโ€ and drag the formula down to copy it.
Drag the formula to other cells to apply it to them

The complete formula will be:

=DATEDIF(A2,B2, "y")

To calculate age more precisely, you can include months or days in the formula. To include months in the calculation, change the last argument of the formula to “ym.

The formula would be:

=DATEDIF(start_date, end_date, "ym")

To include days in the calculation, change the last argument of the formula to “md.

The formula would be:

=DATEDIF(start_date, end_date, "md")

How To Calculate Age on a Specific Date

You can also use a specific date instead of using today or the current date. For example, in our worksheet, instead of working with the current date, we can use the specific date, 7/20/22.

An example spreadsheet to calculate age from a specific date

Hereโ€™s how to calculate age from DOB in Excel to a specific date:

  1. In a cell, type in the equal sign and the โ€œDATEDIFโ€ function.
In a cell, type in the equal sign and the DATEDIF function.
  1. Select the cell with the date of birth.
Select the cell with the date of birth.
  1. Add a comma and select the cell with the specific date.
Select the specific date
  1. Press F4 to lock the second cell reference if you do not want to change the reference.
Make the cell use an absolute reference by pressing F4
  1. Add another comma and โ€œyโ€ in quotation marks to return the results in years.
Use "y" to get your results in years
  1. Press โ€œEnterโ€ and drag the formula down to copy it.
An example of the application of the completed formula

The formula for this will be:

=DATEDIF(B2, $B$11, "y")

This formula calculates the difference in years between the date of birth in cell B2 and the specific date in cell B11 using the โ€œDATEDIFโ€ function.

The โ€œDATEDIF” functionย returns the age as a whole number of years. If you need a more precise age calculation, you can modify the formula to include months and days by changing the units argument.

How To Get Age from Birthday in Years, Months, and Days.

If you want to get the age in years, months, and days, it can get a little complicated. You can use a combination of functions, such as โ€œDATEDIF,โ€ โ€œYEAR,โ€ โ€œMONTH,โ€ โ€œDAY,โ€ and โ€œTODAY.โ€

Youโ€™ll need to combine three formulas for each of the formats.

Here’s a step-by-step guide for how to use the formula to calculate age in years, months, and days:

  1. In a cell, type in the โ€œequalsโ€ (=) sign and the โ€œDATEDIFโ€ function.
In a cell, type in the equal sign and the DATEDIF function.
  1. Select the cell with the DOB.
Select the cell with the date of birth
  1. Now we start with the first formula for the year. Add the formula โ€œTODAY(),”Y”)โ€
Add "y" to specify years
  1. Add the word & โ€yearsโ€ in quotations to separate the years from the rest.
Add text "years" to make the data easier to read
  1. Next, we can add the second formula for the months. Add โ€œDATEDIF(B2,TODAY()โ€
Add a second datedif function with months
  1. Add the word โ€œmonthsโ€ in quotations to separate the years from the rest.
Add the "Months" text to make the results easier to read
  1. Finally, the last formula for the days is:
    DATEDIF(B2,TODAY(),"MD")
Use another DATEDIF function to add days
  1. Add the word โ€œdaysโ€ in quotation marks.
Add "Days" text to make the results easeir to read
  1. Close the brackets and press โ€œEnter.โ€
Example results from the full formula for years months and days
  1. Copy the formula to the rest of the cells.
Click and drag to apply the formula to the other rows

The age will be calculated and displayed in cell B2, showing the years, months, and days.

With this formula, you can calculate the age from a birthday and display it in years, months, and days in Excel. It allows for a more detailed representation of the age, providing a comprehensive understanding of the time elapsed since the date of birth.

How To Calculate When a Person Will Reach a Certain Age

You can also find out the exact date a person will turn a specific age in Excel using the โ€œDATEโ€ function if you have their date of birth.

For this example, weโ€™ll be using the following worksheet. In our example sheet, we can determine the date the people will be 25 years old.

To do this, weโ€™ll use the โ€œDATEโ€ and โ€œYEARโ€ functions. The date function will help us find the exact date, while the โ€œYEARโ€ function will make sure that we are working with years in the formula.

The sample date to show how to figure the future date for an age

Hereโ€™s how to calculate when a person will reach a certain age in Excel:

  1. In the cell, enter the equal sign and the โ€œDATEโ€ function.
Add the DATE function
  1. After the bracket, add the โ€œYEARโ€ function.
Add the YEAR function
  1. Select the cell with the date of birth and close the brackets.
Add the cell with the date of birth in it to the formula
  1. Add โ€œ+25โ€ or the age that you want to use.
Add + 25 to the formula to specify the age of 25
  1. Add a comma, then add the โ€œMONTHโ€ function.
  2. In the brackets, select the cell with the date of birth
  3. Add a โ€œDAYโ€ function, then select cell B2 again.
Add the DAY function and select the same source cell again
  1. Close the brackets and press โ€œEnter.โ€
  2. Copy the formula to the rest of the columns.
An example of the DATA function defining age at a specified date

The complete formula is as follows:

=DATE(YEAR(B2)+25, MONTH(B2), DAY(B2))

How To Create an Age Calculator in Excel

In a few simple steps, you can also automate calculating age in Excel. Creating an age calculator in Excel allows you to quickly calculate the age based on a person’s date of birth.

Here’s a step-by-step guide on how to create an age calculator in Excel:

  1. Create a cell for the date of birth.Use a sample date of birth to first create an age calculator
  1. Create another section for the current age.
  2. In the cell for the current age, add the formula:
    =DATEDIF($B$1,TODAY(),"y")
An example of the formula you would use for an age calculator

If you want to calculate a person’s age, all you need to do now is put their date of birth in cell B1.

Example Results from the age calculator

This lets you quickly find the age of a person with just their date of birth. Automating this function will make your workflow smoother and faster.

Related: The Best Excel Alternatives for macOS

How To Calculate Age in Excel Without DATEDIF

If you prefer to calculate age in Excel without using the โ€œDATEDIFโ€ function, you can achieve the same result using other built-in functions.

Some of the alternative functions include:

  1. โ€œYEARFRACโ€
  2. โ€œSUBTRACTโ€
  3. โ€œROUNDDOWNโ€
  4. โ€œYEARโ€

These functions all work in different ways, and some of them need to be customized to be more accurate. Below, weโ€™ll show you how to use each function with an example.

How To Calculate Age Using the YEARFRAC Function

The โ€œYEARFRACโ€ function is one of the most straightforward functions you can use for calculating age in Excel.

The syntax for โ€œYEARFRACโ€ is:

=YEARFRAC(Birth_Date,Specific_Date) 

However, this formula usually returns the age with decimal points. In order to return a whole number instead, we add the function โ€œINT.โ€

The complete formula is:

=INT(YEARFRAC(Birth_Date, Specific_Date))

Hereโ€™s how to calculate age in Excel using the โ€œYEARFRACโ€ fraction:

  1. In a cell, type in the โ€œequalsโ€ (=) sign and โ€œINTโ€ function.
Place the INT function into the cell
  1. Add the โ€œYEARFRACโ€ function.
Immediately after the INT function, add the YEARFRAC function
  1. Select the cell with the date of birth.
Select the cell with the DOB in it
  1. Add a comma and write the โ€œTODAYโ€ function or select the cell with the specific date.
Select the cell with the specified date as the second argument
  1. Close the brackets.
  2. Press โ€œEnterโ€ and drag the formula down to copy it.
An example of the INT function calculating age

How To Calculate Age in Excel by Subtracting

You can also easily get the age in Excel by subtracting the date of birth from the end date. This is a simple way, but it usually returns the age in days, so weโ€™ll need to customize the formula to return the age in years. You can do this by adding โ€œ/365โ€ to the formula to divide the days into years.

Hereโ€™s how to calculate age from date of birth by subtracting:

  1. In the cell type, the โ€œequalsโ€ sign (=) and an opening brackets
  2. Add the โ€œTODAYโ€ function.
Add the TODAY function to the results cell
  1. Type the โ€œminusโ€ sign (-).
  2. Select the cell with the date of birth.
Add the DOB as the first agument
  1. Close the brackets and add โ€œ/365.โ€
Divide the results by 365 to get the results in years

This gives you the age of the person on the current date.

If you want to use a specific date other than the current date, then hereโ€™s what to do:

  1. In the cell type, the โ€œequalsโ€ (=) sign and an opening bracket.
  2. Select the specific date. Remember to lock the cell by clicking the F4 button.
  3. Type the โ€œminusโ€ (-) sign.
  4. Select the cell with the date of birth.
How to calculate age from a specific date instead
  1. Close the brackets and add โ€œ/365.โ€
Example results from subtracting from a specified date

Both these formulas will give you decimal points. If youโ€™d like to have whole numbers, instead, you can select the cells and format them to remove the decimal points.

In the home tab, under numbers, you can click the decrease decimal points option to remove them.

How to remove decimal places

How To Calculate Age Using the ROUNDDOWN Function

Another function you can use is the โ€œROUNDDOWNโ€ function. The function is mostly used to remove the decimal points in formulas. In this case, all weโ€™ll be doing is subtracting the specific date and the date of birth.

The syntax for the โ€œROUNDDOWNโ€ function is:

=ROUNDDOWN((Specific_Date - Birth_Date)/365,0) ย 
  1. In a cell, type in the โ€œequalsโ€ sign (=) and โ€œROUNDDOWNโ€ function.
Add the RUNDOWN formula to the results cell
  1. Select the cell with the specific date and add a โ€œminusโ€ sign (-). Remember to lock the specific date cell reference by clicking F4.
Select the specified date as the first argument
  1. Select the cell with the date of birth.
Take away the birth date from the specific date
  1. Close the brackets. And add โ€œ/365โ€ to get the age in years.
Divide the results by 365 to get the results in years
  1. Press โ€œEnterโ€ and drag the formula down to copy it.
Example results from the completed formula

This formula gets the days between the two dates and divides it by 365 to give you the number of years in between.

How To Calculate Age Using the YEAR Function

Finally, you can use the โ€œYEARโ€ function to get the age in Excel. This function also works by subtracting the date of birth from the end date, like the previous function. The only difference is that with this function, the returns are automatically in years, so you donโ€™t need to customize the formula.

Hereโ€™s how to calculate age based on a date of birth in Excel with the โ€œYEARโ€ function.

  1. In the cell, type the โ€œequalsโ€ sign (=) and add opening brackets
  2. Type the โ€œYEARโ€ function and add another opening bracket
  3. Type the โ€œTODAYโ€ function and close the brackets
  4. Add a โ€œminusโ€ (-).
  5. Type โ€œYEAR,โ€ and after the brackets, select the cell with the date of birth.
  6. Close the brackets and press โ€œEnter.โ€
How to use the YEAR function to calculate age

The formula for this is:

=(YEAR(TODAY())-YEAR(B2))

This formula finds the age in the current date. If you want to use a specific date instead, you can use the cell reference for the date instead of the โ€œTODAYโ€ function.

Wrapping Up

Calculating age in Excel is a fundamental task that can be accomplished using various methods. The most common (and easiest) approach is using the โ€œDATEDIFโ€ function, which allows you to calculate the age based on the difference between a person’s date of birth and the current date.

Additionally, weโ€™ve shown you how to create an age calculator to help you determine age in Excel. This provides a convenient way to automate age calculations and streamline data analysis.

You can learn more about how to use Excel and Excel functions with the best Excel courses.

Alternatively, if youโ€™d like some powerful, ready-to-use spreadsheet templates, consider checking out our premium template library, and remember, you can use the code SSP to save 50%.

Get Premium Templates

Related:

Most Popular Posts

Related Posts

Thanks for visiting! We’re happy to answer your spreadsheet questions. We specialize in formulas for Google Sheets, our own spreadsheet templates, and time-saving Excel tips.

Note that we’re supported by our audience. When you purchase through links on our site, we may earn commission at no extra cost to you.

Like what we do? Share this article!