How to Calculate Months Between Two Dates in Excel: A Step-by-Step Guide

Calculating the months between two dates in Excel might seem like a daunting task, but it’s actually pretty straightforward. All you need is a starting date, an ending date, and a basic understanding of Excel formulas. Once you have those, you’ll be able to find out exactly how many months lie between any two given dates in a jiffy.

Step by Step Tutorial on How to Calculate Months Between Two Dates in Excel

Before we dive into the steps, let’s understand what we’re about to do. We’ll be using a specific Excel function called DATEDIF, which stands for date difference. This function will help us find the number of months between the two dates we specify. Ready? Let’s go!

Step 1: Enter the Starting Date

Type the starting date into a cell in Excel.

When inputting the starting date, make sure you use a format that Excel recognizes, such as MM/DD/YYYY or DD/MM/YYYY, depending on your regional settings.

Step 2: Enter the Ending Date

Now, type the ending date into another cell.

Similar to the starting date, ensure the ending date is in a format compatible with Excel’s date recognition.

Step 3: Use the DATEDIF Function

In a new cell, type the formula =DATEDIF(start_date, end_date, “m”).

Replace start_date and end_date with the actual cell references where you typed your dates. The “m” in the formula tells Excel that you want the result in months.

Step 4: Press Enter

After typing the formula, press the Enter key to execute it.

Once you press Enter, Excel will calculate the difference between the two dates based on the formula and display the number of months in the cell where you entered the formula.

Once you’ve completed these steps, Excel will display the number of months between your two specified dates in the cell where you input the formula. This result can be used in various contexts, such as determining the length of service, age, or subscription periods.

Tips for Calculating Months Between Two Dates in Excel

  • Ensure both dates are in the same format for accurate results.
  • Remember that Excel calculations are based on a 360-day year, which might affect calculations for certain date ranges.
  • The DATEDIF function can also calculate days and years by using “d” and “y” instead of “m”.
  • Watch out for leap years when calculating months between dates, as February may have 29 days instead of 28.
  • If you receive an error, double-check that your dates are valid and that you’ve entered the formula correctly.

Frequently Asked Questions

Can I calculate months between two dates if they’re in different formats?

No, both dates need to be in a format recognized by Excel for the DATEDIF function to work properly.

What if I want to include the end date in the calculation?

You can adjust the ending date by adding one day to include it in the month count.

How does Excel handle different month lengths?

Excel uses a standard 30-day month calculation when using the DATEDIF function with “m” for months.

Can the DATEDIF function calculate years and days as well?

Yes, by using “y” for years and “d” for days you can calculate those time spans with the DATEDIF function.

Does the order of the start and end dates matter?

Yes, the start date must come before the end date, or you’ll get a negative number, or an error.


  1. Enter the starting date.
  2. Enter the ending date.
  3. Use the DATEDIF Function.
  4. Press Enter.


Calculating months between two dates in Excel is a handy skill that can be used for a variety of real-world applications. Whether you’re tracking project timelines, managing subscriptions or memberships, or simply curious about the time span between two events, Excel’s DATEDIF function is the tool for the job. With our easy-to-follow guide, you can perform these calculations quickly and accurately. Remember to keep your dates in a consistent format and check for leap years in your calculations. Excel is an incredibly powerful tool, and mastering functions like DATEDIF only adds to your data management arsenal. So go ahead, give it a try – you might just find yourself calculating months between dates for fun!