MONTH and EOMONTH functions in Google Sheets: formulas and examples
MONTH returns the month of a date as a number from 1 to 12, and EOMONTH returns the last day of a month a given number of months away. This guide works both on one question a CEO asks halfway through a month, are we ahead of last month, with formulas for the month name, the first and last day of a month, the number of days in it, month-to-date totals, due dates and monthly totals.
=MONTH(date) returns the month of a date as a number from 1 to 12. =EOMONTH(start_date, months) returns the last day of the month that is a given number of months before or after a date. With March 18, 2026 in cell H2:
| You need | Formula | Result |
|---|---|---|
| Month number | =MONTH(H2) |
3 |
| Month name | =TEXT(H2, "mmmm") |
March |
| Last day of the month | =EOMONTH(H2, 0) |
March 31, 2026 |
| First day of the month | =EOMONTH(H2, -1) + 1 |
March 1, 2026 |
| Number of days in the month | =DAY(EOMONTH(H2, 0)) |
31 |
| Last day of the next month | =EOMONTH(H2, 1) |
April 30, 2026 |
| Same day last month | =EDATE(H2, -1) |
February 18, 2026 |
This guide works every formula on one question, the one a CEO asks in the middle of a month before a meeting: are we doing better or worse than last month? A month that is half over cannot be compared with a whole one, so the honest version of the question is month to date against the same point last month. MONTH and EOMONTH build the date boundaries of that comparison, and one SUMIFS per side gives the answer. On the orders below, the same question gets four arithmetically correct answers, from −47% to +29%, and the sheet shows why only one of them should go to the meeting.
Reading to get this done?
The question and the sheet
The example is an online store’s orders export with seventeen orders, one sale per row, from row 2 to row 18:
| Column | Holds |
|---|---|
| A | Order date |
| B | Order ID |
| C | Revenue |
| D | Status: Paid or Refunded |
| E | Month end, =IF(A2="", "", EOMONTH(A2, 0)) |
The export was pulled on the morning of March 19, 2026, so March 18 is the last full day in it, and the report date in H2 is March 18, 2026. It starts with two late-January orders, one March order was refunded, and one order (#30214, $350) came in with no date at all.

The finished answer sits in the block on the right:
| Cell | Holds | Formula | Result |
|---|---|---|---|
| H2 | Report date | typed, or =TODAY() - 1 in a live sheet |
March 18, 2026 |
| H3 | Month starts | =EOMONTH(H2, -1) + 1 |
March 1, 2026 |
| H4 | Same day last month | =EDATE(H2, -1) |
February 18, 2026 |
| H5 | Last month starts | =EOMONTH(H2, -2) + 1 |
February 1, 2026 |
| H6 | Month to date | =SUMIFS(C2:C18, A2:A18, ">="&H3, A2:A18, "<="&H2, D2:D18, "<>Refunded") |
$4,080 |
| H7 | Last month to date | =SUMIFS(C2:C18, A2:A18, ">="&H5, A2:A18, "<="&H4, D2:D18, "<>Refunded") |
$4,250 |
| H8 | Change | =H6/H7-1 |
−4% |
| H9 | No date, to check | =SUMIFS(C2:C18, A2:A18, "", D2:D18, "<>Refunded") |
$350 |
March is 4% behind February at the same point: $4,080 kept from March 1 to 18 against $4,250 from February 1 to 18. Every boundary in the block comes from the report date in H2, so changing that one cell moves the whole comparison. The $350 order with no date is on its own line, because it is the one thing that could change the answer: if it belongs to March, the month is 4% ahead instead.
The rest of this guide builds that block from the simplest formula up: what month a date belongs to, where a month starts and ends, and why “the same point last month” needs a function of its own.
MONTH function
MONTH answers the smallest question about an order: which month is it in? Here is how to use MONTH, and what it does with dates it cannot read.
Syntax of MONTH
=MONTH(date)
- date: the date to take the month from. It can be a cell with a date, a function that returns a date, such as DATE(2026, 3, 18), or a date typed in quotes in a format your spreadsheet locale recognizes.
The result is the Google Sheets month number: 1 for January, 12 for December.
Examples of MONTH
The most common form takes the date from a cell. To get the month of the first March order, in row 12:
=MONTH(A12)
A12 holds March 2, 2026, and the function returns 3.
A date can also be typed into the formula:
=MONTH("3/18/2026")
The result is 3. Sheets reads the text as a date in the format of the spreadsheet locale. In a United States locale “3/18/2026” is March 18; the same string written day first, “18/3/2026”, returns #VALUE! there. DATE(2026, 3, 18) means the same in every locale, which matters when the sheet is shared with a team in another country.
A month name on its own is not a date:
=MONTH("March")
The function returns #VALUE!: “March” is text, and Sheets cannot read it as a date.
A month and a day are enough:
=MONTH("March 18")
Sheets fills in the current year and reads the text as a date, so the result is 3.
MONTH has one trap that matters for a monthly report: an empty date is not an error. The undated order in row 18 gets a month too.

=MONTH(A18) returns 12. An empty cell counts as 0, and day 0 in Sheets is December 30, 1899, so the $350 order lands in December, a month the export does not even cover. Any total by month number now has a December line, and nothing on the sheet says it is wrong.
Your rows carry daily dates, and you need them rolled up by calendar month, with due dates that land on a month's last day.
Paste this into your AI assistant. It writes the MONTH and EOMONTH formulas for your own date column: a month key per row, monthly totals and month-end due dates.
The prompt
Read https://www.owox.com/ai-agent-setup.md and follow it to set up OWOX Data Marts for me, starting from /blog/articles/month-eomonth-functions-google-sheets.md. The task: add a month column to my sheet with EOMONTH, total my revenue by calendar month from it, and set each row's due date to the end of the following month. Tag the links you give me with utm_campaign=ai-task and utm_term=m3. Use what you know about my context and goals
EOMONTH function
EOMONTH answers the next question: where does the month end? Everything in the answer block hangs on that, because the end of one month plus one day is the start of the next.
Syntax of EOMONTH
=EOMONTH(start_date, months)
The EOMONTH function syntax has two arguments, and both are required:
- start_date: the date to count from.
- months: the number of months to move. 0 stays in the month of the start date, a positive number moves forward, a negative number moves back. Decimals are cut off, so 1.9 is treated as 1.
The result is always the last day of the month the function lands in, whatever the day of the start date.
Examples of EOMONTH
A positive number moves forward. From the February 18 order in row 8:
=EOMONTH(A8, 2)
The function moves two months forward and returns April 30, 2026.
A negative number moves back. From the report date:
=EOMONTH(H2, -2)
From March 18, 2026 the function moves two months back and returns January 31, 2026. One day later is February 1, the first day of last month, which is why H5 holds =EOMONTH(H2, -2) + 1.
The number of months can be as large as you need. For the end of the month 15 months from the report date:
=EOMONTH(H2, 15)
The result is June 30, 2027.
Practical examples with EOMONTH
Practical examples with EOMONTH
Each example answers a smaller question about the same orders.
Last day of the month
=EOMONTH(A2, 0)
With 0 as the second argument the function returns the last day of the month of the date itself: January 31, 2026 for the order of January 28. Copied down column E, it gives the last day of each month for every order, a column of month end dates that works as a month label. For February, the last day comes out as February 28, 2026. Every date of the same month gets the same value, and months of different years stay apart, which a month number cannot do. In the export, wrap it as =IF(A2="", "", EOMONTH(A2, 0)), so the undated row stays empty instead of showing December 31, 1899.
First day of the month
There is no “start of month” function. Take the last day of the previous month and add one day:
=EOMONTH(H2, -1) + 1
For the report date of March 18, 2026, the result is March 1, 2026. This is H3, the first boundary of the month-to-date total.
To convert a whole column at once, wrap the formula in ARRAYFORMULA and pass the range:
=ARRAYFORMULA(IF(A2:A18="", "", EOMONTH(A2:A18, -1) + 1))
One formula in the first row fills the column down to row 18: February 1, 2026 for the February orders, March 1 for the March ones, and nothing for the order with no date.
Last day of the current month
TODAY returns the current date, so this formula moves on by itself when a new month starts:
=EOMONTH(TODAY(), 0)
On the example’s report date, March 18, 2026, it returns March 31, 2026. =EOMONTH(H2, 0) - H2 gives the number of days left in the month: 13. In a live sheet, put =TODAY() - 1 in H2 rather than TODAY() itself: today is never finished, and a month-to-date total that includes half of today compares a part of a day with a whole day last month.
Number of days in a month
DAY returns the day of the month. Applied to the last day of a month, it returns the length of that month:
=DAY(EOMONTH(H2, 0))
The formula returns 31 for March 2026, and =DAY(EOMONTH(A4, 0)) returns 28 for February. It takes leap years into account: for a date in February 2022 or February 2023 it returns 28, and for a date in February 2024 it returns 29.
The length of the month is what turns a month-to-date total into a pace. Divide by the days gone and multiply by the days in the month:
=H6 / DAY(H2) * DAY(EOMONTH(H2, 0))
March has $4,080 after 18 of its 31 days, so it is on pace for $7,027, 9% below February’s $7,730, even with three more days to sell in.
Due dates
For a payment term counted from the end of the month, add the number of days to the month end. Order #30131 in row 6 was invoiced on February 11, 2026 with “30 days end of month” terms:
=EOMONTH(A6, 0) + 30
The invoice is due on March 30, 2026. For “end of the following month”, use =EOMONTH(A6, 1), which returns March 31, 2026.
Same day last month with EDATE
The second half of the answer block needs “the same point last month”, and that is the one boundary EOMONTH does not give directly. It sounds like the day number minus one month, and =DATE(YEAR(H2), MONTH(H2) - 1, DAY(H2)) looks right on March 18: it returns February 18. On March 31 it asks for February 31, and DATE rolls that over to March 3, so last month’s total would include the first three days of this month. EDATE, the sibling of EOMONTH, moves by whole months and stops at the last day of the shorter month:
=EDATE(H2, -1)

For March 18 it returns February 18, and for March 29, 30 and 31 it returns February 28. From the 29th on, March to date is compared with all of February, which is the fair comparison. The DATE version is wrong on four of the five report dates in the table, and wrong without an error: every result is a valid date.
Eligibility dates
When a period is counted in whole calendar months, the day of the start date does not matter, and EOMONTH gives the date directly. Say a customer becomes eligible for the loyalty price at the end of the third month after the first order, and the customer’s first order is the one of February 3 in row 4:
=EOMONTH(A4, 3)
The customer becomes eligible at the end of the third month after the order month, May 31, 2026.
Last day of a month from a month number
When the sheet holds month numbers and not dates, as a plan tab often does, build the first day of the month with DATE and pass it to EOMONTH. On a plan tab with a title in row 1, headers in row 2 and months 1, 2 and 3 in cells B3 to B5, enter this in cell F3:
=EOMONTH(DATE(2026, B3, 1), 0)
Copied down, it returns January 31, February 28 and March 31, 2026: real dates that a SUMIFS can compare with order dates.
Last Monday of the month
Say the leadership team reviews the month on its last Monday. WEEKDAY with 2 as the second argument numbers the days from Monday (1) to Sunday (7). Subtract that number from the last day of the month and add 1 to land on the Monday of the same week:
=EOMONTH(H2, 0) - WEEKDAY(EOMONTH(H2, 0), 2) + 1
- EOMONTH(H2, 0): the last day of the month.
- WEEKDAY(EOMONTH(H2, 0), 2): the day of the week of that date, 1 for Monday to 7 for Sunday.
- + 1: moves from the Sunday before that week to its Monday.
March 31, 2026 is a Tuesday, day 2, so the formula returns March 30. February 28, 2026 is a Saturday, day 6, so for February it returns February 23. When the month ends on a Monday, as August 2026 does, the result is the last day itself.
Same question, four answers
The formulas above give four answers to “are we ahead of last month?”, and each one is arithmetically right:

| Compared with | Revenue | This month | Last month | Change |
|---|---|---|---|---|
| All of last month, February 1 to 28 | refunds excluded | $4,080 | $7,730 | −47% |
| Same point, February 1 to 18 | gross | $5,500 | $4,250 | +29% |
| Same point, February 1 to 18 | refunds excluded | $4,080 | $4,250 | −4% |
| Same point, the undated order counted in March | refunds excluded | $4,430 | $4,250 | +4% |
The first answer is the most common one and the most alarming: a month that is 18 days old against a month that is finished. Its end boundary is EOMONTH(H2, -1) where it should be EDATE(H2, -1), and that one argument turns a small dip into a collapse. The second is the gross number, and it is the most flattering: March booked more than February, then lost $1,420 when the March 5 order was refunded. The third is the answer in the block. The fourth shows how much one row with no date can move: $350 is enough to turn −4% into +4%.
None of the four is an error message, so nothing on the sheet warns you. The difference sits in three decisions that are business decisions, not formula ones: where “the same point” is, whether a refund counts, and what happens to a row the export could not date. Write them next to the number, “month to date through March 18 against February 1 to 18, refunds excluded, one undated order of $350 open”, and the number survives the meeting.
MONTH and EOMONTH with other functions
MONTH and EOMONTH with other functions
Month name from a date
The shortest way is the TEXT function: =TEXT(H2, "mmmm") returns March, =TEXT(H2, "mmm") returns Mar (and =TEXT(A4, "mmm") returns Feb for the order in row 4) and =TEXT(H2, "mmmm yyyy") returns March 2026. TEXT writes the name in the language of the spreadsheet locale. For a month number with a leading zero, as file names and IDs often need, =TEXT(H2, "mm") returns 03, and a May date returns 05. A header such as ="Month to date, " & TEXT(H2, "mmmm d") reads “Month to date, March 18” and moves with the report date.
For names of your own, for example in another language or abbreviated your way, use CHOOSE with MONTH as the index:
=CHOOSE(MONTH(A2), "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
MONTH returns the position, and CHOOSE returns the item at that position in the list: January for the order of January 28 in row 2. For the undated row it returns December, for the reason shown in the MONTH section.
Monthly totals with SUMIFS
SUMIFS cannot take MONTH(range) as a criteria range: =SUMIFS(C2:C18, MONTH(A2:A18), 3) returns an error instead of a total. There are two ways around it.
A helper column. Put =MONTH(A2) next to each row, in column F as in the image in the MONTH section, then sum by that column:
=SUMIFS(C$2:C$18, F$2:F$18, F2, D$2:D$18, "<>Refunded")
- C$2:C$18: the amounts to add up.
- F$2:F$18: the helper column with month numbers.
- F2: the month of the current row.
- D$2:D$18, “<>Refunded”: leaves the refunded order out.
For row 2 the result is $1,050, the January total. Two things go wrong with month numbers. The undated order gets month 12 and becomes a December total of $350. And a month number does not know its year: January 2026 and January 2027 would be added together. Use the month end in column E as the helper instead:
=SUMIFS($C$2:$C$18, $E$2:$E$18, H3, $D$2:$D$18, "<>Refunded")

With the month ends listed in H2:H4, the summary reads January $1,050, February $7,730 and March $4,080, plus a “No date” line of $350, $13,210 in all. Read it with care: January holds only the two orders of January 28 and 30, and March runs only to the 18th. A month at the edge of an export holds only the days the export caught, so it always looks like a dip.
A date range. Without a helper column, give SUMIFS the first and the last day of the month. With the first day of the month in H3, as in the answer block:
=SUMIFS(C$2:C$18, A$2:A$18, ">=" & H3, A$2:A$18, "<=" & EOMONTH(H3, 0), D$2:D$18, "<>Refunded")
The result is $4,080, all of March so far. The month-to-date formula in H6 is the same formula with the report date as the end boundary. A row with an empty date matches neither condition, so a date-range SUMIFS leaves it out, silently. That is why H9 counts it.
More on these conditions in the guide to SUM, SUMIF and SUMIFS.
A condition on the month with IF
=IF(MONTH(A2)=3, "March", "Other")
IF checks whether the month of the date is 3 and returns one label for March and another for every other month. To label the orders of the report month, whatever month that is, compare month ends, which also keeps the years apart:
=IF(EOMONTH(A2, 0) = EOMONTH($H$2, 0), "This month", "Earlier")
Six orders get “This month”, the refunded one among them.
Year, month and day in separate columns
Some exports, ad platform reports among them, deliver the date as three columns: here the year is in column B, the month in C and the day in D, with the first row of data in row 3 under a two-row header. When the three parts sit in separate cells, DATE joins them into a date, and any date function can then work with it:
=MONTH(DATE(B3, C3, D3))
DATE also normalizes values that run over: month 14 of 2025 becomes February 2026, and MONTH returns 2.
Errors and unexpected results
⚠️ Error: #VALUE! in MONTH or EOMONTH.
✅ Solution: The argument is text that Sheets cannot read as a date: a month name alone, a date in the day and month order of another locale, or a date imported as text. Build the date with DATE(year, month, day), or convert the text with DATEVALUE.
⚠️ Error: MONTH returns 12 for an empty cell.
✅ Solution: An empty cell counts as 0, and day 0 in Sheets is December 30, 1899. Skip the blanks: =IF(A2="", "", MONTH(A2)). Then count them on a line of their own, as H9 does, rather than dropping them.
⚠️ Error: EOMONTH shows a number such as 46112.
✅ Solution: That is the date as a serial number: 46112 is March 31, 2026. Select the cell and choose Format > Number > Date.
⚠️ Error: The year is wrong for a date typed without a year.
✅ Solution: “March 18” is read as March 18 of the current year. Add the year to the text or use DATE.
⚠️ Error: SUMIFS or COUNTIFS returns an error with MONTH inside.
✅ Solution: These functions need a real range as the criteria range. Use a helper column or a date range, as in the monthly totals example above.
⚠️ Error: Last month’s total includes days of this month.
✅ Solution: The same day last month was built with DATE(YEAR(H2), MONTH(H2) - 1, DAY(H2)), which rolls February 31 over to March 3. Use =EDATE(H2, -1), which stops at the last day of the shorter month.
⚠️ Error: The month-to-date total is right and does not match the other report.
✅ Solution: Check the boundaries before the arithmetic: whether the report date counts today, which time zone the order dates are in, whether refunds are excluded, whether the other report shows gross or net revenue, and how many rows have no date. On the example, those choices alone move the change from −47% to +29%.
Related Google Sheets functions
Related Google Sheets functions
Functions that are often used next to MONTH and EOMONTH, each with its own guide:
- DATE functions: DATE, EDATE, DATEVALUE and DATEDIF for building and comparing dates.
- YEAR and YEARFRAC: The year of a date and the fraction of a year between two dates.
- DAY, DAYS and DAYS360: The day of the month and the number of days between dates.
- WEEKDAY and WEEKNUM: The day of the week and the week number.
- WORKDAY and NETWORKDAYS: Working days between dates and deadlines in working days.
- QUERY date filtering: Filters rows by a date or a date range inside a QUERY formula.
- Dates and times: Covers formatting, combining, splitting and sorting date and time values.
- Pivot tables: Group dates by month without a formula.
Monthly totals depend on where the rows come from
Monthly totals depend on where the rows come from
MONTH and EOMONTH turn dates into months, and the formulas in the answer block are exact. What they add up is a list of orders, and in a monthly sales report that list is the weak point: someone exports the month from a store, a CRM or an ad platform, pastes it under the previous one, and hopes that no row is missing, pasted twice or left without a date. The four answers above differ by the rows and the rules, not by the formulas.
The OWOX Data Marts extension for Google Sheets covers that half. A data analyst publishes a Data Mart (a table or an SQL query in your data warehouse) and makes it available for reports. The Data Mart is where the definitions the team agreed live: what counts as a refund, which time zone a day is in, what happens to an order without a date. In Sheets you open the extension, pick the Data Mart, tick the columns you want and run it. The rows land in a tab, ready for your formulas.

What changes for the person who maintains the sheet:
- Refresh replaces re-export. Refresh current report in the extension menu re-runs the same pull, and a scheduled refresh keeps the tab current without anyone touching it, so the month-to-date block is current every morning.
- The source is written on the sheet. The header cell of an imported tab carries a note with the Data Mart it came from, the time of the import and a link to the report.
- No SQL and no data warehouse access needed. The analyst decides which Data Marts and columns are available. You choose from that list.
The extension does not write or change the analyst’s SQL. The monthly formulas stay in the sheet; the rows they add up come from the same Data Mart on every refresh. The extension comes with the OWOX Cloud plans of OWOX Data Marts; spreadsheet reporting describes both ways data reaches a sheet.
Your rows carry daily dates, and you need them rolled up by calendar month, with due dates that land on a month's last day.
Paste this into your AI assistant. It writes the MONTH and EOMONTH formulas for your own date column: a month key per row, monthly totals and month-end due dates.
The prompt
Read https://www.owox.com/ai-agent-setup.md and follow it to set up OWOX Data Marts for me, starting from /blog/articles/month-eomonth-functions-google-sheets.md. The task: add a month column to my sheet with EOMONTH, total my revenue by calendar month from it, and set each row's due date to the end of the following month. Tag the links you give me with utm_campaign=ai-task and utm_term=m3. Use what you know about my context and goals
Prefer to start on your own? Get started free
Frequently Asked Questions
Can I combine MONTH or EOMONTH with other functions like SUMIFS or IF?
Yes, with one limit: SUMIFS cannot take MONTH(range) as a criteria range and returns an error. Give it a date range instead. With the report date in H2 and the first day of the month, `=EOMONTH(H2, -1) + 1`, in H3, `=SUMIFS(C2:C18, A2:A18, ">="&H3, A2:A18, "<="&H2, D2:D18, "<>Refunded")` returns the month-to-date revenue, $4,080 on the example orders. Or add a helper column with `=EOMONTH(A2, 0)` and sum by it. Inside IF, MONTH works directly: `=IF(MONTH(A2)=3, "March", "Other")`.
How do I calculate the number of days in a month using EOMONTH?
Take the last day of the month with EOMONTH and read its day number with DAY: `=DAY(EOMONTH(A1, 0))`. For a date in March 2026 it returns 31, for February 2026 it returns 28, and for February 2024 it returns 29, so leap years are handled. The same number turns a month-to-date total into a pace: with $4,080 after 18 days of March, `=H6 / DAY(H2) * DAY(EOMONTH(H2, 0))` returns $7,027 for the whole month.
What happens if I get a #VALUE! error in EOMONTH?
A #VALUE! error in EOMONTH means the start date is text that Sheets cannot read as a date: a month name on its own, a date written in another locale's day and month order, such as "18/3/2026" in a United States locale, or a date imported as text. Build the date with DATE(2026, 3, 18), or convert the text with DATEVALUE before passing it to EOMONTH. An empty cell is not an error: EOMONTH returns December 31, 1899 for it, so skip blanks with IF.
Can I use the MONTH function to display month names instead of numbers?
MONTH itself returns only a number, so use TEXT on the date instead: `=TEXT(A1, "mmmm")` returns the full name, such as March, and `=TEXT(A1, "mmm")` returns Mar. `=TEXT(A1, "mmmm yyyy")` returns March 2026, which keeps the year in a monthly report. TEXT writes the name in the language of the spreadsheet locale. For names of your own, use MONTH as the index of CHOOSE and list all twelve names after it: `=CHOOSE(MONTH(A1), "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")`.
What is the difference between EOMONTH and MONTH in Google Sheets?
MONTH returns the month number of a date, from 1 to 12. EOMONTH returns a date: the last day of the month a given number of months before or after a date. For March 18, 2026, `=MONTH(H2)` returns 3 and `=EOMONTH(H2, 0)` returns March 31, 2026. Use MONTH for a label or a condition, and EOMONTH for month boundaries: `=EOMONTH(H2, -1) + 1` gives March 1, the start of a month-to-date total, and EOMONTH keeps months of different years apart, which a month number cannot do.
How does the MONTH function work in Google Sheets?
MONTH takes a date and returns its month as a number from 1 (January) to 12 (December): `=MONTH(A2)`. On an orders export, an order dated March 2, 2026 returns 3. The date can be a cell, a function such as DATE(2026, 3, 18), or text Sheets can read as a date in your locale. Watch empty cells: MONTH returns 12 for an empty cell, because Sheets reads it as December 30, 1899, so an order with no date quietly lands in December.
