Statistical

QUARTILE Formula

QUARTILE returns the quartile value of a data set. The quart argument takes values 0 through 4: 0 for minimum, 1 for 25th percentile (Q1), 2 for median (Q2), 3 for 75th percentile (Q3), and 4 for maximum. Use it to quickly segment data into four equal groups for box plots, performance bands, or summary statistics.

Syntax

QUARTILE(array, quart)
ParameterDescription
array Parameter of the QUARTILE function.
quart Parameter of the QUARTILE function.
Try QUARTILE in Viztab — free, no signup

Examples

First quartile of scores

Formula
=QUARTILE(B2:B200, 1)
Returns the 25th percentile score — 25% of students scored at or below this value.

Interquartile range (IQR)

Formula
=QUARTILE(B2:B200, 3) - QUARTILE(B2:B200, 1)
Returns Q3 minus Q1, which measures the spread of the middle 50% of the data. A key metric for box plots.

Five-number summary

Formula
=QUARTILE(A1:A100, {0,1,2,3,4})
Returns min, Q1, median, Q3, and max as an array — the complete five-number summary for descriptive statistics.

Common Errors

#NUM!

Returned when quart is not 0, 1, 2, 3, or 4, or when the array is empty.

#VALUE!

Occurs if quart is not a number.

Tips

Quick box plot data

Use QUARTILE with quart values 0 through 4 to get all five values needed for a box-and-whisker plot.

Same as PERCENTILE at specific points

QUARTILE(data,1) equals PERCENTILE(data,0.25), QUARTILE(data,2) equals MEDIAN(data), and QUARTILE(data,3) equals PERCENTILE(data,0.75).

Outlier detection with IQR

Calculate IQR = Q3 - Q1, then flag values below Q1 - 1.5*IQR or above Q3 + 1.5*IQR as outliers. This is the standard Tukey fence method.

Try QUARTILE in Viztab

Import your data and use QUARTILE with 370+ other formulas. No signup required.

Open Viztab

Related Formulas