Dates function
MONTH function in Google Sheets and Excel
MONTH returns the month of a date as a number from 1 (January) to 12 (December).
Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet
- Excel 2016
- Excel 2019
- Excel 2021
- Excel 2024
- Microsoft 365
- Google Sheets
Syntax
MONTH(serial_number)Arguments in [brackets] are optional. Google Sheets writes it MONTH(date).
Example
=MONTH(D2) reads: Read the date in D2 (the task's due date) and return its month as a number.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Task | Owner | Start | Due | Hours | Due month | Holidays | |
| 2 | Kickoff workshop | Mara | 2 Mar 2026 | 4 Mar 2026 | 6 | 3 | 3 Apr 2026 | |
| 3 | Content audit | Jonas | 5 Mar 2026 | 20 Mar 2026 | 24 | 6 Apr 2026 | ||
| 4 | Wireframes | Priya | 16 Mar 2026 | 2 Apr 2026 | 40 | 1 May 2026 | ||
| 5 | Visual design | Elif | 30 Mar 2026 | 17 Apr 2026 | 56 | |||
| 6 | Copywriting | Tomás | 1 Apr 2026 | 24 Apr 2026 | 32 | |||
| 7 | Build | Kenji | 13 Apr 2026 | 15 May 2026 | 120 | |||
| 8 | Testing | Sofia | 11 May 2026 | 22 May 2026 | 30 | |||
| 9 | Launch | Leo | 26 May 2026 | 27 May 2026 | 8 |
F2 shows 3: the kickoff workshop is due in March.
How the spreadsheet calculates it
Gives the month (1 to 12) of the date in D2.
- 1. MONTH: Gives the month (1 to 12) of the date in
D2.date=`D2`: a cell holding a date
More MONTH examples
=MONTH(D2)The due date's month, 3 for March.=ROUNDUP(MONTH(D2)/3,0)The quarter the date falls in, 1 to 4.=SUMPRODUCT((MONTH(D2:D9)=4)*E2:E9)The hours of every task due in April.=IF(MONTH(D2)=MONTH(TODAY()),"This month","")A flag on tasks due in the current month (any year).
Paste any of these into the formula explainer to see it step by step.
Tips
- Pair it with
YEARwhenever the data spans more than one year. - For quarters, divide and round up:
ROUNDUP(MONTH(D2)/3,0)gives 1 to 4. - Format the result as a number, not a date.
What MONTH is used for
Grouping sales, hours or invoices by month, checking whether a date falls in a given quarter, building fiscal-year labels, and pulling the month into a helper column for a pivot table or a chart.
Arguments
| Argument | Required | What it is |
|---|---|---|
| serial_number | Yes | The date to read: a cell holding a date, a DATE formula or another formula that returns a date.Watch out: Text that only looks like a date may give #VALUE! or a month read in the wrong order. |
Common mistakes
Expecting a name like March: MONTH gives a number. Use TEXT with "mmmm" for the name.
Counting a month across years:
MONTHgives 3 for March of any year, so totals by month mix 2025 and 2026 unless you check the year too withYEAR.Getting a date such as 3 Jan 1900 instead of 3: the result cell kept a date format. Format it as a plain number.
In Google Sheets
Google Sheets has MONTH with one argument, a date, and returns the same 1 to 12 numbers. Its siblings YEAR and DAY exist in both apps too.
Errors you may see with MONTH
Questions
How do I get the month name instead of the number?
Use TEXT on the date itself: TEXT(D2,"mmmm") gives March and TEXT(D2,"mmm") gives Mar. MONTH only ever returns the number.
How do I count or sum by month?
Compare MONTH of the whole column inside SUMPRODUCT: SUMPRODUCT((MONTH(D2:D9)=4)*E2:E9) adds the hours of tasks due in April. Or use SUMIFS with the month's first and last day as limits.
What do YEAR and DAY do?
The same job for the other parts of a date: YEAR(D2) returns 2026 and DAY(D2) the day of the month. With DATE you can take a date apart and put it back together changed.
Sources
Official documentation the facts on this page were checked against.