Have you ever tried to calculate the number of years between two dates? Excel has the amazing function to achieve this job quickly. Let’s get into this article. This article provides some simple formulas to help you quickly get it done. Get an official version of ** MS Excel** from the following link: https://www.microsoft.com/en-in/microsoft-365/excel
General Formula:
- If you want to get the number of years between two dates, you can use the below formula.
=YEARFRAC(start_date,end_date)
Syntax Explanations:
- YEARFRAC – This function helps to return the fraction of the year by calculating the number of whole days between two dates. Read more on the YEARFRAC function.
- Start_date – It represents the starting date from your input range.
- End_dat – It specifies the ending date from your input range.
- Comma symbol (,) – It is a separator that helps to separate a list of values.
- Parenthesis () – The main purpose of this symbol is to group the elements.
Practical Example:
Let’s consider the below example image.
- Here, we will enter the input values in Column B and Column C.
- Now we are going to find out the number of years based on the given input values.
- So, apply the above-given formula to the formula bar section and press the ENTER key.
- Finally, we will get the result in the selected cell.
Closure:
In this post, we have shown the simple formula to calculate the number of years between two dates in Excel. Hope you like it. Let me know if you have any doubts regarding this article or any other Excel/VBA topic.
Top comments (0)