Excel Get Quarter from Date: Formula & Examples
To get the quarter from a date in Excel, use the formula =ROUNDUP(MONTH(date)/3,0) or the more robust =CHOOSE(MONTH(date),1,1,1,2,2,2,3,3,3,4,4,4). Both return the quarter number (1–4) for any date, and you can combine them with YEAR() to create a label like “Q1-2025”.
Why Excel Has No Built-In Quarter Function
Excel provides dedicated functions for days, months, and years (DAY, MONTH, YEAR), but there is no QUARTER function. This is because quarters are a business convention, not a calendar standard—fiscal years can start in any month, and some companies use 4-4-5 or 13-period calendars. As a result, you build the quarter logic yourself using the month number.
The Standard Formula: ROUNDUP
The most common approach groups months into quarters by dividing the month number by 3 and rounding up:
=ROUNDUP(MONTH(A2)/3,0)
Here’s how it works for each month:
- January (1): 1/3 = 0.33 → rounds up to 1
- February (2): 2/3 = 0.67 → rounds up to 1
- March (3): 3/3 = 1.00 → rounds up to 1
- April (4): 4/3 = 1.33 → rounds up to 2
- May (5): 5/3 = 1.67 → rounds up to 2
- June (6): 6/3 = 2.00 → rounds up to 2
- July (7): 7/3 = 2.33 → rounds up to 3
- August (8): 8/3 = 2.67 → rounds up to 3
- September (9): 9/3 = 3.00 → rounds up to 3
- October (10): 10/3 = 3.33 → rounds up to 4
- November (11): 11/3 = 3.67 → rounds up to 4
- December (12): 12/3 = 4.00 → rounds up to 4
The ROUNDUP function always rounds away from zero, so 1.0 stays 1 and 3.0 stays 3—exactly what you need.
Alternative: CHOOSE for Clarity
Some users prefer a formula that explicitly lists each month’s quarter, which is easier to read and modify for fiscal years:
=CHOOSE(MONTH(A2),1,1,1,2,2,2,3,3,3,4,4,4)
This works because CHOOSE picks the nth item from the list. For a fiscal year starting in April (quarter 1 = Apr–Jun), you would reorder the list: =CHOOSE(MONTH(A2),4,4,4,1,1,1,2,2,2,3,3,3). This is clearer than trying to adjust the arithmetic for a non-calendar year.
Creating a “Q1-2025” Label
Often you want a text label like “Q1-2025” rather than just the number. Combine the quarter formula with YEAR and the ampersand (&) concatenation operator:
="Q"&ROUNDUP(MONTH(A2)/3,0)&"-"&YEAR(A2)
If your dates span multiple years, this label is unique per quarter and sorts correctly as text (because “Q1-2025” sorts before “Q1-2026”). For a fiscal year label, adjust the year logic: if the fiscal year starts in April, the fiscal year for a date in January 2025 is actually 2024. A formula for that would be ="FY"&YEAR(A2)-IF(MONTH(A2)<4,1,0)&"-Q"&CHOOSE(MONTH(A2),4,4,4,1,1,1,2,2,2,3,3,3).
Common Mistakes and How to Avoid Them
- Using ROUND instead of ROUNDUP:
ROUND(5/3,0)gives 2, butROUNDUPgives 2—the difference appears for months divisible by 3 (3, 6, 9, 12).ROUND(3/3,0)gives 1, butROUND(4/3,0)gives 1, which is wrong for April. Always useROUNDUP. - Not handling blank cells: If a date cell is empty,
MONTHreturns 1 (January), so you get quarter 1. Wrap the formula in an IF:=IF(A2="","",ROUNDUP(MONTH(A2)/3,0)). - Text dates: If your "date" is stored as text (e.g., "01/15/2025"),
MONTHmay return a #VALUE! error. Convert the text to a real date usingDATEVALUEfirst, or use the Text to Columns feature. - Fiscal vs. calendar quarters: The standard formula assumes quarters start in January. For fiscal years, use the
CHOOSEversion with a reordered list.
Using Quarter in PivotTables and Charts
If you want to group dates by quarter in a PivotTable, you don’t need a formula at all. Right-click a date field in the PivotTable, choose Group, then select Quarters (and optionally Years). Excel creates a new field called "Quarter" automatically, and you can also group by month and quarter simultaneously. This method is faster and updates automatically when you refresh the PivotTable.
For charts, you can plot the quarter label directly if you use the concatenated formula above. Alternatively, create a helper column with the quarter number and use that as the axis. Remember that Excel’s built-in date grouping in charts (via the axis options) also supports quarters, but only if your source data contains real dates.
Frequently Asked Questions
How do I get the quarter from a date in Excel without a formula?
You can use a PivotTable’s Group feature: right-click the date field, choose Group, and select Quarters. This creates a quarter field without writing any formula. For a one-off answer, you could also use the TEXT function with a custom format, but that only works for display, not for further calculations.
What if my fiscal year starts in July?
Use the CHOOSE approach with a reordered list. For a fiscal year starting in July (Q1 = Jul–Sep), the formula is =CHOOSE(MONTH(A2),3,3,3,4,4,4,1,1,1,2,2,2). This maps July (month 7) to quarter 1, August to 1, September to 1, and so on.
Can I get the quarter as a date (e.g., the first day of the quarter)?
Yes. To get the first day of the current quarter, use =DATE(YEAR(A2),CHOOSE(MONTH(A2),1,1,1,4,4,4,7,7,7,10,10,10),1). This returns a real date you can format and use in calculations.
Why does my formula return 1 for an empty cell?
Because MONTH of an empty cell is treated as 0, but Excel interprets 0 as January 0, 1900, so MONTH returns 1. Wrap the formula in an IF to check for blanks: =IF(A2="","",ROUNDUP(MONTH(A2)/3,0)).
Is there a way to get the quarter number using LET or LAMBDA?
Yes, in Excel 365 you can define a reusable LAMBDA: =LAMBDA(d,ROUNDUP(MONTH(d)/3,0)). You can name it in the Name Manager (e.g., GetQuarter) and then use =GetQuarter(A2). This is useful for complex workbooks, but for most users the simple formula is enough.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.