Calculating Age in Excel: A Step-by-Step Guide
Excel is an incredibly powerful tool for data analysis and manipulation. One common task that many users encounter is calculating age in Excel. Whether you're working with a list of birthdates, a database of employee information, or a set of customer records, knowing how to calculate age in Excel can save you time and effort. In this article, we'll explore the different methods of calculating age in Excel, from using formulas to leveraging built-in functions.
The Formula Method
To calculate age in Excel using formulas, you'll need to use the TODAY function, which returns the current date, and the DATE function, which creates a date from individual year, month, and day values. Here's the basic formula:
TODAY() - (A2 - B2)

Where:
- A2 is the cell containing the birthdate
- B2 is the cell containing the year of birth
This formula calculates the difference between the current date and the birthdate, then subtracts the year of birth to determine the age. For example, if cell A2 contains the birthdate "1/1/1990" and cell B2 contains the year "1990," the formula would return the age "33."
Using the YEARFRAC Function
Another way to calculate age in Excel is to use the YEARFRAC function, which calculates the fraction of the year that has elapsed between two dates. Here's the formula:

YEARFRAC(B2, TODAY(), 0)
Where:
- B2 is the cell containing the birthdate
This formula calculates the fraction of the year that has elapsed since the birthdate, then converts it to a whole number by multiplying by the number of days in a year (365). You can then use the INT function to round down to the nearest whole number, which gives you the age.
The Built-in Functions Method
Excel also has a built-in function called the AGE function, which calculates the age of a person based on their birthdate and the current date. Here's how to use it:
=AGE(A2)
Where:
- A2 is the cell containing the birthdate
This formula returns the age of the person based on their birthdate. Note that the AGE function is only available in Excel 2013 and later versions.
Calculating Age for a Specific Date
What if you want to calculate age for a specific date, rather than the current date? You can use the following formula:
TODAY() - (A2 - B2) + 1
Where:
- A2 is the cell containing the birthdate
- B2 is the cell containing the year of birth
This formula calculates the difference between the specified date and the birthdate, then subtracts the year of birth to determine the age. For example, if you want to calculate the age of someone born on January 1, 1990, on January 1, 2023, you would use the formula above.
Using VBA to Calculate Age
Finally, you can also use VBA (Visual Basic for Applications) to calculate age in Excel. This method is more advanced, but it gives you the flexibility to customize the formula to your specific needs. Here's an example:
Sub CalculateAge()
Dim birthdate As Date, currentdate As Date, age As Integer
birthdate = Cells(2, 1).Value
currentdate = Date
age = DateDiff("yyyy", birthdate, currentdate)
Range("C2").Value = age
End Sub
This code calculates the age of the person based on their birthdate and the current date, then displays the result in cell C2.
Conclusion
Calculating age in Excel can be a straightforward process using formulas and built-in functions. Whether you're using the formula method, the YEARFRAC function, or the built-in AGE function, you can easily determine the age of individuals in your dataset. With these methods, you can streamline your data analysis and make more informed decisions.