The QUARTILE.INC function in Google Sheets is a valuable statistical tool used to calculate the quartiles of a dataset. Quartiles are used to divide a set of data into four equal parts, making it easier to understand the distribution and spread of values. This function is particularly useful for data analysis, financial modeling, and statistical reporting, providing a clear insight into the relative standing of a value within a dataset.
Syntax
QUARTILE.INC(data, quart)
- data: A range of numeric values or an array from which you want to calculate quartiles.
- quart: A number indicating which quartile to return: 0 for the minimum value, 1 for Q1, 2 for Q2 (median), 3 for Q3, and 4 for the maximum value.
Example #1
=QUARTILE.INC(A1:A10, 1)
This function calculates the first quartile (Q1) of the values in the range A1 to A10. For instance, if the dataset contains the numbers 2, 3, 5, 7, 10, 12, 13, 15, 21, and 25, the result would be 6.5.
Example #2
=QUARTILE.INC(B1:B15, 2)
This function returns the median (Q2) of values from B1 to B15. For example, if the numbers in this range are 1, 4, 5, 7, 8, 9, 10, 12, 14, 16, 20, 22, 23, 25, and 30, the median would be 10.
Example #3
=QUARTILE.INC(C1:C20, 3)
This function evaluates the third quartile (Q3) for the range C1 to C20. If the dataset comprises values like 3, 5, 7, 8, 9, 12, 14, 16, 19, 21, 22, 24, 25, 28, 30, 31, 35, 37, 40, and 42, the resulting value would be 30.
Error handling
- NUM! – This error indicates that the “quart” argument is not an integer between 0 and 4, which is necessary for valid quartile calculations.
- DIV/0! – This error occurs if the “data” range is empty, meaning there are no values to compute the quartiles from.
- VALUE! – This error arises if the “data” argument does not contain numeric values, making it impossible for the function to perform its calculations.