The fastest way to find age from a birthdate

Excel can calculate age in seconds using the DATEDIF function, which measures the gap between two dates. If you have a column of birthdates, you can add a formula next to each one that shows the person's current age in years — and it updates automatically every year.

The formula looks like this: =DATEDIF(A2,TODAY(),"Y"). The first date is the birthdate, the second is today's date (which Excel fills in automatically), and the "Y" tells Excel you want the answer in years. If you want age in months or days instead, you can change that letter.

This method works in Excel on Windows, Mac, and the web version. Google Sheets uses the same formula. If you are working with a large list of people, this is much faster than calculating by hand.

Key Takeaways

  • The DATEDIF formula calculates the exact number of years between a birthdate and today in a single cell.
  • You can measure age in years, months, or days by changing the final letter in the formula from Y to M or D.
  • The TODAY() function automatically updates every day, so ages recalculate without you having to change anything.
  • If DATEDIF does not work in your version of Excel, you can use YEARFRAC or a subtraction method as a backup.

Setting up your spreadsheet with birthdates

Start by putting all the birthdates in one column. Use a consistent format — for example, all dates as MM/DD/YYYY or all as DD/MM/YYYY. Excel recognizes most date formats, but mixing them can cause errors.

Click on the cell next to the first birthdate where you want the age to appear. This is usually the column to the right. Type the formula =DATEDIF(A2,TODAY(),"Y"), but replace A2 with the cell that holds the birthdate. If your birthdates are in column B instead of column A, use B2.

Press Enter. Excel calculates the age and shows it as a number. If you see an error message like #NAME? or #VALUE!, it usually means the birthdate is not formatted as a date, or DATEDIF is not available in your version.

Copying the formula down to multiple rows

Once the formula works for the first person, you can copy it down to calculate age for everyone at once. Click on the cell with your formula, then look for the small square in the bottom-right corner of the cell.

Double-click that square. Excel automatically copies the formula down to every row that has a birthdate next to it. The cell references update on their own — the second row uses A3, the third uses A4, and so on. This takes seconds instead of typing the formula fifty times.

If double-clicking does not work, you can also click and drag that square down as far as you need. Or select the cell with the formula, copy it (Ctrl+C or Cmd+C), then select all the cells below it and paste (Ctrl+V or Cmd+V).

Measuring age in months or days instead of years

The DATEDIF formula works with three different time units. Change the final part of the formula to get different results:

  • "Y" gives age in complete years (the most common choice).
  • "M" gives age in complete months since birth.
  • "D" gives age in complete days since birth.

For example, =DATEDIF(A2,TODAY(),"M") shows how many months old someone is. This is useful if you are tracking infants or calculating may be able to access for programs that measure age in months.

You can also combine these to show age as "years and months" — for instance, "5 years, 3 months". This requires a more complex formula, but it is readable for reports. The formula would be =DATEDIF(A2,TODAY(),"Y")&" years, "&DATEDIF(A2,TODAY(),"YM")&" months". The "YM" means "months beyond the complete years".

What to do if DATEDIF does not work

DATEDIF is not available in every version of Excel, particularly older versions or some regional setups. If you see a #NAME? error, the function is not recognized in your copy.

The backup method uses YEARFRAC, which is more widely supported: =INT(YEARFRAC(A2,TODAY())). YEARFRAC calculates the exact fraction of a year between two dates, and INT rounds it down to a whole number. This gives you the same result as DATEDIF with "Y".

Another backup is pure subtraction: =INT((TODAY()-A2)/365.25). This divides the number of days between the birthdate and today by 365.25 (accounting for leap years) and rounds down. It is less precise for people very close to a birthday, but it works everywhere.

Fixing common errors with birthdates

If your formula returns an error or a strange number, the birthdate is usually stored as text instead of as a date. Excel treats text differently from actual dates, and the formula cannot read it.

To fix this, select the column with birthdates. Right-click and choose "Format Cells". Click the "Number" tab, then select "Date" from the category list. Choose a date format and click OK. Excel converts the text to real dates, and your age formula should work.

Another common problem is that the birthdate is in the future by mistake — for example, 2025 instead of 1995. The formula will show a negative age. Check the year in each birthdate, especially if you are copying data from another source.

If a cell shows a date instead of an age (like "1/1/1900"), the result is formatted as a date rather than a number. Right-click the cell, choose "Format Cells", select "Number" from the category, and click OK. The age will display correctly.

Using age calculations in other formulas

Once you have ages calculated, you can use them in other formulas. For example, you might want to count how many people are over 65, or find the average age of a group.

To count people over a certain age, use =COUNTIF(C2:C50,">65"), where C2:C50 is the range of cells with ages. To find the average age, use =AVERAGE(C2:C50). These formulas work on any column of numbers, including your calculated ages.

You can also use age in conditional formatting to highlight rows — for example, highlighting everyone under 18 in red. Select the age column, go to Conditional Formatting, choose "Highlight Cell Rules", then "Greater Than" or "Less Than", and enter your threshold.

Frequently Asked Questions

Does the age update automatically every year?

Yes. Because the formula uses TODAY(), which changes every day, the age recalculates automatically. On someone's birthday, their age increases by one with no action from you. This only works if you open the file after their birthday — if the file stays closed, the ages do not update.

What if the birthdate includes the time of day, not just the date?

DATEDIF ignores the time portion and uses only the date. So =DATEDIF(A2,TODAY(),"Y") works the same whether the birthdate is stored as "1/15/1990" or "1/15/1990 2:30 PM". The time does not affect the age calculation.

Can I calculate age between two dates that are not today?

Yes. Replace TODAY() with any other date. For example, =DATEDIF(A2,B2,"Y") calculates the age at the date in cell B2. This is useful if you want to know how old someone was on a specific date in the past, like at the time of an event.

Why does my formula show 0 for someone who was just born?

DATEDIF counts complete years only. A baby born three months ago shows age 0 because they have not yet lived a full year. If you want to show months for infants, use "M" instead of "Y" in the formula, or use a combination formula like the one shown in the "Measuring age in months or days" section.

Can I use this formula in a pivot table?

Pivot tables work with data that already exists in cells, so you need to calculate ages in a regular column first. Once ages are in a column, you can drag that column into a pivot table to group people by age range or find average age by department.