Calculate the difference between two dates using DATEDIF.
You need to calculate the age of employees based on their birthdates. Calculate the age in years in column C using the DATEDIF function, finding the difference between the birthdate in column B and the date 1/1/2026.
Solve without hints for +5 XP
This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.
| A | B | C | |
|---|---|---|---|
| 1 | Employee | Birthdate | Age (Years) |
| 2 | John | 1/15/1990 | |
| 3 | Mary | 5/20/1985 | |
| 4 | Tom | 12/31/2000 |
DATEDIF function is useful for calculating the difference between two dates in various units (days, months, years), which is common in HR, finance, or project management. In this task, you use a fixed date (1/1/2026) as the end date. Notice that John comes back 35, not 36: DATEDIF counts birthdays that have actually happened, and his falls on 15 January. Subtracting the years instead — 2026 minus 1990 — overstates the age of everyone born later in the year than your cut-off date, which is roughly half the people in any payroll.