How to Build a Fiscal Calendar Table in Excel
The CFO asks for Q3 year to date. The company’s year starts in July, so Q3 is January to March. Excel’s built-in date functions think March is in Q1, the PivotTable groups it under Q1, and the analyst who built last year’s pack hardcoded a lookup that stopped at June 2025.
Every model with a non-calendar year has the same problem, and most solve it three times: once in the P&L, once in the variance file, once in the board deck. Each copy carries its own version of the fiscal offset, and they drift. The fix is a fiscal calendar table: one row per month, one input that says when the year starts, and every period formula in the workbook reads from it instead of working it out again.
This post builds that table in Excel 2021 or 365. The examples use a July year start (a June year-end), a current period of March 2026, and the same columns as the free workbook linked at the end.
What the table holds
One row per month. Each column answers one question that a report asks about a date.
| Column | Example for March 2026 | What reads it |
|---|---|---|
| Month end | 31 Mar 2026 | Every lookup key |
| Fiscal year | 2026 | Annual totals, YTD |
| Fiscal period | 9 | YTD and QTD windows |
| Fiscal quarter | 3 | QTD, quarterly packs |
| Period label | FY26 P09 | Report headers, PivotTables |
| In YTD, In QTD, In rolling 12 | 1 | Flags for PivotTables and checks |
Month grain is deliberate. FP&A reports by closed month, the general ledger posts by period, and a month-level table of 72 rows covers six fiscal years without slowing anything down. A transaction date finds its row in one step, shown further down.
One input: the month the year starts
Put the fiscal start month in one cell on the Inputs tab and name it FYStartMonth. July is 7. A calendar year is 1. Everything below reads that cell, so a client with an October year-end is a one-cell change, not a rebuild.
Two more inputs complete the setup: the first fiscal year the table should cover, and how your company names its years (more on that below).
The formulas, column by column
Month end. The first row is the month-end of the first month of the first fiscal year. Each row after it adds one month:
=EOMONTH(CalStart, 0)
=EOMONTH(A5, 1)
CalStart is the first day of the first fiscal year. Month-end dates are the key because a month-end is unambiguous: 31 March 2026 is March whatever the locale, and it matches how most ERP period exports are dated. Use EOMONTH rather than adding 30 or 31 days, which drifts by a day every few months.
Fiscal period. The month’s position in the fiscal year, 1 to 12:
=MOD(MONTH(A5)-FYStartMonth, 12)+1
For March with a July start: MONTH returns 3, 3 minus 7 is -4, MOD(-4, 12) is 8, plus 1 is period 9. For July it returns 1, for June 12. MOD handles the wrap past December without an IF.
Fiscal quarter.
=ROUNDUP(D5/3, 0)
Periods 1 to 3 are Q1, 7 to 9 are Q3. March 2026 is Q3, which is what the CFO meant.
Fiscal year. This is where companies disagree. Most name the fiscal year after the calendar year it ends in: July 2025 to June 2026 is FY2026. The US federal government does the same (its FY2026 started in October 2025). Others name it after the year it starts in. Make it an input (FYNaming, End or Start) rather than an assumption:
=YEAR(A5)
+IF(AND(FYNaming="End", FYStartMonth>1, MONTH(A5)>=FYStartMonth), 1, 0)
-IF(AND(FYNaming="Start", MONTH(A5)<FYStartMonth), 1, 0)
Under End, months from July onward belong to next calendar year’s label. Under Start, months before July belong to last year’s. With a January start both adjustments switch off and the fiscal year is the calendar year.
Labels.
="FY"&RIGHT(C5,2)&" P"&TEXT(D5,"00")
="FY"&RIGHT(C5,2)&" Q"&E5
The zero-padded period matters. “FY26 P9” sorts after “FY26 P10” as text; “FY26 P09” sorts correctly in a PivotTable, a slicer and a filter dropdown without a separate sort column.
How a transaction date finds its row
The table is monthly, and invoices are dated 14 March. Convert the date to its month-end, then look it up:
=XLOOKUP(EOMONTH([@[Invoice Date]],0), Calendar[Month End], Calendar[Period Label])
An invoice dated 14 March 2026 becomes 31 March 2026, which returns FY26 P09. One helper column on the transaction table, and every fiscal attribute is one lookup away. If your data comes through Power Query, do the same step there with Date.EndOfMonth and merge against the calendar, so the source table arrives already tagged.
Current period in one input cell
Add a fourth input: the current period, the last closed month-end. Name it CurPeriod. Look up its fiscal year, period and quarter from the table once, on the Inputs tab, and every report reads those three cells.
Then add flag columns that compare each row to the current period:
In YTD: =--AND(C5=CurFY, A5<=CurPeriod)
In QTD: =--AND(C5=CurFY, E5=CurFQ, A5<=CurPeriod)
In rolling 12: =--AND(I5>-12, I5<=0)
Column I is months from the current period, =(YEAR(A5)-YEAR(CurPeriod))*12+MONTH(A5)-MONTH(CurPeriod), so the rolling 12 flag is the current month and the eleven before it. The double minus turns TRUE and FALSE into 1 and 0, which a PivotTable can filter on and SUMPRODUCT can multiply by.
Roll the month forward by changing CurPeriod from 31 March to 30 April. Every flag moves, period 10 joins YTD, and Q4 starts a new QTD. Nothing else is touched.
The flags are not the only way to total a period. For report formulas, two dates and a SUMIFS are cleaner, and the YTD, MTD and QTD post builds them from this table. The flags earn their place in PivotTables and as an independent check on those formulas.
Where it breaks
Text dates from the ERP. An export with “2026-03” or “03/2026” as text matches nothing in the table, and lookups return #N/A or SUMIFS returns zero with no error. Test with =COUNT(Data[Month End]) against the row count. If they differ, some dates are text. Convert them in Power Query with a proper Date type, not with a formula column you will forget about.
Mixed keys. If the calendar is keyed on month-end and the data on the first of the month, every match fails. Pick month-end, convert everything to it at the door, and say so on the cover tab.
4-4-5 calendars. Retail and manufacturing often close on weeks: periods of four, four and five weeks, with a 53rd week every five or six years. MOD on the month number does not apply. The table still works, but its period boundaries become typed dates (or are built from a week count) instead of EOMONTH. Everything downstream keeps working because it reads the table, not the formula that built it. That is the argument for the table in one sentence.
Two meanings of FY26. The ERP calls it FY2026, the board deck calls it FY26, and a newer controller came from a company that named years by their start. Put the convention in FYNaming, label every header from the table, and the disagreement surfaces once instead of in a board meeting.
PivotTable date grouping. Grouping a date field by Quarters gives calendar quarters. Add the calendar’s Fiscal Quarter and Period Label columns to the data (the lookup above) and group on those instead.
What to build on it
With the table in place, period totals stop being a formula-writing exercise. Rolling 12-month totals and YTD comparatives each come down to two dates and one SUMIFS, and they agree with each other because they read the same calendar.
The free Fiscal Calendar and Period Totals workbook has this table built: four inputs, six fiscal years, the flags above, and a report tab with MTD, QTD, YTD and rolling 12 against prior year, plus a check that two independent methods agree.
