Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Birthday Formula: Find Age and Days Until

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You can calculate a birthday in Excel with a handful of built-in date functions: use =DATEDIF(birthdate,TODAY(),"Y") to get the current age in years, and =DATE(YEAR(TODAY()),MONTH(birthdate),DAY(birthdate)) combined with TODAY() to work out when the next birthday falls and how many days remain. Excel stores dates as serial numbers, so as long as your birthdate cell is a real date value (not text), these formulas recalculate every time you open the workbook. The steps below walk through age, next birthday, days until the birthday, whether today is the birthday, and the leap-day edge case.

What You'll Need

  • A recent desktop version of Excel (Microsoft 365, Excel 2019 or later) on Windows or Mac. The formulas also work in Excel for the web.
  • One column holding birthdates entered in a format your regional settings recognise, for example 1990-05-14 or 5/14/1990 depending on where you are. Excel will usually convert these automatically.
  • Optional: a second column for a name or ID so each row is easy to identify.

One note before you start: DATEDIF is a legacy function that Excel supports but does not list in its formula autocomplete. Type it in full and it works fine; you just won't see it suggested as you type. Menu and function labels can differ slightly between Excel versions and regions, but the function names are the same everywhere.

Step-by-Step

  1. Lay out your data. Put a header in row 1, for example Name in A1 and Birthdate in B1. Enter the first birthdate in B2. If you already have a list, select the birthdate column and check that the values are right-aligned by default — that is Excel's visual sign that it recognised them as dates rather than text.
  2. Format the birthdate column as a date. Select the column, then use Home > Number Format and choose Short Date or Long Date. This step matters because a cell formatted as General may show a five-digit serial number instead of a readable date.
  3. Calculate the age. In C1 type Age. In C2 enter =DATEDIF(B2,TODAY(),"Y"). The "Y" tells Excel to count whole years between the birthdate and today. Copy the formula down the column by dragging the fill handle (the small square at the bottom-right of the cell) or by double-clicking it.
  4. Build this year's birthday date. In D1 type Birthday This Year. In D2 enter =DATE(YEAR(TODAY()),MONTH(B2),DAY(B2)). This reconstructs the birthday inside the current calendar year, which is the foundation for the next two steps.
  5. Find the next birthday. In E1 type Next Birthday. In E2 enter =IF(D2<TODAY(),DATE(YEAR(TODAY())+1,MONTH(B2),DAY(B2)),D2). In plain terms: if this year's birthday has already passed, use next year's date; otherwise use this year's. Format column E as a date so the result is readable.
  6. Count the days remaining. In F1 type Days Until. In F2 enter =E2-TODAY(). Because Excel treats dates as numbers, subtracting one date from another gives a day count. Format this column as General or Number, not as a date, or you will see a strange date like 1900-01-15 instead of a small number.
  7. Flag today's birthdays. In G1 type Today?. In G2 enter =IF(AND(MONTH(B2)=MONTH(TODAY()),DAY(B2)=DAY(TODAY())),"Happy Birthday",""). This compares month and day only, so it fires on the anniversary regardless of birth year.
  8. Handle a whole list at once. With B2 and the formulas in row 2 in place, select C2:G2, grab the fill handle and drag down to the last row. Every row now shows age, next birthday, days until and the birthday flag, and all of it updates whenever TODAY() changes.
  9. Sort or filter by upcoming birthdays. Select the whole table, then use Data > Sort and sort by the Next Birthday column ascending. The soonest birthdays move to the top, which makes the sheet useful as a simple reminder list.

Common Mistakes

  • Birthdates stored as text. If a date was imported from another system it may sit in the cell as text such as '14/05/1990. DATEDIF then returns #VALUE! or a wildly wrong result. Convert with Data > Text to Columns, choosing the correct date order, or re-enter the date directly.
  • Confusing month and day order. 05/14/1990 is US order; much of the world writes 14/05/1990. If Excel guesses wrong it may swap month and day, or reject the entry entirely. Match the order to your system's regional date settings.
  • Formatting the day count as a date. Subtracting dates yields a number of days, but if the cell inherits a date format, Excel displays it as a calendar date starting from 1900. Reset the format to General.
  • Using YEAR(TODAY())-YEAR(B2) for age. This ignores whether the birthday has happened yet this year, so it can overstate the age by one. DATEDIF handles that correctly.
  • Typing TODAY without brackets. Without the empty parentheses Excel treats it as a name and returns #NAME?.
  • Leap-day births. Someone born on 29 February has no birthday in most years. DATE() will roll 29 February to 1 March in non-leap years, which is the usual convention but should be a deliberate choice, not a surprise.

Tips

  • Wrap the age formula in IFERROR(...,"") so blank rows show nothing instead of errors while you extend the sheet.
  • Paste birthdates as values with Paste Special > Values if you want a static snapshot that does not change each day.
  • Use conditional formatting to highlight rows where Days Until is 0 or less than 7, giving you a visual reminder of the week ahead.
  • If you need an exact age in years, months and days, =DATEDIF(B2,TODAY(),"Y")&"y "&DATEDIF(B2,TODAY(),"YM")&"m "&DATEDIF(B2,TODAY(),"MD")&"d" produces a readable string.
  • Pin the TODAY() value in a single cell if you want to test the formulas against a fixed date, then swap it back to TODAY() afterwards.

Troubleshooting

  • The result is #VALUE! — the birthdate cell is text, not a date. Check alignment: real dates align right by default, text aligns left.
  • The age is off by one — confirm the birthday has actually passed this year. Recalculate with Formulas > Calculate Now if the sheet has been open across midnight.
  • #NAME? appears — the function name is misspelled (for example DATEDIFF with two Fs). Excel's function is DATEDIF.
  • The next birthday shows a past date — the IF comparison in step 5 was probably entered without the year adjustment, or the formula references the wrong column. Rebuild it exactly as shown.
  • Days remaining looks like a date — change the cell format to General or Number.
  • Nothing updates when the day changes — the workbook may have calculation set to Manual. Set it back to Automatic in the calculation options on the Formulas tab.
  • The birthday flag never fires — verify that the birthdate cell really is a date and that you used month and day separately, not the full date comparison.

Frequently Asked Questions

Can I calculate age without DATEDIF?

Yes. =INT((TODAY()-B2)/365.25) gives a close approximation, but it drifts by a day around leap years. DATEDIF with "Y" is exact, which is why it is the standard choice.

Why is DATEDIF missing from the function list?

Microsoft keeps it for compatibility with older spreadsheets but does not surface it in autocomplete. It still calculates correctly if you type the full name.

Does this work in Excel for the web and Google Sheets?

TODAY, DATE, IF and DATEDIF all exist in both applications, so the formulas transfer directly. Google Sheets supports DATEDIF as well.

How do I show only the birthdays in the next 30 days?

Add a helper column with the days-until formula, then use Data > Filter and filter that column to numbers less than or equal to 30. Combine with the flag column if you also want to see today's birthdays.

What happens to a 29 February birthday?

DATE() rolls the date to 1 March in non-leap years. If you prefer to treat it as 28 February, wrap the calculation in an IF that checks for that month/day combination and substitutes the earlier date.

Will the age update automatically next year?

Yes, because TODAY() recalculates each time the file opens or recalculates. Keep the formulas rather than pasting values if you want them live.