Excel Formulas to Calculate Days, Months & Years between Two Dates!!
Tags: excelformula, excelformulas
Published: 2021-05-15 08:07:53

---
title: Excel Formulas to Calculate Days, Months & Years between Two Dates!!
published: true
date: 2021-05-13 13:34:53 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-to-calculate-days-months-years-between-two-dates/
---

In the previous post, we have learned how to [**get the days, hours, and minutes between these two dates**](https://geekexcel.com/excel-formulas-to-calculate-days-hours-minutes-between-two-dates/). Similarly, here we will show the simple formula to **calculate the difference in days, months, and years between two dates in Excel**. Let’s get into this article!! 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)

[![Get days, months and years](https://geekexcel.com/wp-content/uploads/2021/05/Get-days-months-and-years.png)](https://geekexcel.com/excel-formulas-to-calculate-days-months-years-between-two-dates/get-days-months-and-years/#main)<figcaption id="caption-attachment-41514">Get days, months and years</figcaption>

## General Formula:

- If you want to get the number of days with months and years between two dates, you can see the below formula.

**=[DATEDIF](https://geekexcel.com/how-to-use-datedif-function-in-microsoft-excel-365/)(start,end,”y”) &” years,”&DATEDIF(start,end,”ym”) &” months,” &DATEDIF(start,end,”md”) &” days”**

## Syntax Explanations:

- **DATEDIF** – The Excel [**DATED function**](https://geekexcel.com/how-to-use-datedif-function-in-microsoft-excel-365/)calculated the **difference between the two dates**.
- **Start** – It specifies the starting range from your worksheet.
- **End** – It represents the ending range from your worksheet.
- **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.

## 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 calculate the difference between these input dates.

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

- Select any cell and type the above-given formula.

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

- Finally, press  **ENTER**  to get the result out, if you need, drag the fill handle over range to apply the formula.

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

## Conclusion:

In this article, we have described the simple formula to **get the days, months, and years between these two dates in Excel**. Hope you like it. If you have any **questions** , feel free to **comment**.

Thank you so much for visiting  **[Geek Excel](https://geekexcel.com/)!! **If you want to learn more helpful formulas, check out [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!! **

### Read Ahead:

- **[Excel Formulas to Find the Number of Days in a Month ~ Simple Method!!](https://geekexcel.com/excel-formulas-to-find-the-number-of-days-in-a-month-simple-method/)**
- **[How to Compare Two Ranges using Macros (VBA) in Excel 365?](https://geekexcel.com/how-to-compare-two-ranges-using-macros-vba-in-excel-365/)**
- **[Excel Formulas to Extract the Time from Date and Time ~ Quick Method!!](https://geekexcel.com/excel-formulas-to-extract-the-time-from-date-and-time/)**
- **[Enter the Date in Excel Sheet ~ Step-by-Step Procedure!!](https://geekexcel.com/enter-the-date-excel/)**