Skip to content

How to Calculate Age in Excel

How to Calculate Age in Excel - Method 2

Have you ever been given a task by your boss to calculate age from the birth date data already in Microsoft Excel? If so, you don’t need to worry; calculating age from a birth date is very easy to do, especially with software like Excel. All you need is a little reasoning and logic, and of course, the formula.

In this article, we will provide a guide on how you can calculate a person’s age based on their date of birth in Microsoft Excel. The output can be years, months, days, or even all three at once.

Table of Contents

  1. Why Calculate Age in Excel?
  2. Essential Date Format Setup
  3. Method 1: Age in Years (Using DATEDIF)
  4. Method 2: Exact Age in Years, Months, Days
  5. Method 3: Age in Decimal Years (YEARFRAC)
  6. Fixing Common Formula Errors

Why Calculate Age in Excel?

Excel’s date-handling capabilities simplify age calculations for tasks like:

  • Tracking employee ages for benefits.
  • Analyzing customer demographics.
  • Calculating loan eligibility based on age.
    Dates in Excel are stored as serial numbers (e.g., 1 = January 1, 1900), enabling arithmetic operations.

Essential Date Format Setup

Verify your dates first:

  1. Enter birthdates in a column (e.g., A1).
  2. Select the cells → Right-click → Format Cells → Date.
  3. Ensure no “Text” errors (aligned-left dates are problematic, use DATEVALUE to fix).

Method 1: Age in Years (Using DATEDIF)

The DATEDIF function calculates whole years between dates:

=DATEDIF(A1, TODAY(), "Y")

The result:

How to Calculate Age in Excel - Method 1
How to Calculate Age in Excel – Method 1

Method 2: Exact Age in Years, Months, Days

Combine DATEDIF units for precision:

=DATEDIF(A1, TODAY(), "Y") & " Years, " &  
DATEDIF(A1, TODAY(), "YM") & " Months, " &  
DATEDIF(A1, TODAY(), "MD") & " Days"

The result:

How to Calculate Age in Excel - Method 2
How to Calculate Age in Excel – Method 2

Method 3: Age in Decimal Years (YEARFRAC)

Use YEARFRAC for fractional ages (e.g., 34.25 years):

=YEARFRAC(A1, TODAY(), 1)

The result:

How to Calculate Age in Excel - Method 3
How to Calculate Age in Excel – Method 3

Fixing Common Formula Errors

  • #NUM! Error: Birthdate > Today’s date. Check date order.
  • #VALUE! Error: Invalid date format. Use DATE(month/day/year) for manual entry.
  • Incorrect Age: Ensure cells use Date formatting (not “General”).

That’s a complete guide on how you can easily calculate age in Microsoft Excel. Of course, after learning those 3 methods, you can choose the formula that best suits your current needs.

Maybe you would like other interesting articles?

Leave a Reply

Your email address will not be published. Required fields are marked *