What you will learn
- Find an age in years with DATEDIF
- Count full months between dates
How it works
=DATEDIF(B2,$F$1,"Y") counts full years from the birthday to the date in F1.
Lock F1 with $ so every row uses the same date.
Formulas at a glance
=DATEDIF(start,end,"Y") | years |
=DATEDIF(start,end,"M") | months |
Example
Write the formula to find Ana's age on the date in F1.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Name | Birthday | Age | Months old | As of | 6/1/2026 |
| 2 | Ana | 4/12/2014 | ||||
| 3 | Ben | 11/3/2013 | ||||
| 4 | Cleo | 7/28/2014 | ||||
| 5 | Dev | 1/9/2015 | ||||
| 6 | ||||||
| 7 | Gus | 9/9/2014 |
Click C2 and type =DATEDIF(B2,$F$1,"Y"), then press Enter.
The answer is 12.
When to use it
- Ages from birthdays
- Years of service
- Full months between two dates
Common mistakes
- The start date after the end dateDATEDIF shows #NUM!. Put the earlier date first.
- Forgetting the quotes on "Y"The unit goes in quotes.
- Not finding it in the function listDATEDIF is hidden from the list, but it works when you type it.
Practice it on a real sheet
Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.