# How to count dates in a fiscal year in Excel

Count from the fiscal year's first day up to the next one's: `=COUNTIFS(B2:B12,">="&DATE(G1-1,G2,1),B2:B12,"<"&DATE(G1,G2,1))`, with the fiscal year in G1 and its start month in G2.

**Excel:** `=COUNTIFS(B2:B12,">="&DATE(G1-1,G2,1),B2:B12,"<"&DATE(G1,G2,1))` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F | G |
| --- | --- | --- | --- | --- | --- | --- |
| Invoice | Date |  |  |  | Fiscal year | 2026 |
| F-01 | 2025-06-30 |  |  |  | Starts in month | 7 |
| F-02 | 2025-07-01 |  |  |  | Invoices |  |
| F-03 | 2025-09-15 |  |  |  |  |  |
| F-04 | 2025-12-31 |  |  |  |  |  |
| F-05 | 2026-01-20 |  |  |  |  |  |
| F-06 | 2026-03-31 |  |  |  |  |  |
| F-07 | 2026-06-30 |  |  |  |  |  |
| F-08 | 2026-07-01 |  |  |  |  |  |
| F-09 | 2026-08-12 |  |  |  |  |  |
| F-10 | 2025-05-02 |  |  |  |  |  |
| F-11 | 2026-04-18 |  |  |  |  |  |

Formula in G3: `=COUNTIFS(B2:B12,">="&DATE(G1-1,G2,1),B2:B12,"<"&DATE(G1,G2,1))`

Result: 7

## How it works

Fiscal year 2026 with a July start runs from July 1, 2025 to June 30, 2026. `DATE(G1-1,G2,1)` builds the first day, `DATE(G1,G2,1)` the first day of the next fiscal year, and COUNTIFS counts the dates from one up to, but not including, the other.

This names the fiscal year after the calendar year it ends in, the most common convention. June 30 and July 1 sit on either side of the boundary.

## Other ways

- `=SUMPRODUCT(--(YEAR(B2:B12)+(MONTH(B2:B12)>=G2)=G1))`: Works out each date's fiscal year: the calendar year, plus 1 from the start month on. The same expression makes a fiscal-year helper column.

## Common mistakes

- If your company names the fiscal year after the year it starts in, use `DATE(G1,G2,1)` and `DATE(G1+1,G2,1)` instead.
- A fiscal year that starts in January is just the calendar year; see the page on counting dates in a given year.

## Questions

**How do I count by fiscal quarter?**

Shift the date back to a January-based year first: the fiscal quarter is `=ROUNDUP(MONTH(EDATE(B2,1-G2))/3,0)`.

**The US federal fiscal year starts in October. What do I change?**

Set G2 to 10: fiscal year 2026 then runs from October 1, 2025 to September 30, 2026.

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/count-dates-in-a-fiscal-year
