Excel age calculator staff-list exercise
  • TIPS & TRICKS/
  • Calculate Age from Date of Birth in Excel: Free Staff-List Exercise/
Tips & Tricks

Calculate Age from Date of Birth in Excel: Free Staff-List Exercise

Written by FutureSavvy Team
Updated 9 Aug 2026 · 3 min read

To calculate age from a date of birth in Excel, put the date of birth in B2 and enter this formula in C2:

Excel formula
=DATEDIF(B2,TODAY(),"Y")

The "Y" unit returns completed years. In this exercise, you will apply the formula to a small staff list, fill it down and test the dates most likely to reveal a mistake.

Download the free staff-list workbook

What you will build

The workbook contains employee names, dates of birth, current ages, ages at a fixed reporting date and a check column. The sample data is fictional and includes a leap-day birthday, a birthday today, a birthday tomorrow and an invalid future date.

Spreadsheet showing a staff list with dates of birth, calculated ages and edge-case checks

Step 1: Enter the current-age formula

Open the workbook and select C2 beside the first date of birth. Enter the formula below and press Enter.

Excel formula
=DATEDIF(B2,TODAY(),"Y")

DATEDIF compares the date in B2 with today. The "Y" unit counts only complete years, so it does not round someone up before their birthday.

Step 2: Fill the formula down

Select C2, then drag the fill handle down the Age column. Excel changes B2 to B3, B4 and the next row automatically. Check that each valid date returns a whole number.

Step 3: Guard against blanks and future dates

A staff export can contain blank cells or an incorrect future date. Use this version when you want invalid input to return a blank instead of an error or negative-looking result:

Excel formula
=IF(OR(B2="",B2>TODAY()),"",DATEDIF(B2,TODAY(),"Y"))

The workbook labels its future-date row so you can compare the guarded result with the source data. Correct the source date rather than treating it as a valid age.

Step 4: Calculate age at a fixed reporting date

TODAY() changes whenever the workbook recalculates. For payroll, audit or eligibility work that must reproduce the same result later, replace TODAY() with the reporting date:

Excel formula
=DATEDIF(B2,DATE(2026,12,31),"Y")

Change the year, month and day inside DATE to match your reporting cut-off. Keeping the cut-off inside the formula makes the calculation easy to audit.

Step 5: Test the edge cases

  • Birthday today: the age should increase on the birthday, not the day before.
  • Birthday tomorrow: the result should remain one year lower until tomorrow.
  • 29 February birthday: check the result around the birthday in both leap and non-leap years.
  • Future date: the guarded formula should return a blank.
  • Date stored as text: correct the imported value before filling the formula down.

Why dob sometimes fails

dob is not a built-in Excel reference. A formula such as =DATEDIF(dob,TODAY(),"Y") works only if somebody has already created a named range called dob. B2 is a normal cell reference that you can paste into a clean worksheet.

YEARFRAC alternative

YEARFRAC can calculate the fraction of a year between two dates. Wrap it in INT when you need completed years:

Excel formula
=INT(YEARFRAC(B2,TODAY(),1))

Compare this result with the leap-day row before adopting it. DATEDIF with the "Y" unit states the requirement, completed years, more directly, so it is the primary method in this exercise.

Your completed result

  • Every valid date of birth returns an age in completed years.
  • The future date returns a blank when you use the guarded formula.
  • The fixed-date column remains stable when the workbook is opened on another day.
  • The leap-day, birthday-today and birthday-tomorrow rows behave as expected.

Keep real employee data out of practice files

Dates of birth are personal data. Use fictional records while learning, keep only the fields needed for the calculation and do not circulate a real staff list as a training workbook.

Read the formula explanation

The companion guide explains DATEDIF, fixed dates, YEARFRAC and the common input errors in more detail.

Read how to calculate age in Excel

Practise more Excel fundamentals

Excel Introduction covers cell references, formulas, formatting and fill handles through a wider set of workplace exercises.

View Excel Introduction

Ready to train your team?

Tell us what you need and we'll come back to you with a detailed quote.

Get a quote for your team

Related Articles

  • Calculating Age in Excel
    Tips & Tricks

    How to Calculate Age in Excel: DATEDIF Formula and Examples

    Use a copy-and-paste DATEDIF formula to calculate age from a date of birth in Excel. This guide also covers fixed reporting dates, YEARFRAC and the input checks that prevent bad results.

Insights for modern teams

Stay ahead with our latest learning trends, tools, and success stories. Enter your email address below to receive updates from us.

Future Savvy
Future Savvy

Registered England and Wales: 11477692 VAT Number: GB 3123317 52All trademarks are owned by their respective owners. Click here for details.

  • Mastercard
  • American Express
  • Visa