Get the Quarter from a Date

Excel Formulas › Date & Time

All versionsMONTHROUNDUP

To turn a date into its calendar quarter — Q1, Q2, Q3, Q4 — divide the month number by 3 and round up. It’s a one-liner that drives quarterly reports and pivot groupings.


Quick formula: for a date in A2:
=ROUNDUP(MONTH(A2)/3, 0)
MONTH returns 1–12; dividing by 3 and rounding up maps Jan–Mar→1, Apr–Jun→2, and so on.

Functions used (tap for the full reference guide):

The example

Dates mapped to their quarter.

AB
1DateQuarter
22/14/20261
35/30/20262
411/02/20264

The formula

The quarter number in B2:

=ROUNDUP(MONTH(A2)/3, 0) // May = month 5 → 5/3 = 1.67 → 2

How it works

Month-number math gives the quarter:

  1. MONTH(A2) extracts the month as 1–12.
  2. Dividing by 3 puts each month into a third: months 1–3 give 0.33–1, months 4–6 give 1.33–2, etc.
  3. ROUNDUP(…, 0) rounds those up to the whole quarter — 1, 2, 3, or 4.
  4. For a label, wrap it: ="Q"&ROUNDUP(MONTH(A2)/3,0) gives “Q2.”

Include the year for multi-year data: =YEAR(A2)&"-Q"&ROUNDUP(MONTH(A2)/3,0) → “2026-Q2,” perfect for grouping in a PivotTable.

Try it: interactive demo

Live demo

Pick a date; see its quarter.

Quarter:

Variations

Quarter label

Prefix with Q:

="Q" & ROUNDUP(MONTH(A2)/3, 0)

Year and quarter

Group across years:

=YEAR(A2) & "-Q" & ROUNDUP(MONTH(A2)/3, 0)

Fiscal quarter (July start)

Shift the months before dividing:

=ROUNDUP(MOD(MONTH(A2)-7, 12)/3 + 0.0001, 0)

Pitfalls & errors

This is the calendar quarter. Fiscal years starting in other months need the month shifted first (see the fiscal variation).

Text dates return #VALUE!. MONTH needs a real date; convert text dates first.

For totals by quarter, see Sum by Quarter. This formula labels a date; summing needs SUMIFS with date boundaries.

Practice workbook

📊
Download the free Get the Quarter from a Date practice workbook
Dates with the live quarter formula, the label and year-quarter variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I get the quarter from a date in Excel?
Use =ROUNDUP(MONTH(A2)/3, 0). It maps months 1-3 to quarter 1, 4-6 to quarter 2, and so on. Add "Q"& in front for a label.
How do I include the year with the quarter?
Concatenate: =YEAR(A2)&"-Q"&ROUNDUP(MONTH(A2)/3,0) returns values like 2026-Q2, ideal for grouping across years.
How do I get a fiscal quarter that doesn't start in January?
Shift the month number before dividing. For a July fiscal start, use MOD(MONTH(A2)-7,12) to renumber the months, then divide by 3 and round up.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Sum by quarter · First & last day of month · Weekday name from a date

Function references: MONTH · ROUNDUP · YEAR