QUARTILE.INC function
Returns the quartile of a data set, based on percentile values from 0..1, inclusive.
Quartiles often are used in sales and survey data to divide populations into groups. For example, you can use QUARTILE.INC to find the top 25 percent of incomes in a population.
Syntax
QUARTILE.INC(array,quart)
The QUARTILE.INC function syntax has the following arguments:

Array Required. The array or cell range of numeric values for which you want the quartile value.

Quart Required. Indicates which value to return.
Parameters
If quart equals 
QUARTILE.INC returns 
0 
Minimum value 
1 
First quartile (25th percentile) 
2 
Median value (50th percentile) 
3 
Third quartile (75th percentile) 
4 
Maximum value 
Remarks

If array is empty, QUARTILE.INC returns the #NUM! error value.

If quart is not an integer, it is truncated.

If quart < 0 or if quart > 4, QUARTILE.INC returns the #NUM! error value.

MIN, MEDIAN, and MAX return the same value as QUARTILE.INC when quart is equal to 0 (zero), 2, and 4, respectively.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?

Select the example in this article.
Important Do not select the row or column headers.
Selecting an example from Help

Press CTRL+C.

In Excel, create a blank workbook or worksheet.

In the worksheet, select cell A1, and press CTRL+V.
Important For the example to work properly, you must paste it into cell A1 of the worksheet.

To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
After you copy the example to a blank worksheet, you can adapt it to suit your needs.

