Today, we want to cal­cu­late the age bas­ing on the date of birth.

Cal­cu­lat­ing the age based on date of birth

It’s a real­ly sim­ple task. We just want to know one hid­den func­tion. It’s called DATEDIF. Excel won’t show its syn­tax, but it will cal­cu­late it prop­er­ly, if we give it prop­er argu­ments. The first argu­ment of this func­tion is the start date, which is our date of birth. The sec­ond argu­ment is the TODAY func­tion. The last argu­ment is ‘Y’, as we want to cal­cu­late whole years (Fig. 1)

=date­dif(A2,TODAY(),“Y”)

Whole formula
Fig. 1 Whole formula

And just like that, we have cal­cu­lat­ed the age bas­ing on the date of birth (Fig. 2)

Results
Fig. 2 Results