Excel and Office RAQ

Calculate difference between two dates in Excel


Tactical solutions

Research projects

Microsoft Office

Multiple choice guessing


Knowledge measurement audit

Item bank services

Item design course








Technical articles

Excel and Office RAQ

Free Excel Add-in

Free PowerPoint Add-in


Home page

Q: Can anyone help me?  I'm trying to determine the difference between 2 dates to determine who old a person is. The first cell would contain the person's birthdate and the second cell would contain today's date. I would appreciate any help.

A: The easiest way to do this is with the DATEDIF function, which although entirely undocumented is present as a built-in function in all recent versions of Excel. 

Assuming A1 contains the date of birth and B1 contains =TODAY(), then input in C1:


Other entries in place of the "y" will help you be more precise:

  - use "ym" to tell you how many spare months

  - use "md" to tell you how many spare days

This formula will tell you an age in Years, months and days:

  =DATEDIF(A1,B1,"y") & " years, " & DATEDIF(A1,B1,"ym") & " months," & DATEDIF(A1,B1,"md") & " days" 

(NB: Thanks to Glenda Wells for suggesting the last formula.)



Back to other RAQ topics