How do I calculate the number of years between two dates in Excel? 2

How do I calculate the number of years between two dates in Excel?

Calculating the number of years between two dates in Excel can be easily done by using the DATEDIF function. This function calculates the difference between two dates in years, months, or days. Simply input the two dates in the correct format and use the DATEDIF function to determine the number of years between them. This is a useful tool for tracking time-based data and can be applied to various tasks such as financial planning, project management, and data analysis. With its simple and efficient method, Excel makes it easy to calculate the number of years between two dates.

Excel: Calculate Years Between Two Dates


You can use the following formulas to calculate the number of years between two dates in Excel:

Formula 1: Calculate Full Years Between Two Dates

=INT(YEARFRAC(A2,B2))

Formula 2: Calculate Fractional Years Between Two Dates

YEARFRAC(A2,B2)

Both formulas assume that cell A2 contains the start date and cell B2 contains the end date.

The following examples show how to use each formula in practice.

Example 1: Calculate Full Years Between Two Dates

The following screenshot shows how to calculate the number of full years between a list of start and end dates in Excel:

calculate full years between two dates in Excel

Here’s how to interpret the output:

  • There are 16 full years between 1/4/2005 and 1/1/2022.
  • There are 15 full years between 3/15/2007 and 3/15/2022.
  • There are 14 full years between 4/14/2008 and 4/18/2022.

And so on.

Example 2: Calculate Fractional Years Between Two Dates

The following screenshot shows how to calculate the number of fractional years between a list of start and end dates in Excel:

calculate fractional years between two dates in Excel

Here’s how to interpret the output:

  • There are 16.992 years between 1/4/2005 and 1/1/2022.
  • There are 15 years between 3/15/2007 and 3/15/2022.
  • There are 14.011 years between 4/14/2008 and 4/18/2022.

And so on.

Note: You can find the complete documentation for the YEARFRAC function in Excel .

The following tutorials explain how to perform other common tasks in Excel:

Cite this article

stats writer (2024). How do I calculate the number of years between two dates in Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-do-i-calculate-the-number-of-years-between-two-dates-in-excel/

stats writer. "How do I calculate the number of years between two dates in Excel?." PSYCHOLOGICAL SCALES, 25 Jun. 2024, https://scales.arabpsychology.com/stats/how-do-i-calculate-the-number-of-years-between-two-dates-in-excel/.

stats writer. "How do I calculate the number of years between two dates in Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-do-i-calculate-the-number-of-years-between-two-dates-in-excel/.

stats writer (2024) 'How do I calculate the number of years between two dates in Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-do-i-calculate-the-number-of-years-between-two-dates-in-excel/.

[1] stats writer, "How do I calculate the number of years between two dates in Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How do I calculate the number of years between two dates in Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top