Open In App

Using MONTH and EOMONTH functions in Excel

Last Updated: 07 Nov, 2023

T

Summarize
Comments
Improve
Suggest changes
Like Article
Like
Share
Report
News Follow

In this easy-to-follow guide, we'll explore the Excel MONTH and EOMONTH functions. These functions are super handy for working with dates. We'll show you how to use them to figure out which month a date belongs to, get the first and last day of a month, and more. Whether you're new to Excel or an experienced user, this tutorial will help you become a pro at handling dates in your spreadsheets. By the end, you'll be able to breeze through date-related tasks and make your Excel work even smoother. So, let's dive in and master these functions together!

MONTH and EOMONTH are built-in functions in Excel that assist users in performing date-based operations, particularly those tied to months. Let's delve into each function and see how they can be useful:

Excel MONTH Function - Syntax and Uses

The MONTH function is primarily used to extract the month from the date entered. It gives output in numbers ranging from 1 to 12.

Syntax for MONTH function

MONTH (serial_number)
 

Applications:

  • Sales Analysis - Extracting month from sales date and summarizing sales data
  • Academics and Research - For researchers collecting data over time to categorize their findings month-wise. Institutions can also plan academic schedules, holidays, and examinations months.
  • Healthcare - Analyzing patient visitation trends.

How to Get Month Number from Date in Excel

The input to the MONTH function can be:

  • A serial number from which a valid date can be extracted
  • Reference to cells containing dates
  • Date values returned from Excel formulas

Formula:

= MONTH (DATE(2022,6,7)) returns 6 
As the date is 7th June 2022

= MONTH (D3) returns the month of date present in the cell D3

= MONTH ("07-June-2022") also returns 6

Example:

Screenshot-2023-10-21-202601
Variations of inputs that can be passed to MONTH


How to Extract Month Name from Date in Excel

This can be achieved by using the TEXT function. But it is only applicable to a specific type of data code - DD-MMM-YY where the month is written using letters.

Formula:

= TEXT(B2, "mmm") - it will return an abbreviated name of the month (upto three letters), like Jun for June

= TEXT(B2, "mmmm") - it will return a full month name i.e. November, December

Example:

Screenshot-2023-11-04-132029
Extracting Month Name from Date using TEXT Function

How to Convert Month Name to Month Number in Excel

This can be achieved by a combination of two functions - DATEVALUE and MONTH.

DATEVALUE converts a date stored as text to a serial number. While MONTH extracts the month number from the date.

Formula:

= MONTH (DATEVALUE(D3 & "1"))

  • D3 is a cell containing the month name we want to convert
  • &"1" is added to aid the DATEVALUE function to understand it's a date


Example:

Screenshot-2023-10-22-111651
Converting month name to month number using MONTH and DATEVALUE functions

How to Convert Month Name to Number in Excel

Numbers 1-12 can be converted to their corresponding month names using the TEXT function. We need to multiply the number by 28 to convert it into a corresponding serial number understandable by the computer.

Formula:

= TEXT(B12 * 28, "mmm") will return the abbreviated month name (upto three letters) i.e. Apr for April

= TEXT(B12 * 28, "mmmm") will return the full month name i.e. November, December etc. 
 

The month name can be extracted from a date format as well. For example:

= TEXT(DATE(2016, B12, 7), "mmm")

Here year and date are given whereas, B12 contains the month number. DATE will convert this information to a valid date code, from which TEXT will extract the month name.

Example:

Screenshot-2023-11-04-133527
Converting Month Number to Month Name using TEXT function

How to Get the Last Day of a Month - EOMONTH Function

EOMONTH function denotes the End of the Month and is used to calculate the end date given a specified time interval and start date.

Syntax for EOMONTH Function:

EOMONTH (start_date, months)

Months denotes the number of months before or after the start date. Positive values are used for finding dates in the future while negative ones for the past.

Example

=EOMONTH(D3, 4) - returns the last day of month 4 months after the date in cell D3

=EOMONTH(D3, -4) - returns the last day of month 4 months before the date in cell D3

=EOMONTH("07-December-2023", 0) or =EOMONTH(DATE(2023,12,7), 0) - returns last date of current month

=EOMONTH(TODAY(), 0) also returns last day of the current month

Screenshot-2023-10-22-115227
Example Operations using EOMONTH Function

Note - EOMONTH returns a serial number representing the resultant date. It can be converted into a comprehensive date

using the TEXT function. The TEXT function takes the value to be converted and date format type as its parameters.

Potential Errors that Can Occur

  • #NUM! error can occur if the start_date is not a valid Excel date
  • #VALUE error can occur if any of the supplied arguments are non-numeric.
  • If a decimal value is provided for a month - the EOMONTH function will only take into account the integer part.

Applications

  • Financial Modelling - This function finds its use in financial modeling, the process of finding a specific date can be efficiently automated with its help. It can be used in the monthly, quarterly, and annual financial models.
  • Financial Analysts - It can also be useful for financial analysts when they have to calculate maturity dates for accounts payable or accounts receivable that fall on the last day of the month.

How to Get the First Day of a Month

There are many ways to get the first day of a month. Though there are various methods to find it, we can also make use of the EOMONTH function to get the first day. The various techniques are:

Get the 1st day of the month by the Month Number

We can make use of the DATE function to find out the first day of the given month number.

Formula:

= DATE(year, month number, 1)

We have to feed the current year, month number, etc. on our own in this case.
 

Example:
 

Screenshot-2023-11-04-211733
Finding first date of the month in which the given date lies

Get the 1st day of the Month from a Date

If we want to calculate the first date in relation to the month provided in a specific date then we can employ both DATE and MONTH functions to do so.

Formula:

=DATE(year, MONTH(cell with the date), 1)

The formula will return the first day of the month based on the date fed to the MONTH function, be it referenced from a cell or a direct date code.
 

Example:

Screenshot-2023-11-04-211846
Finding first day of the month in which the dates in the mentioned cells lie

Find the First Day of the Month Based on the Current Date

When we are required to work with the current date and cannot specify the required month or year, then we can make use of the EOMONTH and TODAY functions.

Formula:

= EOMONTH(TODAY(), 0) + 1 extracts the first day of the next month

= EOMONTH(TODAY(), -2) + 1 extracts the first day of the previous month

= EOMONTH(TODAY(), -1) + 1 extracts the first day of the current month
 

Example:

Screenshot-2023-11-04-212026
Finding the first date of the current month using the EOMONTH function

The same task can also be performed using MONTH, DATE, TODAY, and YEAR functions. One can use the YEAR function to extract the year and MONTH to extract the month from the current date and feed it to the DATE function, with 1 set as the day.

In order to obtain the first dates of previous or next months one can just subtract or add 1 to the month number returned by the MONTH function.

Formula:

= DATE(YEAR(TODAY()), MONTH(TODAY()), 1) returns the first date of the current month

= DATE(YEAR(TODAY()), MONTH(TODAY()) + 1, 1) returns the first date of the following month

= DATE(YEAR(TODAY()), MONTH(TODAY()) - 1, 1) returns the first date of the previous month

Example:

Screenshot-2023-11-04-212139
Finding the first date of the current month using DATE, YEAR, and MONTH functions

Calculating the Number of Days in a Month

Excel doesn't specifically provide a function to calculate the number of days in a given month. But there do exist a variety of functions that work with dates and times that we can employ for this purpose. 
 

Get the Number of Days Based on the Month Number

If the month number and year are known, then we can use a combination of DAY and DATE formulae to get the number of days in that month.

Formula:

= DAY(DATE(year, month_number + 1, 1) -1)

How this formula works is, that the DATE function will return the first day of the following month, from which when 1 is subtracted, we get the last date of the month wanted. The DAY function will convert the date to a number. 
 

Example:
 

Screenshot-2023-11-04-212818
Finding the number of Days in the required month by finding last date of the month

To Get the Number of Days in a Month Based on Date

If the month number is not known, but we do know any date within that month, then the YEAR and MONTH functions can be used to extract the year and month number from the date. Then we just need to input these into the DAY/DATE formula and the no. of days will be calculated.

Formula:

= DAY(DATE(YEAR(A13), MONTH(A13) + 1, 1) -1)

Alternatively, the EOMONTH formula can be used to just return the last day of the month, which is further converted to the number of days by extracting the day.

Formula:

= DAY(EOMONTH(A1, 0))

Example:

Screenshot-2023-11-04-213547
Finding the Number of Days using YEAR, MONTH, and EOMONTH functions

How to Sum Data By Month in Excel

We may want to get the sum of values for a particular month from tables that contain a large amount of data. Further problems may arise if the data is not in chronological order.

To solve this problem we can add a helper column that will convert dates to month numbers using a simple Excel MONTH formula.

The next step will be to list down numbers that are of interest in an empty column, and the sum values of each month using the following formula:

= SUMIF(D4:D14, F4, C4:C14)

Where F4 contains the desired month number.

Example:

Screenshot-2023-11-04-204453
Calculation of total sales per month using Helper Column

A shorter and simpler method to perform the same task without the helper column will be to use the formula:

= SUMPRODUCT((MONTH(C4:C14) = F4) * (D4:D14))

 

Here column D contains dates, column D contains the values to sum and F4 contains the month number.

How to Conditionally Format Dates Based on Month

To take the calculations and visual presentations a step further, we can use the capabilities of Excel conditional formatting for dates using the Excel MONTH and EOMONTH functions.
 

Highlight Dates Within the Current Month

If we want to highlight all rows with the current month dates we can follow the following steps:

  • Extract the month numbers from dates in a column using the simplest =MONTH(A15) formula.
  • Compare these numbers with the current month given by =MONTH(TODAY())
  • Based on what the formula returns (TRUE or FALSE), create an Excel conditional formatting rule

Formula:

= MONTH(A15) = MONTH(TODAY())

Example:

Step 1: Select the Data and Create a New Rule with the formula and formatting in Conditional Formatting Manager

Screenshot-2023-11-04-202650
Select the Data and Create a New Rule with the formula and formatting in Conditional Formatting Manager

Step 2: Apply the Formula to the selected range

Screenshot-2023-11-04-202727
Apply the formula to the selected range

Highlighting Dates by Month and Day

If we want to highlight the gazetted holidays in our worksheet regardless of the year, for e.g. Diwali or New Year, then we can use the DAY and MONTH functions for the same.

Formula:

= AND (OR (DAY(A15) = 25, DAY(A15) = 31), MONTH (A15) = 12)

We use the DAY function to extract the day of the month (1-31) and the MONTH function to get the month number, and then check if the DAY is equal to either 25 or 31 and the MONTH is equal to 12.
 

Example:

Step 1: Create a New Rule in the Conditional Formatting Manager

Screenshot-2023-11-04-201436
Create a New Rule in Conditional Formatting Manager

Step 2: Specify the Formatting that needs to be applied to Cells for which the formula returns TRUE

Screenshot-2023-11-04-200711
Specify the Formatting that needs to be applied to Cells for which the formula returns TRUE

Step 3: Select the range for which the formula needs to be applied and click Apply and OK

Screenshot-2023-11-04-201733
Select the range for which the formula needs to be applied and click Apply and OK


Example Use Case: Budget Planning for a Company

A company prepares its budgeting plans on a quarterly basis. However, within each quarter, the company also has to set aside specific funds at the end of each month for certain mandatory expenses. Here's how the EOMONTH function can be utilized in this context:

1. Determining Employee Bonus Allocation

Employees are given bonuses at the end of every quarter. To prepare for this, the financial analyst wants to know the exact end date of the month, 3 months from the current date, which denotes the end of the quarter.

If today's date, for example, is "15-January-2024", the formula in Excel would be:

=EOMONTH (TODAY(), 3)

Output:

45412 which represents 30 April 2024

2. Evaluating Quarterly Rent Payments

The company pays rent for its office spaces at the end of every quarter. The accounts department needs to know the last date of the month, 3 months prior, to ensure they've accounted for the past quarter's rent.

Assuming today's date is "15-April-2024", the formula would be:

=EOMONTH (TODAY(), -3)

Output:

45230 which represents 30 October 2023

3. Year End Closing

The company closes its financial books annually. To know the exact end date of the current financial year, the analyst can use the formula:

If the financial year starts from "1 April 2023", the formula would be:

=EOMONTH(DATE(2023, 4, 1), 12)

Output:

45412 which represents 30 April 2024


Frequently Asked Questions

Can I use the MONTH function to determine the quarter of the year?

The MONTH function can be used with other formulas to determine the quarter. For example, using the formula =INT( (MONTH(A1)-1) / 3 ) + 1 will return the quarter for the date in cell A1.

Can I use the EOMONTH function to get the start date of a month?

While the EOMONTH function primarily returns the end date of a month, it can be used in combination with other functions to get the start date. For example, if you want the start date of the next month, you can use =EOMONTH(TODAY(), 0) + 1. This formula first finds the end date of the current month and then adds one day to get the start date of the next month.

What is the difference between EDATE and EOMONTH?

EDATE: Returns the date that is the indicated number of months before or after the start date.

EOMONTH: Returns the date in date-time format of the last day of the month before or after a specified number of months.

What is the return value of EOMONTH?

The return value of the EOMONTH is a serial number that can further be converted into a readable date format using the DATE or TEXT function.

 


T

News
Improve
Discuss
Do you want to advertise with us?Click here to know more

Microsoft Launched Copilot Pro Plan [20$ per Month] - With Insane Features

Synopsis: Microsoft's Copilot Pro offers advanced AI across devices, exclusive Chat-GPT 4 Turbo access, Microsoft 365 integration, and customization tools like Copilot GPT Builder. Copilot monthly plan at $20/month per user. Microsoft has introduced Copilot Pro, a new $20 per month subscription service aimed at enhancing the AI experience for users. This service is designed for power users and creators who seek advanced features in writing, coding, designing, and more. Copilot Pro offers a unified AI experience across devices, adapting to each device's capabilities. It includes exclusive access to ChatGPT 4 Turbo and a future option to select preferred language models. The subscription also features an upgraded AI image creation tool, Image Creator from Designer, and access to the upcoming Copilot GPT Builder for personalized AI assistance. Additionally, Copilot Pro extends to Microsoft 365, allowing users to integrate AI capabilities in Word, Excel, PowerPoint, Outlook, and OneNote on PC. This feature was previously available only to organizational users. Microsoft also announced updates to Copilot for Microsoft 365, now available for small businesses and without a 300-seat purcha
Read More

How to Earn $10000 Per Month Through Side Gigs : Answered by ChatGPT

article_img
Yes, we did what you might be dreaming about...We took a leap of faith and asked the mighty ChatGPT - How to Earn $10000 Per Month Through Side Gigs. The result might shock you! Since OpenAI launched ChatGPT, it has become the holy grail for some people and a threat to others. The OpenAI Large Language Model (LLM) is so capable that it can perform various tasks, including creative work like writing essays, computational tasks like crunching numbers, generating code, and more. Since it could do so many things, we thought, "Why not ask ChatGPT how to earn $10,000 through side gigs?" Holy Moly...ChatGPT gave us some good answers that you can actually do to earn a decent income on the side. No, it doesn't include printing t-shirts or dropshipping! So, listen up, money-minded mavens! We've tapped into the mind of ChatGPT and discovered some mind-boggling techniques to help you fill your bank account at warp speed. Now, we can't promise you'll become a millionaire overnight (sorry, dreamers!), but we've got an arsenal of money-making wisdom that's sure to give your finances a turbo boost without leaving your full-time job. If you're ready to unlock the secrets to earn the moolah -- $10,0
Read More

A

10 AI Tools Under US $10 Per Month Worth Investing

article_img
Artificial intelligence has become a real revolution for businesses and individuals. Although one might think that powerful AI tools have high price tags, in reality, there are hidden treasures behind a budget-friendly investment of no more than US$10 per month. These affordable AI tools increase productivity by 40% in industries and bring the potential of a universe of opportunities, allowing users to reap benefits from AI without spending too much money. Moreover, using various AI-powered tools can also increase user performance by almost 66%, says the report. With the awareness of businesses and professionals about transformative potential AI, the demand for cost-effective solutions has increased too in various sectors, including business reform. The good news is that developers have stepped up with different tools to democratize access to AI capabilities and make an enhancement in the business. With this in mind will be discussing some of the best cheap AI tools under $10 below. 10 AI Tools Under US $10 Per Month Worth Investing ReplikaLumen5AmplitudeWrite with transformerDescriptFreemindGitHub CopilotFirefliesMidjourneyTome10 AI Tools Under US $10 Per MonthLet's check out the
Read More

MONTH Function in Google Sheets

article_img
The MONTH function in Google Sheets is a simple yet essential tool for extracting the month from a given date. Whether you’re handling financial data, managing project timelines, or tracking time-specific trends, this function helps you analyze and organize information based on months. Learning how to get the month from a date in Google Sheets can significantly enhance your ability to work with time-sensitive datasets effectively.What is the MONTH Function in Google SheetsThe MONTH function in Google Sheets extracts the month from a given date and returns it as a numeric value (1 for January, 2 for February, and so on). This function is useful for organizing, analyzing, or filtering date-related data in spreadsheets.How it WorksThe function reads a date input and outputs the corresponding month as a number (1 to 12). It simplifies data analysis by isolating the month from full dates.Google Sheet MONTH Function SyntaxThe syntax of the MONTH function in Google Sheets:=MONTH(date)where, date: The date from which you want to extract the month. It can be a valid date, a reference to a cell containing a date, or a date generated by another formula.The MONTH function generates monthly rep
Read More

Editing Excel Macros in Excel

article_img
Excel Macro is a set of actions that can be recorded, saved, used multiple times. This feature saves us a lot of time when dealing with repetitive tasks and huge data sets. We can always make changes to an existing Macro in Excel. There are two ways to record and run macros: Excel Commands Excel Visual Basic for Applications(VBA).1. Copying a Macro Code We can reuse the existing macro code while creating new Macros. For example, if you have existing macros created using the record function, we can reuse the code to write new macros. To open the code follow the below steps: Select Tools --> Macros --> Visual Basic Editor. Copy code from the existing macros(use Command + C) and paste(use Command + V) in the new macro2. Renaming a Macro Follow the below steps to rename a Macro in Excel: Select Tools --> Macros --> Visual Basic Editor. Select name on the left plane.Edit the name.3. Deleting a Macro Follow the below steps to delete a macro in Excel: Select Tools --> Macros --> Macros... Select the macro to be deleted. Click on the minus(-) symbol at the bottom.Select yes to delete the macro.
Read More

Best Microsoft Excel High-Paying Jobs with Excel Skills in 2024

article_img
Are you ready to unlock a world of opportunities with Microsoft Excel? In today’s data-driven job market, mastering Excel is essential for launching a successful career, whether you're a fresher or an experienced professional. In this article, we will cover the high-paying Excel jobs available in 2024, including crucial roles like data analyst, business analyst, and many more. We'll explore the qualifications needed for these positions, along with salary estimations to help you understand your earning potential. Whether you’re looking for Excel jobs for freshers or seasoned professionals, we’ll also dive into options for Excel freelancing jobs and work-from-home jobs in Excel. Equip yourself with the knowledge to excel in your career and take the first step toward a lucrative future!Best Microsoft Excel High-Paying Jobs with Excel Skills in 2024Table of ContentWhy choose a career in ExcelWhy Excel Skills Are Essential for Your CareerEssential Excel Skills Required to Boost Your Resume Best Microsoft Excel High-Paying JobsFinancial AnalystsData AnalystAdministrative Assistant Accountants Project ManagersManagement ConsultantRetail Store ManagersBusiness Analyst Market Research A
Read More

Excel VLOOKUP Function - Excel Guide for Beginners

article_img
How to do Vlookup in Excel - Quick StepsPrepare Your DataEnter the VLOOKUP Formula >>Press EnterUse a Cell Reference for Flexibility Copy the Formula for Multiple RowsThe VLOOKUP function is one of the most widely used tools in Excel for looking up and retrieving data from a table. Whether you’re working with a single sheet or multiple workbooks, VLOOKUP allows you to search for a value in one column and return a related value from another. If you're new to Excel or still getting the hang of formulas, this guide is for you. We will cover everything from the basics of how VLOOKUP works to practical examples that show how to search data across sheets, troubleshoot common issues, and master the VLOOKUP formula for any task.Excel VLOOKUP FunctionWhat is the VLOOKUP Function in ExcelThe term VLOOKUP stands for Vertical Lookup. It is designed to search for a specific value in the first column of a table (lookup column) and retrieve corresponding data from a different column in the same row.Syntax of VLOOKUP FormulaVLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])Arguments:1. lookup_value: The value you want to search for (e.g., a specific ID, name, or product code).
Read More

AI in Excel: Top 20 Excel AI Tools in 2025 (Free/Paid)

article_img
The integration of AI in Excel is transforming the way professionals manage, analyze, and visualize data. Whether you're handling large datasets, performing financial analysis, or automating repetitive tasks, AI-powered tools can significantly improve efficiency and accuracy. In 2025, advanced Excel AI tools are making complex tasks easier by offering features like data cleaning, predictive analytics, smart automation, and AI-driven insights.In this guide, we’ve gathered a list of the top 20 Excel AI tools for 2025 that are reshaping how users interact with Excel.Table of ContentBest AI Tool in Excel: Top Picks for 2025Top 10 Free Excel AI Tools in 2025Top 10 Excel AI ToolsAI in Excel: OverviewIn Excel, an AI tool (Artificial Intelligence tool) refers to an add-in or extension that leverages artificial intelligence to enhance your spreadsheet experience. These tools can automate tasks, improve data analysis, and generally make you more productive.Excel has always been a powerful tool for data analysis, but with the integration of AI tools, it has transformed into a smarter, more intuitive platform.Best AI Tool in Excel: Top Picks for 2025Explore the below AI tools designed for auto
Read More

VBA Date and Time Functions in Excel

article_img
Date and Time Functions are the inbuilt functions that give us the opportunity to see the date or time according to the user's need. Suppose a user needs to see the month or the day or the year then it can be easily seen by different date functions. Similarly, for the time function, also we can manipulate it according to the need of the user. Date and Time functions are used to interconvert date and time in different formats. In this article, we will learn about the most commonly used date and time functions. VBA Date Functions There are fifteen-plus different date functions in VBA, but here we will talk about some of the most commonly used date functions. VBA Date Function The Date() function returns the current date. The Date() function does not require any arguments. For example, declare a variable name date_1 of Date data type, call the Date() function, and store the return value in date_1, then print the date_1 in the console. Syntax of the function: Date() VBA DateAdd Function The DateAdd() function is used to add an interval of date/time to the respective date or time. The function will return the resulting date or time. The function takes three arguments, Interval, Nu
Read More

Excel ROWS and COLUMNS Functions with Examples

article_img
In Microsoft Excel, where precision and efficiency reign supreme, mastering the art of maneuvering through cells and worksheets is indispensable. Two indispensable components in your Excel toolbox are the ROW and COLUMN functions, each meticulously crafted to execute discrete functions that can substantially facilitate your data analysis and manipulation endeavors. Within the confines of this article, we shall delve into the multifaceted capabilities of these functions and elucidate how they can seamlessly optimize your spreadsheet tasks. Whether you possess the seasoned prowess of an Excel virtuoso or are just embarking on your spreadsheet odyssey, comprehending the intrinsic attributes of the ROW and COLUMN functions represents an elemental stride in your journey toward Excel proficiency. What is Excel ROWS and COLUMNS FunctionsExcel's Rows and Columns are like the building blocks of your spreadsheet. Think of columns as the vertical parts, and rows as the horizontal ones. Each cell, range of cells, or table in Excel is made up of these rows and columns. In simpler terms, when you look from top to bottom in Excel, you're looking at columns. When you look from left to right, you'r
Read More
three90RightbarBannerImg