← All how-to recipes

How to create a quarter-and-year label like "Q3 2026"

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Build fiscal-period labels from a date for grouping, pivots, and report headers.

The formula

AppFormulaNotes
Excel (desktop)="Q"&ROUNDUP(MONTH(A2)/3,0)&" "&YEAR(A2)ROUNDUP(month/3) gives the quarter number; the rest concatenates the label.
Google Sheets="Q"&ROUNDUP(MONTH(A2)/3,0)&" "&YEAR(A2)Identical.
LibreOffice Calc="Q"&ROUNDUP(MONTH(A2)/3,0)&" "&YEAR(A2)Identical.

How it works

MONTH divided by 3 and rounded up maps months to quarters (July = month 7, 7/3 rounds up to 3), and the pieces are glued into "Q3 2026". This text label is exactly what pivot tables and SUMIFS group on for quarterly reporting. For a fiscal year that doesn't start in January, shift the month first (e.g. an April start: ROUNDUP(MOD(MONTH(A2)-4,12)/3+0.01,0)). Sortable variant: put the year first -> =YEAR(A2)&"-Q"&ROUNDUP(MONTH(A2)/3,0) gives "2026-Q3", which sorts chronologically.

Verified, not just documented

We ran ="Q"&ROUNDUP(MONTH(DATE(2026,7,21))/3,0)&" "&YEAR(DATE(2026,7,21)) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned Q3 2026 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned Q3 2026 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

ROUNDUP · MONTH · YEAR — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons