QUARTILE Function
Returns the specified quartile (0=min, 1, 2=median, 3, 4=max) of a dataset.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| array | The range or array of numeric values. | Required |
| quart | Which quartile to return: 0=minimum, 1=first, 2=median, 3=third, 4=maximum. An integer from 0 to 4. | Required |
Basic Example
Second quartile equals the median
=QUARTILE({1,2,3,4,5,6,7,8}, 2)The median of 1..8 is the average of the 4th and 5th values: (4+5)/2 = 4.5.
Advanced Examples
Example 1: First quartile with interpolation
25th percentile of eight valuesUses the inclusive method equivalent to PERCENTILE.INC with k = 0.25.
=QUARTILE({1,2,3,4,5,6,7,8}, 1)Example 2: Fourth quartile returns the maximum
Upper edge of the dataquart = 4 gives the largest value.
=QUARTILE({1,2,3,4,5,6,7,8}, 4)How QUARTILE Works
QUARTILE computes quartiles using the inclusive method, internally equivalent to PERCENTILE.INC(array, quart/4). It returns the minimum (quart 0), first quartile (quart 1), median (quart 2), third quartile (quart 3), or maximum (quart 4). Values are interpolated when the quartile position is fractional. quart must be an integer from 0 to 4, else #NUM!. Text and logical values are ignored.
Important Notes & Limitations
quart must be an integer from 0 to 4; other values cause #NUM!.
May interpolate, so the result need not be an actual data value.
Ignores text and logical values in the array.
Common Errors & Fixes
#NUM! errorquart is less than 0, greater than 4, or non-integer; or the array is empty.Fix: Use an integer quart in 0..4 and ensure the range has numbers.
Result differs from QUARTILE.EXCDifferent (inclusive vs exclusive) interpolation methods.Fix: Use QUARTILE.EXC only if the exclusive definition is required.
Download Practice File
QUARTILE
quartilePractice QUARTILE with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the QUARTILE function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps