# Return the number of months and/or years between two date

You can use the simple function of taking one date value away from another to find out the number of days between two dates To calculate the number of full months between the two dates you could use a number of functions to

• Calculate if the start and end dates are complete months
• Calculate the number of months between the start date and the end of that year
• Calculate the number of months between the end date and the start of that year
• Calculate the number of full years between the dates
• Calculate the number of years x 12
• Calculate the number of months between the start date and the end of that year + the months of full years + the number of months between the end date and start of the year of the end date

All the above is unnecessary as the DATEDIF function will do all the above for you

To calculate the number of full periods enter the function as follows ‘=DATEDIF(start_date, end_date,return_type)’ This function can be utilised further the return the number of periods to ignore any full years.

For example if we wanted to know the number of months between the dates in the example but ignore the full year in between the dates

Days – 15 May 14 to 31 Dec 14 + 1 Jan 16 to 8 Feb 16 = 269

Months – Jun 14 to Dec 14 + Jan 15 = 8 