Monday, May 31, 2010

Excel Formula : Calculating Age

Today I am sharing with a long formula for calculating age based in Date of Birth as input.


This formula calculates age of a person with the accuracy of exact years , months and days

This considers that the Date of Birth is available at Cell A1 of the worksheet. You will need to replace this

Download excel file containing formula to calculate age based on Date of Birth


  1. A shorter formula:

    =CONCATENATE(DATEDIF(A1,TODAY(),"y")," years ",MOD(DATEDIF(A1,TODAY(),"m"),12), " Months")

  2. jialin: pretty good, but don't think DATEDIF is in Excel 2007. It was in earlier versions, right? Perhaps something similar can be accomplished with DAYS360?

    I was thinking something along these lines:
    =TEXT(TODAY()-A1,"YYYY")-1900&" Years "&MONTH(TODAY()-A1)-1&" Months "&DAY(TODAY()-A1)&" Days"

    Still, all of our formulas needed to be modified to include logic for singular values and zero values for all three: years, months, and days.

  3. Hello Mr Gupta

    Following is not very short but comes close to figure out the remaining nights sleep till the next birthday. Here C1=date today b2 = date of birth and d2 = calculated birthday this year
    =IF(MONTH($C$1)<MONTH(B2);"still "&(DATEVALUE(D2))-TODAY()&" nights sleep";IF(AND(MONTH($C$1)=MONTH(B2);DAY($C$1)<DAY(B2));"still "&(DATEVALUE(D2))-TODAY()&" night(s) sleep";IF(AND(MONTH($C$1)=MONTH(B2);DAY($C$1)=DAY(B2));"**Heep Heep Huray !!!!**";"still "&EDATE(Datevalue(D2);12)-TODAY()&" nights sleep")))

  4. @Squash DATEDIF works in 2003 and 2007 as well. It is just that it is not a regular excel function. It is a VBA function and hence there is no help available in excel and the argument directions don't turn up.

  5. Hello Yogesh ji,

    I need a help from you.

    I want to put a formula in sheet2 which should calculate as per the last (filled) row of sheet1.

    for eg.
    in sheet1 Cell A61 is 408 & B61 is 203... I want to show the sum of these two in the Cell A12 of sheet2.. but I want the firmula to use the lastest row of Sheet1... say if A62 is 410 & B62 is 200 then A12 of sheet2 should show "610" and like wise everytime there is new entry in sheet1.

    hope I am clear in my question.


  6. I'm not sure why you posted this particular question under this blog article. However, assuming there are **no** blank cells in Column A (which I'm assuming will always have the last value on the sheet in it), then try this formula...


    Rick Rothstein (MVP - Excel)

  7. Hi Amit

    You can use following formula to get the last entered numeric value in column A of sheet1


    I hope you will be able to modify this to get value in column B

    Regards//Yogesh Gupta

  8. Hello Yogesh ji,

    thanks for the formula, its working.



  9. hi yogesji, i have an excel sheet having multiple data and every data row have a blank row beetween two rows. i want to delete the blank row in one shot, is it possible pls. help me.

  10. Hai Sir, you done great job for intermediate learner for excel we want to some accounting templates like daybook, ledger and balance sheet:
    once we enter the transaction that can automatically updated in ledger and balance sheet please send me my mail id is

  11. This comment has been removed by the author.

  12. Dear SIr,
    can we calculate age by the following formula. Please answer me. (put DOB at Cell A1)

    =+DATEDIF(A1,NOW(),"Y")&" Years, "&DATEDIF(A1,NOW(),"ym")&" Months, "&DATEDIF(A1,NOW(),"md")&" Day."

    From: Sujit Dhar

  13. Try This ;)

    =DATEDIF(A1,TODAY(),"y") & " years " & DATEDIF(A1,TODAY(),"ym") & " months " & DATEDIF(A1,TODAY(),"md")+1 & " days "

  14. Sir,

    My self santosh I want to some information about my excel sheet simplifying.

  15. sir, my self anoop singh. I want to pint a check book in excel work sheet, but i hve sme prblm like i want to print numeric value in text. Supose 120460.But spellcurr()formula RETURN value one hudred twnty thousnd four hundrd sixty only. But I want print "One lack twenty thounsd four hundrd sixty only"
    I hope Sir u help me better.

  16. I'm using the =INT((TODAY()-AB2)/365.25). It does give me the age, but if I don't have a date in the birthday cell(AB2) I get a "111" in the age cell.
    How can I make the age cell blank if there is no date in the birthday cell? Thanks!

  17. hi there
    i recently created a worksheet for paid and unpaid invoices and just need to know if i can somehow put a tick and a cross sign showing whether it has been paid or not.
    If so please help me out.
    Shishir Sharma

  18. @gfizz....if(A! <> "",int((today()-A1)365.25),"no date")

    this is just if operator logic...if u find other logic plz let me know

  19. =DATEDIF(Bd,TODAY(),"y") & " Years "&DATEDIF(Bd,TODAY(),"ym") & " Months "&DATEDIF(Bd,TODAY(),"md") &" Days"

  20. hello, i need to know how to convert word to number and number to word in excel 2007. i've seen your spellcurr formula but i don't have it.

  21. i wanto view to oracle data .dat file in excle sheet.

  22. Yogesh ji please help me: How can i convert Date into Text format i.e. 17-08-1977 as Seventeenth August Nineteen Seventy Seven.. plz

  23. Dear sir,

    Please help me,

    I update in excel of our Sales order, when its gone out I put Date of dispatch,

    I want when I put date, it should be, Hide in the next sheet, only show pending order which is not gone.

    if its possible please inform me sir,

  24. Dear Sir,

    Can we have the formula for tracking the change in number of two cloumns by auto change in the cell color ( +ve, -ve and equal values)

  25. nice information i found online date of birth calculator

  26. nice information i found online date of birth calculator