0
0
ExcelHow-ToBeginner ยท 3 min read

How to Calculate Age in Excel Quickly and Easily

To calculate age in Excel, use the DATEDIF function like =DATEDIF(birthdate, TODAY(), "Y") which returns the full years between the birthdate and today. Alternatively, YEARFRAC can calculate age as a decimal number.
๐Ÿ“

Syntax

The main formula to calculate age is =DATEDIF(start_date, end_date, unit).

  • start_date: The birthdate or starting date.
  • end_date: The date to calculate age up to, usually TODAY() for current age.
  • unit: Defines the type of difference. Use "Y" for full years.

Example: =DATEDIF(A1, TODAY(), "Y") calculates full years from date in A1 to today.

excel
=DATEDIF(start_date, end_date, "Y")
๐Ÿ’ป

Example

This example shows how to calculate age from a birthdate in cell A2 using the current date.

excel
A2: 1990-05-15

In B2 enter:
=DATEDIF(A2, TODAY(), "Y")
Output
If today is 2024-06-01, B2 will show: 34
โš ๏ธ

Common Pitfalls

Common mistakes include:

  • Using DATEDIF with incorrect units like "y" (case sensitive, must be uppercase "Y").
  • Not using TODAY() for dynamic current date, which causes static results.
  • Entering birthdates as text instead of date format, which breaks calculations.

Always check date formats and use uppercase units.

excel
Wrong: =DATEDIF(A2, TODAY(), "y")  
Right: =DATEDIF(A2, TODAY(), "Y")
๐Ÿ“Š

Quick Reference

FunctionPurposeExample UsageOutput
DATEDIFCalculate full years between two dates=DATEDIF(A2, TODAY(), "Y")Age in years (integer)
YEARFRACCalculate age as decimal years=YEARFRAC(A2, TODAY())Age in years (decimal)
โœ…

Key Takeaways

Use =DATEDIF(birthdate, TODAY(), "Y") to get age in full years.
Ensure birthdates are in proper date format for accurate results.
Use uppercase "Y" in DATEDIF units to avoid errors.
TODAY() function keeps age calculation current automatically.
YEARFRAC can calculate age with decimal precision if needed.