Category: FUNCTION | Updated: 2026-11-22
How to Use the QUARTILE Function | Find Quartiles (Dividing Data into Four Parts)
How to Use the QUARTILE Function
The QUARTILE function sorts data from smallest to largest and returns the boundary values (quartiles) that divide the dataset into four equal parts. It is used to build box plots for understanding data spread and to analyze outliers.
Syntax
=QUARTILE(data, quartile_number)
- data: The cell range containing the dataset to consider (required).
- quartile_number: An integer from
0to4specifying which quartile value to return (required).0: Minimum value (same asMIN)1: First quartile (lower 25%)2: Second quartile (median; same asMEDIAN)3: Third quartile (upper 25% / lower 75%)4: Maximum value (same asMAX)
Example with a Table
Here is an example of finding all quartiles from the minimum to the maximum for a set of test scores.
| Score | Quartile | Formula | Result | Meaning |
|---|---|---|---|---|
| 40 | 0 | =QUARTILE($A$2:$A$8, B2) |
40 | Minimum |
| 55 | 1 | =QUARTILE($A$2:$A$8, B3) |
62.5 | First quartile (25%) |
| 70 | 2 | =QUARTILE($A$2:$A$8, B4) |
75 | Median (50%) |
| 75 | 3 | =QUARTILE($A$2:$A$8, B5) |
85 | Third quartile (75%) |
| 80 | 4 | =QUARTILE($A$2:$A$8, B6) |
95 | Maximum |
| 90 | ||||
| 95 |
Common Errors and Notes
- #NUM! Error: Occurs if the second argument (
quartile_number) is less than0or greater than4. Decimal values are truncated to integers. - Successor functions: For stricter distinctions,
QUARTILE.INC(identical toQUARTILE) andQUARTILE.EXC(excluding 0 and 4) are also available.
Frequently Asked Questions
Q. What numbers should I specify for the second argument (quartile_number)?
A. Specify an integer from 0 to 4: 0 (minimum), 1 (first quartile: 25%), 2 (median: 50%), 3 (third quartile: 75%), or 4 (maximum).
Q. Can I use the QUARTILE function to create a box plot?
A. Yes, by calculating all values from 0 to 4, you can obtain the complete five-number summary needed to build a box plot.