What is DATEDIF function in Excel? DATEDIF function is one of Date and Time functions in Microsoft Excel that calculates the number of days, months, or years between two dates. Warning: Excel provides the DATEDIF function in order to support older workbooks from Lotus 1-2-3. The DATEDIF function may calculate incorrect results under certain scenarios. Syntax of DATEDIF function DATEDIF(start_date,end_date,unit) Start_date: A date that…

# Tag: DATEDIF function

## How to calculate months between dates in Excel

To calculate months between two dates as a whole number, you can use the DATEDIF function. Formula =DATEDIF(start_date,end_date,”m”) Explanation In the example shown, the formula in D6 is: =DATEDIF(B6,C6,”m”) Note that the DATEDIF automatically rounds down. To round up to the nearest month, see below. The mystery of DATEDIF The DATEDIF function is a “compatibility” function that comes from Lotus…

## How to calculate next anniversary date or birthday in Excel

To calculate the next anniversary date, you can use a formula based on the EDATE and DATEDIF functions. Case Study: Assume fixing anniversary date as June 1, 2017 in all examples. Formula =EDATE(date,(DATEDIF(date,as_of,”y”)+1)*12) Explanation In the example shown, the formula in D5 is: =EDATE(B5,(DATEDIF(B5,C5,”y”)+1)*12) This formula will work to calculate next upcoming birthday as well. How this formula works Working from the…

## Get days, months, and years between dates in Excel

This tutorial show how to Get days, months, and years between dates in Excel using the example below. To calculate and display the time between dates in days, months, and years, you can use the a formula based on the DATEDIF function. Note: The DATEDIF function is designed to calculate the difference between dates in years, months, and days. There are…

## Get days between dates ignoring years in Excel

To calculate days between two dates, ignoring year values, use the DATEDIF function. Formula =DATEDIF(start_date,end_date,”yd”) In the example shown, the formula in D6 is: =DATEDIF(B6,C6,”yd”) Explanation The DATEDIF function can handle a variety of “date difference” calculations to calculate the difference between two dates in years, months, and days. DATEDIF takes 3 arguments: start date, end_date, and “unit”, which controls which…

## How to get number of days, weeks, months or years between two dates in Excel

To get the number of days, weeks or years between two dates in Excel, use the DATEDIF function. The DATEDIF function has three arguments. 1. Fill in “d” for the third argument to get the number of days between two dates. Note: =A2-A1 produces the exact same result! 2. Fill in “m” for the third argument to get the number of months…

## How to Calculate Age in Excel

To calculate the age of a person in Excel, use the DATEDIF function and the TODAY function. The DATEDIF function has three arguments. 1. Enter the date of birth into cell A2. 2. Enter the TODAY function into cell B2 to return today’s date. 3. The DATEDIF function below calculates the age of a person. Note: fill in “y” for the third…

## How to calculate number of Days until Birthday

To calculate the number of days until your birthday in Excel, execute the following steps. 1. Enter the date of birth into cell A2. 2. Enter the TODAY function into cell B2 to return today’s date. 3. The most difficult part in order to get the number of days until your birthday is to find your next birthday. The formula below does the trick. Explanation:…