The fastest way to find someone's age in Excel

The simplest method is the DATEDIF function, which calculates the difference between two dates in years, months, or days. If you have a birth date in cell A2, the formula =DATEDIF(A2,TODAY(),"Y") returns their age in complete years. The TODAY() function automatically uses the current date, so the age updates every day without you changing anything.

DATEDIF works in Excel on Windows, Mac, and Google Sheets. It takes three pieces of information: the start date (birth date), the end date (today's date or another date you choose), and the unit you want ("Y" for years, "M" for months, "D" for days). The result is always a whole number — it counts only complete years, not partial ones.

Key Takeaways

  • DATEDIF(birth_date, TODAY(), "Y") is the standard formula for age in years and works across all Excel versions and Google Sheets.
  • TODAY() automatically inserts the current date, so ages update without manual changes.
  • You can calculate age in months or days by changing "Y" to "M" or "D" in the formula.
  • If DATEDIF does not work, the YEARFRAC formula divided by 365.25 produces the same result.
  • Dates must be formatted as actual dates, not text, or the formula will return an error.

Setting up your spreadsheet for age calculations

Start by putting birth dates in one column — for example, column A starting at A2. Make sure Excel recognizes them as dates, not text. If a date appears left-aligned in its cell, Excel is treating it as text and the formula will fail. Dates should be right-aligned by default. If yours are left-aligned, select the column, right-click, choose Format Cells, and set the format to Date.

In the column where you want ages to appear (for example, column B), click on the first empty cell (B2) and type the formula. After you press Enter, Excel calculates the age. Then click that cell again and drag the small square at the bottom-right corner down to copy the formula to all rows with birth dates. Each row will automatically adjust to use the birth date in its own row.

The DATEDIF formula explained step by step

DATEDIF has three parts separated by commas. The first part is the birth date — either a cell reference like A2 or an actual date typed as DATE(1990,5,15). The second part is the end date, which is usually TODAY() for current age, but can be any other date. The third part is the unit: "Y" for years, "M" for months, or "D" for days.

If you want age in years and months together, you can use two DATEDIF formulas side by side. For example, =DATEDIF(A2,TODAY(),"Y")&" years, "&DATEDIF(A2,TODAY(),"M")&" months" produces output like "28 years, 3 months". The & symbol joins text and numbers together in Excel.

One quirk: DATEDIF counts complete units only. If someone was born on May 15 and today is May 14, they are still one year younger than the formula would show if today were May 15. This is correct behavior — they have not yet completed another year of life.

Alternative: YEARFRAC for decimal ages

If you need age as a decimal number (for example, 28.5 to show someone is halfway through their 28th year), use YEARFRAC instead. The formula is =YEARFRAC(A2,TODAY()). This returns age as a decimal, which you can round to one decimal place with =ROUND(YEARFRAC(A2,TODAY()),1).

YEARFRAC is useful for statistical work or when you need to calculate something based on partial years, like insurance premiums or age-based discounts. For everyday age tracking, DATEDIF in years is clearer because it matches how people actually describe their age.

When DATEDIF does not work and what to do

DATEDIF sometimes fails silently in older versions of Excel or when dates are stored as text instead of actual date values. If you see a #NAME? error, your version of Excel does not recognize the function — this is rare but happens in some very old builds. If you see a #VALUE! error, one of your dates is formatted as text.

To fix text-formatted dates, select the column, go to Data menu, choose Text to Columns, and click Finish. This forces Excel to re-read the dates as actual dates. Then try the DATEDIF formula again. If DATEDIF still does not work, the backup formula is =INT((TODAY()-A2)/365.25), which divides the number of days between the birth date and today by 365.25 (accounting for leap years) and rounds down to a whole number. This produces the same result as DATEDIF in years.

Handling dates across different formats and time zones

Excel stores dates as numbers counting from a start date, so the format you see on screen does not affect the calculation. Whether a date displays as 5/15/1990, 15-May-1990, or May 15, 1990, the formula works the same way. You can change how dates look without changing the underlying data — select the cells, right-click, choose Format Cells, and pick a different date format.

Time zones do not affect age calculations because DATEDIF and TODAY() work with dates only, not times. If your spreadsheet includes birth times and you need to account for time-of-day differences, that is a much more complex problem and beyond what standard Excel functions handle well.

Checking your results and common mistakes

After you enter the formula, spot-check a few results by hand. If someone was born on January 1, 2000, and today is January 1, 2024, they should be exactly 24 years old. If the formula shows 23, the birth date is stored as text or formatted incorrectly. If it shows 25, check that you used TODAY() and not a fixed date like DATE(2024,1,1) — fixed dates do not update, so ages will be wrong after the year changes.

Another common mistake is copying a formula that uses a fixed date instead of TODAY(). For example, =DATEDIF(A2,DATE(2024,1,1),"Y") calculates age as of January 1, 2024, and never changes. If you want ages to update automatically, always use TODAY() as the second argument.

Frequently Asked Questions

Can I calculate age if I only have birth year, not the full birth date?

Yes, but the result is approximate. If A2 contains only a year like 1990, enter it as DATE(1990,1,1) to give Excel a complete date. The formula =DATEDIF(DATE(1990,1,1),TODAY(),"Y") then calculates age, but it assumes a January 1 birth date. The age will be off by up to one year depending on the actual birth month.

How do I calculate age in months or days instead of years?

Change the third part of DATEDIF from "Y" to "M" for months or "D" for days. For example, =DATEDIF(A2,TODAY(),"M") returns age in complete months. This is useful for tracking infant ages or for precise time calculations in research.

What if the birth date is in the future or invalid?

DATEDIF returns a #NUM! error if the start date is after the end date. Check that birth dates are actually in the past. If you see this error, click the cell with the error and verify the date is correct — typos like 2025 instead of 1995 are common.

Does the formula work the same way in Google Sheets?

Yes, DATEDIF and TODAY() work identically in Google Sheets. The syntax and results are the same. If you move a spreadsheet between Excel and Google Sheets, age formulas will continue to work without changes.

Can I calculate age as of a specific date other than today?

Yes, replace TODAY() with any date you want. For example, =DATEDIF(A2,DATE(2020,12,31),"Y") calculates how old someone was on December 31, 2020. This is useful for historical records or for calculating age at a specific event.