Calculate no of months between two dates

Skip to content

  • Home
  • Amazing Power BI
    • Microsoft Power BI Perth
      • Power BI Training
      • How to use Power BI
      • Microsoft Power BI Desktop
    • Microsoft Power Query
    • Microsoft Power Pivot
    • Solver Corporate Performance Management
    • ValQ – Modern Visual Planning
    • Inforiver
    • Zebra Power BI Visuals
    • Success Stories
  • Amazing Excel
    • Overview
    • Financial Modelling
    • Excel Dashboards & Reports
    • Spreadsheet Auditing
    • Spreadsheet Re-engineering
    • Success Stories
    • How To Engage Us
  • Insightful Training
    • In-house Training
    • Course List
    • Course Calendar
    • Online Training >
      • Online Power Query & DAX Training
      • Free Online Financial Modelling Training
      • Online Power BI & Excel Training
    • Excel & Power BI Mentoring / Coaching
    • Enquiry
    • Event Producers’ FAQ
  • Resources
    • Overview
    • Free Templates & Downloads >
      • Templates & Downloads
      • Invest For Excel
      • Spreadsheet Detective
    • White Papers & eBooks >
      • Free White Papers & eBooks
      • Complete VBA Style Guide
    • Free Tests
    • Excel & Power BI Newsletter
    • Links
    • Recommended Books
  • Blog
  • About Us
    • Who we are
    • Contact Us
    • Corporate Social Responsibility
    • Careers
    • Pay My Invoice
  • Cart
  • Home
  • Amazing Power BI
    • Microsoft Power BI Perth
      • Power BI Training
      • How to use Power BI
      • Microsoft Power BI Desktop
    • Microsoft Power Query
    • Microsoft Power Pivot
    • Solver Corporate Performance Management
    • ValQ – Modern Visual Planning
    • Inforiver
    • Zebra Power BI Visuals
    • Success Stories
  • Amazing Excel
    • Overview
    • Financial Modelling
    • Excel Dashboards & Reports
    • Spreadsheet Auditing
    • Spreadsheet Re-engineering
    • Success Stories
    • How To Engage Us
  • Insightful Training
    • In-house Training
    • Course List
    • Course Calendar
    • Online Training >
      • Online Power Query & DAX Training
      • Free Online Financial Modelling Training
      • Online Power BI & Excel Training
    • Excel & Power BI Mentoring / Coaching
    • Enquiry
    • Event Producers’ FAQ
  • Resources
    • Overview
    • Free Templates & Downloads >
      • Templates & Downloads
      • Invest For Excel
      • Spreadsheet Detective
    • White Papers & eBooks >
      • Free White Papers & eBooks
      • Complete VBA Style Guide
    • Free Tests
    • Excel & Power BI Newsletter
    • Links
    • Recommended Books
  • Blog
  • About Us
    • Who we are
    • Contact Us
    • Corporate Social Responsibility
    • Careers
    • Pay My Invoice
  • Cart

 How Many Months Between Two Dates

  • View Larger Image
    Calculate no of months between two dates

How many months between two dates

MONTH functions

Calculate no of months between two dates

Did you know we have a YouTube channel with weekly videos dedicated to Excel, Power Query and Power BI?

By Neale Blackwood

How many months? If you need to calculate the number of whole months between two dates there is a formula that can do it. This might be used to see how many months a project will last.

One way is to use the DATEDIF function.  This doesn’t show up in your list of functions but don’t worry … it’s still there!  It’s a compatibility function that harks back to Lotus 1-2-3 days.

Just write:

=DATEDIF(start_date, end_date, units)

Where:

  • start_date is a cell reference containing your start date
  • end_date is a cell reference containing your end date
  • units is either “M”, “Y”, or “D” depending on whether you want the number of months, years or days

e.g. if cell A1 has the start date and B1 has the end date, you could write

=DATEDIF(A1, B1, “m”)

If you want something that only uses current functions, the following formula will also calculate the number of months between the dates.

=(YEAR(B1)-YEAR(A1))*12+MONTH(B1)-MONTH(A1)

If you need to know the number of months involved in the project, add one to the formula.

Alternatively if you want a simpler approach that only gives the absolute number of months

= YEARFRAC(A1,B1) * 12

If you don’t want a decimal then wrap it in a ROUNDUP

So

= ROUNDUP ( YEARFRAC(A1,B1) * 12 , 0)

Share This Story, Choose Your Platform!

How do I calculate the difference between two dates and months in Excel?

Use the DATEDIF function when you want to calculate the difference between two dates. First put a start date in a cell, and an end date in another.

How do I calculate 2 months in Excel?

You can use the EDATE function to quickly add or subtract months from a date. The EDATE function requires two arguments: the start date and the number of months that you want to add or subtract. To subtract months, enter a negative number as the second argument. For example, =EDATE("9/15/19",-5) returns 4/15/19.

How do I calculate months between two dates in Excel without Datedif?

Another method to get the number of months between two specified dates is by using the YEARFRAC function. The YEARFRAC function will take a start date and end date as input arguments and it will give you the number of years that have passed during these two dates.

How do you find the number of months between two dates in SQL?

MONTHS_BETWEEN returns number of months between dates date1 and date2 . If date1 is later than date2 , then the result is positive. If date1 is earlier than date2 , then the result is negative.