DATEDIF Function calculates the number of days, months, or years between two dates. The DATEDIF function is provided in order to support older workbooks from Lotus 1-2-3. It may calculate incorrect results under certain scenarios.
In simple terms, the DATEDIF function returns the difference between two date values for a specified interval.
DATEDIF is an inbuilt function in Excel. It is under the category of Date and Time Functions. The DATEDIF is one of the very few undocumented functions of Excel. Being undocumented means, you cannot find it in the formula list.
As a worksheet function, you can enter the DATEDIF Function as a part of a formula in a cell of a worksheet.
This function can be used when we want to calculate the number of years, months, or days between the two dates. A perfect example of it is calculating the age.
Syntax for DATEDIF Function
Start_Date: A date that represents the first, or starting, date of the period. Dates can be entered as text strings within quotation marks or as serial numbers or as the results of other formulas or functions.
End_Date: A date that represents the last, or ending, date of the period.
Units: The type of information that you want returned. Units can be any of the following:
Y = Difference in complete years
M = Difference in complete months
D = Difference in days
MD = Difference in days, ignoring months and years
YM = Difference in months, ignoring days and years
YD = Difference in days, ignoring years.
We have created the infographics for the DATEDIF Function. With the help of these infographics, you can easily learn step by step process for using this excel functions.
Furthermore, Excel consists of many inbuilt functions which are helpful in the analytical and statistical study of number.
Simply follow the instructions in the infographics below:
#VALUE! error occurs when the supplied arguments are non numeric.
#NUM! error occurs when units are numneric and other than the accepted alphabatical criteia.
To learn other function like MID, QUOTIENT and KURT Functions, please click on the name of the function.
Additionally, you can download other accounting templates like Break Even Analysis Template, Salary Sheet Template and Invoice with GST Template from here.
We thank our readers for liking, sharing and following us on different social media platforms.
If you have any queries please share in the comment section below. I will be more than happy to assist you.
Dear sir, many many thanks for awaring us excel datedif function. it is so nice that i immidiately calculated the my fd interest spreaded over in two or more finencial years. easy for calculating for interest income for it returns.
sir, i have to place the the no of days for each year ending 31march if you have a ready template for this kindly make available.
Fahim Lashkaria says
Happy to hear that it helped you. For template, your request has been noted. Will soon update on website. Thanks
How can I get the difference between two dates if the baseline date is later than the actual date? ie: we got it done sooner. Currently getting a #num! error
Fahim Lashkaria says
You might have inserted a numeric date rather than a cell reference. Using DATEDIF function with cell reference along with UNIT as described in SYntax is necessary for it to find the difference. It doesn’t matter what date you insert. I just made a calculation giving cell references for 25/09/2020 and 25/10/2020. Both dates are later dates. It calculated properly 30 days.