Excel Study · Module 7: Dates & times

Class 58Age in years: DATEDIF

Intermediate2:15 videoFree

=DATEDIF(B3,$B$1,"Y") gives the complete years between a birth date and a cut-off date: the age on that day. The earlier date goes first.

Try this AI prompt

Works in ChatGPT, Gemini, Copilot or Claude.

In Excel, B5 has a child's birth date and B1 has a cut-off date. Write a formula for C7 that gives the child's exact age on the cut-off date, in complete years. It must work in Excel 2016.

The answer that works

✓ checked in Excel
=DATEDIF(B5,B1,"Y")

AI can get Excel wrong. Paste its answer into Excel and test it before you trust it.