Calculate total days left in month using Excel EOMONTH and DATEDIF

You are currently viewing Calculate total days left in month using Excel EOMONTH and DATEDIF

Here, we will learn how to calculate the total days left in the given month using the Excel EOMONTH and DATEDIF functions in one formula.

The dataset (shown in the image) contains some dates in column A. The goal is to use a single formula to find the total days left in the month of each given date. To accomplish the task, create the header column "Days left" in the cell B2. A single formula based on the EOMONTH and DATEDIF functions is used to complete the work.

The formula in B3, copied down, is:

=DATEDIF(A3,EOMONTH(A3,0),"d")

How this formula works

With the date 1-Aug-2024 in A3, EOMONTH is configured to return the last day of the month, like this: EOMONTH(A3,0) that returns 31-Aug-2024. This date goes to DATEDIF that is configured to return the difference between the two dates 1-Aug-2024 and 31-Aug-2024 in days, and returns 30 as the final output. Therefore, the answer is given that there are 30 total days left in the month 1-Aug-2024.

You have successfully learnt how to calculate the total days left in the given month using the Excel EOMONTH and DATEDIF functions in one formula! I hope this post helped you.

Download Practice Workbook

Kunal

Hey, I am Kunal Aggarwal, the founder and author of Kunal Excel Tip based in New Delhi, India. I have completed my postgraduation from NIIT Limited, New Delhi in Excel course in 2019. Since then, I have been using and learning Microsoft Excel and started writing posts on the spreadsheet software here since March 2024.

Leave a Reply