Exceljet

Quick, clean, and to the point

Get quarter from date

Excel formula: Get quarter from date
Generic formula 
=ROUNDUP(MONTH(date)/3,0)
Explanation 

If you want to calculate the quarter (i.e. 1,2,3,4) from a date, you can use the ROUNDUP function together with MONTH.

In the example shown, the formula in cell C5 is:

=ROUNDUP(MONTH(B5)/3,0)

How this formula works

In this case, the formula first extracts the month as a number between 1-12, then divides this number by 3. The result is then rounded up to the nearest whole number using the ROUNDUP function.

The ROUNDUP function works like the ROUND function, except that ROUNDUP will always round numbers 1-9 upwards to a given number of digits.

Adding a Q

If you want the quarter number to include a "Q" you can concatenate. The formula in D5 is:

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

The result is the letter "Q" prepended to the quarter number:

Calculating quarter of the year from a date

Author 
Dave Bruns

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.