To return the calendar quarter for a date in Excel, with the date in cell A2, use ="Q"&ROUNDUP(MONTH(A2)/3,0). For example, if A2 contains 5/18/2026, the result is Q2. If you need just the number, use =ROUNDUP(MONTH(A2)/3,0), which returns 2.
How the quarter formula works
Excel stores a valid date as a serial number, and the MONTH function extracts its month number, from 1 for January through 12 for December. Dividing that month by 3 and rounding up groups the months into quarters: January through March become 1, April through June become 2, July through September become 3, and October through December become 4. Joining the letter Q to the result makes the output easier to read in reports.
For a date in A2, the formula =ROUNDUP(MONTH(A2)/3,0) produces a numeric result. The formula ="Q"&ROUNDUP(MONTH(A2)/3,0) produces text such as Q1 or Q4. The distinction matters if you later want to sort, calculate with, or compare the result: numbers are better for calculations, while text labels are convenient for display.
Choose a formula for your output
Use the version that matches what you want displayed or calculated. The following examples all assume the source date is in A2:
- Quarter number:
=ROUNDUP(MONTH(A2)/3,0)returns 1, 2, 3, or 4. - Quarter label:
="Q"&ROUNDUP(MONTH(A2)/3,0)returns Q1, Q2, Q3, or Q4. - Year and quarter:
=YEAR(A2)&" Q"&ROUNDUP(MONTH(A2)/3,0)returns a label such as 2026 Q2. - Quarter start date:
=DATE(YEAR(A2),3*ROUNDUP(MONTH(A2)/3,0)-2,1)returns the first day of the quarter, such as 4/1/2026 for a date in May 2026. - Quarter end date:
=EOMONTH(DATE(YEAR(A2),3*ROUNDUP(MONTH(A2)/3,0)-2,1),2)returns the last day of that quarter, such as 6/30/2026.
For the date 5/18/2026, the quarter number is 2, the label is 2026 Q2, the quarter start is 4/1/2026, and the quarter end is 6/30/2026. These date formulas return actual Excel dates, so you can apply a date format or use them in later calculations.
Apply the formula to a list of dates
Enter the formula in the first row beside your dates, then fill it down. For example, with dates in A2:A100, enter ="Q"&ROUNDUP(MONTH(A2)/3,0) in B2. Drag the fill handle at the lower-right corner of B2 down the column, or select the destination cells and press Ctrl+D on Windows. Excel adjusts A2 to A3, A4, and so on. On Mac, use Command+D to fill down.
If your data is an Excel Table, enter the formula in the adjacent table column and Excel will typically fill the calculated column automatically. You can also create a combined label using =YEAR(A2)&" Q"&ROUNDUP(MONTH(A2)/3,0). Including the year is important when the data spans multiple years: Q1 alone cannot distinguish January–March 2025 from January–March 2026.
Calendar quarters versus fiscal quarters
The basic formula assumes the year starts in January. Some organizations use a fiscal year that begins in another month, so their quarter numbering may not match calendar quarters. If the fiscal year starts in July, for example, July, August, and September are fiscal Q1. With a date in A2, use =ROUNDUP(MOD(MONTH(A2)-7,12)/3,0)+1 to return the fiscal quarter number for a July-start year.
Check the year-label convention before using a fiscal label. A fiscal year may be named for the year in which it begins or the year in which it ends. For a July 2026 start, one organization might call the period FY2026 Q1, while another calls it FY2027 Q1. The quarter calculation alone cannot determine your organization’s naming policy.
For a fiscal year beginning in a different month, replace 7 in the formula with that month’s number: January is 1, February 2, and so forth. The formula assumes the start month is a number from 1 to 12. Verify the results around the start month and year boundary before applying it to a report.
Common errors and date checks
If the formula returns #VALUE!, Excel may be treating the cell contents as text rather than as a date. A value that looks like 5/18/2026 can still be text, especially if it was imported from another system or uses a date format Excel does not recognize. Check the cell’s number format and try converting the source to a true date; changing the display format alone does not convert text into a date.
Blank cells can also produce an unexpected quarter result because Excel may treat a blank reference like a date serial value of zero in date calculations. To leave the output blank when A2 is empty, use =IF(A2="","","Q"&ROUNDUP(MONTH(A2)/3,0)). If a column can contain text or errors as well as dates, validate or clean those entries before relying on quarter summaries.
Another frequent issue is mixing up a quarter number and a quarter label. The text result Q2 is useful for display but is not the number 2. If you need to sort or calculate, keep a numeric quarter column and optionally create a separate label column. For chronological sorting across years, use a year-and-quarter field rather than sorting by Q1 through Q4 alone.
Frequently Asked Questions
What is the simplest Excel formula to get a quarter from a date?
With the date in A2, use =ROUNDUP(MONTH(A2)/3,0) for the number 1–4, or ="Q"&ROUNDUP(MONTH(A2)/3,0) for a label such as Q3.
How do I show the year and quarter together?
With a date in A2, use =YEAR(A2)&" Q"&ROUNDUP(MONTH(A2)/3,0). A date in October 2026 returns 2026 Q4.
Can Excel return the first day of the quarter?
Yes. With the date in A2, use =DATE(YEAR(A2),3*ROUNDUP(MONTH(A2)/3,0)-2,1). For a date in May 2026, it returns April 1, 2026.
Does this formula work for fiscal quarters?
The basic formula returns calendar quarters. For a fiscal year starting in July, use =ROUNDUP(MOD(MONTH(A2)-7,12)/3,0)+1. Change 7 to the fiscal year’s starting month number for another start month.
Why does the formula return the wrong quarter?
Confirm that the source is a real Excel date and that you want calendar, not fiscal, quarters. Also check that the date is in the cell referenced by the formula; imported date text and regional date formats are common causes of errors.
Related
- How to Group Dates in Excel by Month, Quarter, or Year
- Google Sheets FILTER Formula: How Do You Use It?
- COUNTIF Formula in Google Sheets: How to Use It
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel Not Blank Criteria: COUNTIF, SUMIF, and Practical ExamplesIn Excel, use the not-blank criterion "<>" in functions such as COUNTIF, COUNTIFS, SUMIF, and SUMIFS. For example,…
- Excel Formula to Round to the Nearest Whole NumberTo round a number in Excel to the nearest whole number, use the ROUND function with zero decimal…
- Excel Table: Change a Formula in One Cell Only?Yes. To change a formula in just one Excel table cell, enter the replacement formula in that cell;…
- How to Change Name Format in Excel: Formulas and Flash FillTo change names such as Ava Chen to Chen, Ava in Excel, enter a pattern with Flash Fill…
- How to Sort Numbers in Excel in Numerical OrderTo sort numbers in Excel, click a cell in the number column, then choose Data > Sort Smallest…
- Count Cells With Text in Excel Using the COUNTIF FormulaIf your text is in A2:A100, enter =COUNTIF(A2:A100,"*") to count cells containing text. This works in Microsoft Excel…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.