Excel Formulas to Calculate the Years Between Dates ~ Simple Tricks!!
Tags: excelformula, excelformulas
Published: 2021-05-03 11:26:54

---
title: Excel Formulas to Calculate the Years Between Dates ~ Simple Tricks!!
published: true
date: 2021-05-01 09:56:43 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-to-calculate-the-years-between-dates/
---

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](https://www.microsoft.com/en-in/microsoft-365/excel)

[![Calculate number of years between two dates](https://geekexcel.com/wp-content/uploads/2021/05/Calculate-number-of-years-between-two-dates.png)](https://geekexcel.com/excel-formulas-to-calculate-the-years-between-dates/calculate-number-of-years-between-two-dates/#main)<figcaption id="caption-attachment-34945">Calculate the number of years between two dates</figcaption>

## General Formula:

- If you want to get the number of years between two dates, you can use the below formula.

**=[YEARFRAC](https://geekexcel.com/how-to-use-yearfrac-function-in-microsoft-excel-365/)(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](https://geekexcel.com/how-to-use-yearfrac-function-in-microsoft-excel-365/)**.
- **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.

![Input Ranges](https://geekexcel.com/wp-content/uploads/2021/05/Input-Ranges-2.png)<figcaption id="caption-attachment-34943">Input Ranges</figcaption>

- So, apply the above-given formula to the [**formula bar**](https://geekexcel.com/how-to-use-formula-bar-for-various-purpose-in-excel-365/) section and press the  **ENTER**  key.

![Enter the formula](https://geekexcel.com/wp-content/uploads/2021/05/Enter-the-formula-2.png)<figcaption id="caption-attachment-34942">Enter the formula</figcaption>

- Finally, we will get the result in the selected cell.

![Result](https://geekexcel.com/wp-content/uploads/2021/05/Result-3.png)<figcaption id="caption-attachment-34944">Result</figcaption>

## 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.

### Read Also:

- **[Excel Formulas to Add or Subtract the Years to the Given Date!!](https://geekexcel.com/excel-formulas-to-add-or-subtract-the-years-to-the-given-date/)**
- **[Excel Formulas to Add or Subtract Days From the Given Date!!](https://geekexcel.com/excel-formulas-to-add-or-subtract-days-from-the-given-date/)**