Solved

Calculate a person's age from their date of birth in Excel.

Posted on 2013-05-29
6
470 Views
Last Modified: 2013-05-30
Hello,

Suppose a person's date of birth (DOB) is displayed in cell A1 (as a date format such as "mm/dd/yy"). What (non-VBA) formula in Excel will calculate and display the person's age in years?

I realize that the formula will somehow include the difference:

    =TODAY() – DOB

but I am not quite sure what other functions to use and how to include them in the formula.

Also, Googling to various sites led to a couple of solutions which utilize the value 365.25 days per year (which is an approximation to account for leap year). However, I seem to remember seeing a solution in the past which does not include the approximation but calculates the answer directly. That's the formula I'm looking for.

Thanks
0
Comment
Question by:Steve_Brady
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 31

Expert Comment

by:Frosty555
ID: 39206386
How about YEARFRAC()?

http://office.microsoft.com/en-ca/excel-help/yearfrac-HP005209344.aspx

=YEARFRAC(TODAY(),A1)    

(where "A1" is the cell containing the date of birth)
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 39206418
Hi,

There is a discussion on date calculations within this recent thread:

"Excel formula that tells you the number of months" (20 May 2013)

[ http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_28133886.html ]

BFN,

fp.
0
 
LVL 24

Expert Comment

by:Steve
ID: 39206827
Using YEARFRAC and INT to give the age in whole years:
        =INT(YEARFRAC(A1,TODAY()))
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 39207289
Hello Steve,

I see that fanpages' link has some discussion of DATEDIF and the possible problems with that function....but purely for age in years (i.e. using "y" as 3rd argument) I have not seen any instances where it doesn't give accurate results in any version of excel so that's what I'd use here

=DATEDIF(A1,TODAY(),"y")

DATEDIF is not very well documented by Microsoft - see here for more details

If you don't trust DATEDIF then this formula gives me the same results in all the tests I made

=YEAR(B1)-YEAR(A1)-(TEXT(B1,"mmdd")< TEXT(A1,"mmdd"))

where A1 and B1 are dates and B1 is later

Obviously I'm expecting that the age in years will increment only on the exact anniversary of the DOB (or on 1st March in non leap years for any 29th Feb DOBs). I noticed that The Barman's suggestion with INT and YEARFRAC works in most cases but not all, e.g. if DOB is 31-Jul-1963 then I'm getting 50 one day early on 30-Jul-2013

regards, barry
0
 

Author Closing Comment

by:Steve_Brady
ID: 39207826
Thanks Barry.
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 39208303
You're welcome, Steve_Brady.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question