
Calculating age from a birth date in a spreadsheet is a common task that can be approached in several ways. While it might seem straightforward at first, getting an accurate age in years, months, and days requires careful use of formulas. This guide will walk you through multiple methods to precisely determine age, including how to calculate full years, as well as exact years, months, and days, and even how to calculate age as of a specific date.
Contents
How to Calculate Age in Excel Using the YEARFRAC Function
To determine someone’s age in Excel with precision, you can use the YEARFRAC function, which calculates the difference between two dates as a decimal value representing years. Here’s how to do it:
- Ensure that the birth dates in your Excel sheet are in proper date format. Excel must recognize these as actual dates, not text.
- Use the TODAY() function to automatically retrieve the current date. This ensures your age calculation updates daily.
- Click on the cell where you want the age to appear (e.g., D2). If the birth date is in cell B2 and today’s date is in C2, select D2.
- Enter the formula: =YEARFRAC(B2, C2, 1)
- B2: Cell containing the birthdate
- C2: Cell with today’s date or another target date
- 1: Makes the calculation account for actual days in months and leap years
- Hit Enter to apply the formula. Excel will return the person’s age in decimal years.
- If Excel displays a date instead of a number, change the cell’s format from “Date” to “General” or “Number” via the Home tab.
- To apply the formula to multiple rows, drag the fill handle (small square at the bottom-right corner of the cell) down. Excel will adjust the formula for each row automatically.
- If you want to display only the whole number of years, use the formula: =INT(YEARFRAC(B2, C2, 1))
- The INT function removes the decimal, showing the age in full years.
- To find the age on a different date, use: =INT(YEARFRAC(B2, DATE(2050,6,22), 1))
- This calculates the age as of June 22, 2050, based on the birthdate in B2.
How to Calculate Age Using the DATEDIF Function
Use the DATEDIF function in Excel to quickly calculate age from a birthdate. This method accurately accounts for leap years and the varying lengths of months.
- Choose the cell where you want the age result to appear, such as D2.
- Enter the formula: =DATEDIF(B2, TODAY(), “Y”)
- B2: The cell containing the birthdate
- TODAY(): Automatically provides the current date
- “Y”: Specifies that you want the difference in complete years (you can use “M” for months or “D” for days)
- Press Enter to see the calculated age in years.
- To apply the formula to other rows, select the cell with the formula (e.g., D2), then drag the fill handle (the small square in the bottom-right corner of the cell) downward to fill the formula into additional cells.
How to Calculate Age Using the ROUNDDOWN Function
The ROUNDDOWN function is a useful way to calculate age in Excel when you want to show the age strictly in full years, without rounding up. This method ensures the age reflects only completed years, ignoring any extra months or days after the last birthday. Here’s how to apply it:
- Select the cell where you want the age to be displayed, such as D2.
- Enter the following formula in the chosen cell: =ROUNDDOWN((TODAY() – B2)/365.25, 0)
- Explanation:
- TODAY() returns the current date.
- B2 refers to the cell containing the birthdate.
- Dividing by 365.25 accounts for the average number of days per year, including leap years.
- ROUNDDOWN(…, 0) rounds the result down to the nearest whole number, giving the age in full years.
- Press Enter to see the calculated age.
- To calculate ages for multiple birthdates, drag the fill handle from the cell with the formula down through the desired range. Excel will automatically update the cell references to calculate each corresponding age.
How to Calculate Age Using the INT Function
The INT function is another way to calculate age in Excel, working similarly to ROUNDDOWN by returning the whole number part of a calculation. To use it, simply substitute ROUNDDOWN with INT.
- Select the cell where you want the age to appear, for example, D2.
- Enter this formula into the selected cell: =INT((TODAY() – B2) / 365.25)
- Here,
- TODAY() gets the current date,
- B2 is the cell with the birthdate,
- dividing by 365.25 accounts for leap years on average.
- Press Enter to see the result.
- If you need to calculate ages for multiple birthdates, simply drag the fill handle down the column to copy the formula to other cells. Excel will adjust the cell references automatically.
Using an Online Age Calculator
If you prefer a quicker method or don’t want to use Excel formulas, you can use an online age calculator. These tools are easy to use and instantly provide age in years, months, and days. To use one:
- Visit a reliable Age Calculator website.
- Enter the date of birth in the required format (e.g., DD/MM/YYYY).
- Select the date for which you want to calculate the age, or use today’s date.
- Click on the calculate button.
The tool will instantly display the person’s age in full years, months, and days. This method is ideal for quick checks or when you’re working without Excel.
Conclusion
Calculating age in Excel using the DATEDIF function or through an online age calculator is both simple and effective. Whether you need a quick answer or a detailed breakdown in years, months, and days, both methods provide accurate results. Excel offers more control for data management, while online tools are perfect for instant use. Choose the method that suits your needs best.