Quick Answer

QUARTILE Function

Returns the specified quartile (0=min, 1, 2=median, 3, 4=max) of a dataset.

✓ Excel✓ Google SheetsExcel All versions

Syntax

QUARTILE
(array, quart)

Parameters

ParameterDescriptionRequired
arrayThe range or array of numeric values.Required
quartWhich 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)
Result4.5

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 values

Uses the inclusive method equivalent to PERCENTILE.INC with k = 0.25.

=QUARTILE({1,2,3,4,5,6,7,8}, 1)
Result: 2.75
Inclusive rank = 1 + 0.25*(8-1) = 2.75; interpolate 75% from 2 to 3: 2 + 0.75*(3-2) = 2.75.

Example 2: Fourth quartile returns the maximum

Upper edge of the data

quart = 4 gives the largest value.

=QUARTILE({1,2,3,4,5,6,7,8}, 4)
Result: 8
quart = 4 corresponds to the maximum, which is 8.

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.

1
Select the result cell
Click where you want the quartile.
2
Enter the formula
Type =QUARTILE(range, quart) with quart from 0 to 4.
3
Press Enter
The quartile value is returned.

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

Practice 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.

Works in Google SheetsCompatible with ExcelIncludes exercises

File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps

Frequently Asked Questions

Is QUARTILE the same as QUARTILE.INC?
Yes. QUARTILE is the legacy name for the inclusive method; QUARTILE.INC is the Excel 2010+ equivalent.
What does quart = 2 return?
It returns the second quartile, which is the median of the dataset.
Why do QUARTILE and QUARTILE.EXC give different answers?
QUARTILE (inclusive) uses rank 1 + k*(n-1) and allows the min/max; QUARTILE.EXC uses rank k*(n+1) and excludes the endpoints.