# How to Calculate Ages in Month

There are several different methods to calculate the ages in years, but it is slightly different when calculating the ages in months because of the variation of the days in a month. Depending on the year and month, the number of days in a month can be 28, 29, 30, or 31. As a result, it is not ideal to use the number of days between the two dates divided by the number of days in a month.

Example: In the following example, the start date is in column A, and the end date is in column B.

Formula: To calculate the age between the start date and the end date.

One method to calculate the ages in months is to use the DATEDIF function, which can return the number of days, months, or years between the two dates.

=DATEDIF(A2, B2, "M")

"M" is the calculation type for the number of months, and please check below for the complete calculation types.

• "Y": The number of years;
• "M": The number of months;
• "D": The number of days;
• "MD": The difference when ignoring the years and months;
• "YM": The difference when ignoring the years and days;
• "YD": The difference when ignoring the year.

Please note that only the number of full months will be counted. For example, this is to count the number of full months between the two dates. For example, "May 20, 2011" to "June 25, 2011" is one month and five days, and the result will be 1 when using the DATEDIF function.