Return the quarter end date for a date
=IF(
OR(date="", year_start_month=""),
"",
IF(
OR(
NOT(ISNUMBER(date)),
IFERROR(VALUE(year_start_month),0)<1,
IFERROR(VALUE(year_start_month),0)>12
),
"",
EOMONTH(
EDATE(
DATEVALUE(
(YEAR(date) - IF(MONTH(date) < IFERROR(VALUE(year_start_month),0), 1, 0)) &
"-" & TEXT(IFERROR(VALUE(year_start_month),0), "00") &
"-01"
),
INT(MOD(MONTH(date) - IFERROR(VALUE(year_start_month),0), 12) / 3) * 3
),
2
)
)
)This function returns the last date of the quarter that a given date falls within, using a configurable "year start month" so fiscal years work cleanly. For example, if A2 contains "2026-02-15" then =QUARTER_START(A2, 1) returns "2026-03-31". Then =QUARTER_START(A2, 2) returns "2026-04-30".
Use the inputs below to create QUARTER_END as a reusable custom function in Google Sheets.
Learn how to add custom functions to Google SheetsQUARTER_END
Return the quarter end date for a date
=IF( OR(date="", year_start_month=""), "", IF( OR( NOT(ISNUMBER(date)), IFERROR(VALUE(year_start_month),0)<1, IFERROR(VALUE(year_start_month),0)>12 ), "", EOMONTH( EDATE( DATEVALUE( (YEAR(date) - IF(MONTH(date) < IFERROR(VALUE(year_start_month),0), 1, 0)) & "-" & TEXT(IFERROR(VALUE(year_start_month),0), "00") & "-01" ), INT(MOD(MONTH(date) - IFERROR(VALUE(year_start_month),0), 12) / 3) * 3 ), 2 ) ) )
date
year_start_month
Date to find the quarter start for
A2
Month number your year starts (1-12), e.g. 4 for April
2
Other functions in the same category: Date & Time Operations
Return the quarter start date for a date
Determine if a date falls within a start and end date
Returns TRUE if two date ranges overlap
Returns TRUE if a date falls on Monday through Friday
Returns TRUE if a date falls on Saturday or Sunday
Return the next date that matches a weekday number
Named functions enable the creation of custom, reusable formulas that mimic built-in functions, streamlining calculations and data manipulations. These functions simplify complex formulas, making spreadsheets more readable and less prone to errors. By encapsulating intricate logic within a single function call, they enhance consistency across your data. Utilizing named functions reduces the need to write lengthy formulas repeatedly, thereby improving workflow efficiency and productivity in data analysis and management.
Download and import — fastest way to add the function but does not include argument descriptions and examples
Follow these simple steps to download and import a function into your spreadsheet. This method is the quickest and easiest way to add the named function to your Google Sheets document, but will not include the argument description and examples.
Once added, the function will be ready to use in your document like any other built-in function. Simply type the function name and provide the required inputs to use it in your calculations.
Copy and paste — copy and paste each property one at a time
Follow these simple steps to integrate a custom named function into your spreadsheet:
Once added, the function will be ready to use in your document like any other built-in function. Simply type the function name and provide the required inputs to use it in your calculations.