How to Calculate Age in Excel using Date of Birth

Let’s say you are preparing a data where user’s age is one of the important things to capture.

The thing is, if you ask every user to enter his/her age, chances are they can give you an approx number.

In today’s post, I’d like to share with you a simple way to calculate age in Excel using the date of birth with DATEDIF.

Download this sample file from here to follow along.

…here we go.

Quick Intro: DATEDIF

This function’s basic work is to calculate the difference between two dates returns the result in different ways. i.e. years, months, days or in years and month, month and days, years and days.

And this is the feature which makes it perfect to use in age calculation.



  • Date1 The date from where you want to start the calculation of your interval.
  • Date2 The date to which you want to calculate the interval.
  • Interval It represents the unit of the time, which will return from the function.

Steps to Calculate Age in Excel using DATEDIF

Here you need to calculate age in a format in which you could show years, months and days separately.

For example, 26 Years, 8 months & 17 days. And for this, we need to combine DATEDIF three times.

calculate age in excel using datedif function and date of birth are the steps.

[Step: 1] Calculate Completed Years of a Person’s Age

First of all, you need to calculate to total completed years between a date of birth and today's date.

And, for this the formula will be:


This will return completed years between two dates.

[Step: 2] Calculate Completed Months of a Person’s Age after Completed Years

Next thing is to calculate completed months. It means if you age is 26 Years, 5 months and 19 days, we need to get 5 months in return.

Below formula can be used:


This will return the completed months between the date of birth and today's date after completed years.

[Step: 3] Calculate Completed Days of a Person’s Age after Completed Years and Months

In the end, you need to calculate days which are left after completed years and months.

Here is the formula:


This will return the rest of the days between the date of birth and today's date after completed years and month.

[Step: 4] Combine All Three Formulas to Get Actual Age

Now it's time to combine all these to create an accurate age.

Enter below formula in a cell in your worksheet and replace Date-of-Birth with your actual birth date.

="You age is "& DATEDIF(Date-of-Birth,TODAY(),"y") &" Year(s), "& DATEDIF(Date-of-Birth,TODAY(),"ym")& " Month(s) & "& DATEDIF(Date-of-Birth,TODAY(),"md")& " Day(s)."

calculate age in excel using datedif function using date of birth combined formula

That’s all.


You might be wondering that there are other methods which we can use to calculate age.

Yes, we have but as I said this is one of the easiest methods to do that. You can calculate person’s age accurately.

I hope you found this formula tip useful.

Now tell me one this.

Have you ever calculated age in Excel?

Share your views with me in the comment section, I’d love to hear from you and please don’t forget to share this tips with your friends.

Content Protection by
  • Eric Hernandez says:

    Hello Shinwari,

    That was really helpful..


  • Jose Gabrie says:

    Hello Puneet,
    Is it possible to use this function referenced to TWO cells (i.e., date-of-birth and date-of-visit) to calculate age in certain point of time?

  • ratanak says:

    Nice post 🙂

  • Sami Shinwari says:

    its not working
    i have replaced the DOB with the data of birth

    • Puneet Gogia says:

      Hello Sami Shinwari,

      Please use sample file to try.

      Puneet Gogia

  • >