Google Sheets MONTH Function: How to Use It
In this article
The MONTH function in Google Sheets returns the month of a given date as a number from 1 (January) to 12 (December). It is the quickest way to pull the month out of a full date so you can sort, filter, or summarise data by month instead of by exact day. You do not need any add-ons or special permissions; a standard Google account with access to Sheets is enough. The syntax is =MONTH(date), where date is a cell reference, a date value, or a function such as TODAY() that returns a date.
What You'll Need
- A Google account and access to Google Sheets (the free web version or the mobile app).
- A spreadsheet with at least one column of dates, or a blank sheet where you can type a date to test.
- Dates that Google Sheets recognises as real dates, not plain text. If your dates are stored as text, MONTH will return an error or an unexpected result.
Step-by-Step
- Open your spreadsheet. Go to sheets.google.com, sign in, and open the file that contains your dates. On mobile, open the Google Sheets app and tap the file.
- Pick an empty cell for the result. Click or tap a cell next to your first date, for example cell B2 if your first date is in A2.
- Type the formula. Enter
=MONTH(A2)and press Enter (or the check mark on mobile). Replace A2 with the cell that holds your date. If you want to type a date directly, use=MONTH(DATE(2024,7,15))or=MONTH("7/15/2024"). - Check the result. The cell should show a number from 1 to 12. For 15 July 2024 the result is 7. If you see an error, jump to the Troubleshooting section.
- Copy the formula down. Click the small square at the bottom-right corner of the cell (the fill handle) and drag down, or double-click it to fill the column automatically. On mobile, select the cell, tap the fill handle, and drag.
- Format the result as a number if needed. MONTH always returns a plain number. If the cell shows a date instead (for example 1/7/2024), select the column and choose Format > Number > Number. Labels can differ slightly by version and region.
- Use the month number in other formulas. For example,
=SUMIF(ARRAYFORMULA(MONTH(A2:A100)),7,B2:B100)sums values for July, or=COUNTIF(B2:B100,7)counts how many rows fall in July when column B holds MONTH results. - Convert the number to a month name (optional). Wrap it in TEXT:
=TEXT(A2,"mmmm")gives the full name such as July, and=TEXT(A2,"mmm")gives Jul. This is often easier to read than a bare number.
Common Mistakes
- Dates stored as text. If your date was imported or pasted as text, MONTH may return
#VALUE!or treat it as a different date. Check by selecting the cell: a real date aligns to the right by default, while text aligns left. Convert with Format > Number > Date, or use=DATEVALUE(A2). - Confusing MONTH with MONTHNAME. Google Sheets does not have a MONTHNAME function. Use
TEXT(date,"mmmm")instead. Typing=MONTHNAME(A2)returns#NAME?. - Wrong date order. If your sheet is set to a region that reads dates as day/month/year, a typed date like 03/04/2024 means 3 April, not 4 March. Set the correct locale under File > Settings > Locale before entering dates.
- Forgetting that MONTH ignores the year. January 2023 and January 2024 both return 1. If you need to group by month and year, use
=TEXT(A2,"yyyy-mm")or combineYEAR(A2)andMONTH(A2). - Referencing an empty cell. MONTH of a blank cell returns 12 in some spreadsheet contexts because blank is treated as 30 December 1899. Guard with
=IF(A2="","",MONTH(A2)). - Using MONTH on a time-only value. If the cell contains only a time such as 14:30, there is no date, so the result is not meaningful. Make sure the cell holds a full date.
Tips
- Use
=MONTH(TODAY())to get the current month number, which updates automatically each day. - Combine MONTH with EOMONTH to find the last day of a month:
=EOMONTH(A2,0). - For a whole column at once, use
=ARRAYFORMULA(MONTH(A2:A))in the first cell and it fills down automatically. - Sort or filter by the month number column to group data by month, then use a pivot table for totals.
- If you want the month name in another language, TEXT follows the spreadsheet locale, so change it under File > Settings if needed.
- On mobile, the formula bar is at the bottom of the screen; tap the cell, then the formula bar, to type the function.
Troubleshooting
- #VALUE! error: The cell is not a valid date. Check for text, extra spaces, or a date typed in an unrecognised format. Try
=DATEVALUE(TRIM(A2))or reformat the cell as a date. - #NAME? error: You likely typed MONTHNAME or misspelled MONTH. Use
=MONTH(A2)and=TEXT(A2,"mmmm")for names. - Result is a date instead of a number: The cell is formatted as a date. Select it and choose Format > Number > Number.
- Result is 12 for a blank cell: Add the IF guard shown above, or delete formulas pointing at empty rows.
- Formula shows as text: The cell may be formatted as plain text before you typed the formula. Change the format to Automatic or Number, then re-enter the formula.
- Wrong month from a typed date: Check File > Settings > Locale and make sure the date order matches your region.
Frequently Asked Questions
What does the MONTH function return?
A whole number from 1 to 12, where 1 is January and 12 is December. It ignores the day and year.
How do I get the month name instead of a number?
Use =TEXT(A2,"mmmm") for the full name or =TEXT(A2,"mmm") for the three-letter abbreviation. There is no MONTHNAME function in Google Sheets.
Does MONTH work with dates typed as text?
Not reliably. Convert text to a real date first with Format > Number > Date or with DATEVALUE, then apply MONTH.
Can I use MONTH to group by month and year?
MONTH alone loses the year. Use =TEXT(A2,"yyyy-mm") or a helper column with =YEAR(A2)&"-"&MONTH(A2) to keep both.
Why does MONTH return 12 for an empty cell?
Google Sheets treats a blank cell as 30 December 1899 in some calculations, so the month is 12. Wrap the formula in IF to return blank for empty cells.
Is MONTH available in the Google Sheets mobile app?
Yes. The function works the same in the Android and iOS apps; type it in the formula bar at the bottom of the screen.