# How to list the months between two dates in Excel

Count the months, then build the first of each with DATE: `=DATE(YEAR(B1),MONTH(B1)+SEQUENCE((YEAR(B2)-YEAR(B1))*12+MONTH(B2)-MONTH(B1)+1)-1,1)`.

**Excel:** `=DATE(YEAR(B1),MONTH(B1)+SEQUENCE((YEAR(B2)-YEAR(B1))*12+MONTH(B2)-MONTH(B1)+1)-1,1)` (Excel 2021, 2024 and Microsoft 365)

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

## Example

Sample data (row 1 is the header):

| A | B | C | D |
| --- | --- | --- | --- |
| Start | 2026-02-15 |  | Month |
| End | 2026-09-03 |  |  |

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

Result (spills 8 × 1): Feb 2026; Mar 2026; Apr 2026; May 2026; Jun 2026; Jul 2026; Aug 2026; Sep 2026

## How it works

The years apart times 12, plus the months apart, plus 1 is the number of months the period touches: 8 from February to September. SEQUENCE returns 1 to 8, and DATE builds the 1st of each month by adding those numbers to the start month. DATE rolls month 13 into January of the next year, so the list can cross a year end.

Formatted as mmm yyyy, the cells read Feb 2026 to Sep 2026.

## Other ways

- `=EOMONTH(B1,SEQUENCE((YEAR(B2)-YEAR(B1))*12+MONTH(B2)-MONTH(B1)+1,1,0))`: EOMONTH gives the last day of each month instead, useful for month-end reports. (Month-end dates: Feb 28 to Sep 30.)

## Common mistakes

- DATEDIF(B1,B2,"m") counts only complete months, 6 here, so it misses the first or last month. Count from the year and month numbers instead.
- Give the cells a month format such as mmm yyyy. With a plain date format, every entry shows as the 1st.

## Questions

**How do I list the month names as text?**

Wrap the result in TEXT: `=TEXT(DATE(…),"mmmm yyyy")`. Text can't be used in date maths, so keep the dates if you'll sum by month.

**How do I list the next 12 months from today?**

Start from this month: `=DATE(YEAR(TODAY()),MONTH(TODAY())+SEQUENCE(12)-1,1)`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/list-the-months-between-two-dates
