# MONTH formula generator

> Describe what you need and get a MONTH formula for Excel and Google Sheets, run on real data before you copy it. Plus 8 tested MONTH examples.

Source: https://spreadsheetpractice.com/tools/formula-generator/month · Updated October 29, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

MONTH returns the month of a date as a number from 1 to 12.

Describe the task at [MONTH formula generator](https://spreadsheetpractice.com/tools/formula-generator/month) and get a MONTH formula for Excel and Google Sheets, tested on real data.

## Tested MONTH examples

### Get the quarter from a date

`="Q"&ROUNDUP(MONTH(A2)/3,0)`

Excel. Result on the sample sheet: 6 rows (B2:B7). [See it and try it](https://spreadsheetpractice.com/formulas/quarter-from-a-date)

### Count birthdays by month

`=SUMPRODUCT(--(MONTH(B2:B12)=G1))`

Excel. Result on the sample sheet: 4. [See it and try it](https://spreadsheetpractice.com/formulas/count-birthdays-by-month)

### List all birthdays in a given month

`=FILTER(A2:B11,MONTH(B2:B11)=E1,"No birthdays")`

Excel. Result on the sample sheet: 4 rows (D3:E6). [See it and try it](https://spreadsheetpractice.com/formulas/list-birthdays-in-a-month)

### Calculate the fiscal month (period) number from a date

`=MOD(MONTH(A2)-$E$1,12)+1`

Excel. Result on the sample sheet: 6 rows (B2:B7). [See it and try it](https://spreadsheetpractice.com/formulas/fiscal-month-number-from-a-date)

### Filter data by month

`=FILTER(A2:E11,(MONTH(B2:B11)=MONTH(H1))*(YEAR(B2:B11)=YEAR(H1)))`

Excel. Result on the sample sheet: 4 rows (G3:K6). [See it and try it](https://spreadsheetpractice.com/formulas/filter-data-by-month)

### Convert a date to text

`=TEXT(A2,"yyyy-mm-dd")`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/convert-a-date-to-text)

### Sum by month

`=SUMIFS($C$2:$C$11,$A$2:$A$11,">="&E2,$A$2:$A$11,"<="&EOMONTH(E2,0))`

Excel. Result on the sample sheet: 3 rows (F2:F4). [See it and try it](https://spreadsheetpractice.com/formulas/sum-by-month)

### List the months between two dates

`=DATE(YEAR(B1),MONTH(B1)+SEQUENCE((YEAR(B2)-YEAR(B1))*12+MONTH(B2)-MONTH(B1)+1)-1,1)`

Excel. Result on the sample sheet: 8 rows (D2:D9). [See it and try it](https://spreadsheetpractice.com/formulas/list-the-months-between-two-dates)

## Questions

### What does the MONTH formula generator do?

You describe the task in plain English, and it writes the formula, using MONTH where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.

### What does MONTH do?

MONTH returns the month of a date as a number from 1 to 12.

### Can I learn to write MONTH formulas myself?

Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the MONTH function page has a practice exercise.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
