How to Calculate Age in Excel?

How to Calculate Age in Excel?

6 mins readComment
Rashmi
Rashmi Karan
Manager - Content
Updated on Nov 1, 2024 15:54 IST

Calculating age in MS Excel is very simple, thanks to its built-in functions and formulas. Whether you are managing employee records, analyzing demographics, or just curious about someone's age, MS Excel has the tools you need. This guide will show you how to use Excel formulas to quickly and accurately calculate ages.

How to Calculate Age in Excel

Table of Content

Calculate Age in Excel Using the YEARFRAC Function

Follow these steps To calculate age from the date of birth in Excel. This method uses the YEARFRAC function -

Step 1 - First, make sure that the birth dates in your workbook are in the correct date format. Excel should recognise these values as dates, not text.

Step 2 - Use the TODAY() function to get the current date. 

Today's date

Step 3 - Navigate to the cell where you want the calculated age to appear. For example, to calculate the age in cell D2 based on the birth date in cell B2 and todayโ€™s date in C2, click on cell D2.

YEARFRAC 1

Step 4 - Type in the formula: =(YEARFRAC(B2, C2, 1))

    • Here, B2 is the cell containing the birth date.
    • The 1 in the YEARFRAC function indicates that the calculation uses the actual number of days in the months and leap years, providing a more accurate age calculation.

Step 5 - Press Enter to apply the formula. Excel will calculate the age based on the birth date in B2 and display it in cell D2.

If you encounter this issue, go to Number Formats in the Ribbon and change from Date => General. YEARFRAC 2

YEARFRAC 4

Step 6 - Copy the Formula for Other Cells: You have a list of birth dates in column B. To calculate the ages, drag the fill handle (a small square at the bottom right corner of cell C2) down to fill the formula into other cells in column C. Excel will automatically adjust the formula for each row.

YEARFRAC 5

If you want the round-off age of a person, use the YEARFRAC function combined with the INT function to calculate the age in whole years, accounting for leap years and the actual number of days each month.

Here is the formula - 

=INT(YEARFRAC(B2, C2, 1))

INT & YEARFRAC

You can also calculate a person's age on a given date (past or future), not just todayโ€™s date. Just play around and use this formula - 

Yearfrac 7

Formula Breakdown: =INT(YEARFRAC(B2, DATE(2050,6,22), 1))
This formula calculates age as of June 22nd, 2050, based on a birthdate in cell B2:

Function Breakdown:

  • INT(): Truncates any decimal part, returning the whole number representing age in years.

YEARFRAC(B2, DATE(2050,6,22), 1)

  • YEARFRAC: Calculates the fraction of a year between two dates.
  • B2: Cell containing the birthdate.
  • DATE(2050,6,22): The reference date is set for June 22nd, 2050.
  • 1: Specifies to consider full years only (ignoring days and months).

Note

  • Using the formula, you can avoid adding a new column for today's date. =INT(YEARFRAC(B2, TODAY(), 1))

  • Accuracy: The =INT(YEARFRAC method calculates an accurate age by considering the exact number of days each month and accounting for leap years.
  • Updating Ages: Since the formula uses the TODAY() function, the calculated ages will automatically update every day when you open your Excel workbook, reflecting the current age based on today's date.

Embark on your journey in MS Excel with our guide to the best colleges, innovative programs, online courses, and career opportunities!

Recommended online courses

Best-suited MS Excel courses for you

Learn MS Excel with these high-rated online courses

โ‚น5.5 K
18 hours
โ‚น3.2 K
28 hours
โ‚น1 L
6 months
โ‚น4.3 K
2 months
โ‚น59.54 K
10 months
โ€“ / โ€“
45 hours
โ‚น1.34 L
300 hours
โ€“ / โ€“
1 month
โ‚น6.4 K
104 hours

Calculate Age in Excel Using the DATEDIF Function 

Follow these simple steps to calculate age from date of birth in Excel using the DATEDIF function. This method accurately calculates age in whole years, considering leap years and the actual number of days each month.

Step 1 - Select the cell where you want the calculated age to appear (in our case, D2).

Step 2 - Type: =DATEDIF(B2, TODAY(), "Y") 

DATEDIF Function 1

Here- 

  • B2: Birthdate cell reference.
  • TODAY(): To insert the current date dynamically.
  • Y = Number of Years (M = Number of months; D = Number of days)

Step 3 - Press Enter.

DATEDIF Function 2

Step 4 - Click the cell with the initial formula (e.g., D2) and drag down the fill handle (small square at the bottom right corner) to extend the formula.

DATEDIF Function 3
150+ Keyboard Shortcuts In MS Excel
150+ Keyboard Shortcuts In MS Excel
Excel users who enter a lot of data with the keyboard can boost their productivity by learning Excel shortcut keys, which allow them to access the programโ€™s commands much faster....read more
What Are Excel Errors and How To Fix Them?
What Are Excel Errors and How To Fix Them?
Excel is a powerful tool for working with data, but it can also be frustrating when errors occur. While some errors are easy to fix, others can be more difficult...read more

Calculate Age in Excel Using the ROUNDDOWN Function 

Calculating age in Excel using the ROUNDDOWN function is another effective method, particularly when you want to display the age in whole years without rounding up. This approach can be beneficial when you need the age calculation to strictly reflect the number of complete years, skipping any additional months or days past the last birthday. Here's how you can do it -

Step 1 - Choose the cell where you want the age to appear (e.g., cell D2).

Step 2 - Type the following formula into the selected cell:

=ROUNDDOWN((TODAY() - Date of Birth)/365.25,0)

=ROUNDDOWN((TODAY() - B2)/365.25,0)

ROUNDDOWN function 1

Where:

  • TODAY(): Retrieves the current date.
  • B2: References the cell containing the birthdate.
  • /365.25: Divides the difference by the average number of days in a year, accounting for leap years.
  • ROUNDDOWN: Rounds the result down to the nearest whole number, representing age in years.
  • ,0: Specifies zero decimal places.

Step 3 - Press Enter to execute the formula and display the calculated age.

ROUNDDOWN function 2

Step 4 - If you have multiple birthdates, copy the formula to other cells by dragging the fill handle down to fill the formula into other cells. Excel will automatically adjust cell references for each row, calculating ages for corresponding birthdates.

ROUNDDOWN function 3
What is Filter in Excel?
What is Filter in Excel?
In Excel, a filter is a powerful tool that allows users to display only the data that meets specific criteria, making it easier to analyze and manage large datasets. Filters...read more
How to Calculate the Difference Between Two Dates in Excel?
How to Calculate the Difference Between Two Dates in Excel?
Whether you need to determine the number of days between two events, measure the duration of a project, or calculate an individualโ€™s age, Excel offers a range of functions and...read more

Calculate Age in Excel Using the INT Function 

You can also use the INT function to calculate age in Excel. Just replace ROUNDDOWN with INT.

Step 1 - Choose the cell where you want the age to appear (e.g., cell D2).

Step 2 - Type the following formula into the selected cell:

=INT((TODAY() - Date of Birth)/365.25,0)

=INT((TODAY() - B2)/365.25,0)

INT function 1

Step 3 - Press Enter to display the calculated age.

INT function 2

Step 4 - For multiple birthdates, drag and drop the formula across the column to fill in other cells.

INT function 4
What is a CSV File, and How to Convert CSV to Excel?
What is a CSV File, and How to Convert CSV to Excel?
CSV stands for Comma Separated Values. It is a text data type in data processing with which you can record, store, and process large amounts of structured data. CSV files...read more
How To Add Drop Down In Excel In Less Than 1 Minute?
How To Add Drop Down In Excel In Less Than 1 Minute?
Adding a dropdown list to a cell helps us to allow the user to select data from a list that we have previously predefined. In this way, we maintain consistency...read more

Key Takeaways

  • Versatile Functions for Age Calculation: Excel supports various functions like YEARFRAC, DATEDIF, ROUNDDOWN, and INT to calculate age accurately, catering to different needs and preferences for precision and rounding.
  • Dynamic Age Updates: Utilizing the TODAY() function in formulas ensures that age calculations are always current, automatically updating whenever the workbook is opened.
  • Leap Year Consideration: Formulas such as =INT(YEARFRAC(B2, TODAY(), 1)) account for leap years and the actual number of days in each month, ensuring precise age calculations.
  • Flexibility in Date Analysis: Beyond calculating current age, Excel allows for age calculation on any given date, past or future, offering flexibility for various analytical purposes.
  • Ease of Application: Calculating age in Excel is straightforward, from ensuring correct date formats to extending formulas across multiple cells for efficient data processing.

FAQs - How to Calculate Age in Excel?

What if I have multiple birth dates to calculate ages for?

To calculate ages for multiple birth dates, you can apply the same formula to multiple rows by dragging the fill handle (the small square at the bottom right corner of the cell) down to fill other cells automatically. Excel will adjust cell references accordingly.

How do I ensure that Excel recognizes my birth dates correctly?

Make sure that your birth dates are formatted as dates in Excel. If they are stored as text, convert them to date format by selecting the cells, right-clicking, choosing Format Cells, and selecting Date.

What happens if someone is born on February 29 during a leap year?

Excel's date functions handle leap years automatically. If you input February 29 as a birth date, using the DATEDIF or YEARFRAC functions will correctly account for leap years when calculating age.

Can I create an age calculator that updates automatically?

Yes! By using functions like TODAY(), your age calculation will update automatically every day when you open your Excel sheet.

About the Author
author-image
Rashmi Karan
Manager - Content

Rashmi is a postgraduate in Biotechnology with a flair for research-oriented work and has an experience of over 13 years in content creation and social media handling. She has a diversified writing portfolio and aim... Read Full Bio