How to get the quarter from a date
✓ Verified in LibreOffice 25.8.7.3Work out which quarter (1–4) a date falls in, for grouping and reporting.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel | =ROUNDUP(MONTH(A2)/3,0) | Prepend text if you want a label: ="Q"&ROUNDUP(MONTH(A2)/3,0). |
| Google Sheets | =ROUNDUP(MONTH(A2)/3,0) | Identical. |
| LibreOffice Calc | =ROUNDUP(MONTH(A2)/3,0) | Identical. |
How it works
MONTH gives 1–12; dividing by 3 and rounding up maps months 1–3 to quarter 1, 4–6 to 2, and so on — July is month 7, so 7/3 = 2.33 rounds up to quarter 3. For a fiscal year that doesn't start in January, shift the month first, e.g. =ROUNDUP(MOD(MONTH(A2)-4,12)/3+0.01,0) for an April start — or simpler, use =CHOOSE(MONTH(A2),4,4,4,1,1,1,2,2,2,3,3,3).
Verified, not just documented
We ran =ROUNDUP(MONTH(DATE(2026,7,21))/3,0) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 3 — exactly the expected result. Every formula here is confirmed by actually executing it.