What Is a Quartile? How It Works and Example

Quartile

Investopedia / Matthew Collins

What Is a Quartile?

A quartile is a statistical term that describes a division of observations into four defined intervals based on the values of the data and how they compare to the entire set of observations. Quartiles are organized into lower quartiles, median quartiles, and upper quartiles.

When the data points are arranged in increasing order, data are divided into four sections of 25% of the data each.

Key Takeaways

  • Quartiles organize data into three points—a lower quartile, median, and upper quartile—to form four dataset groups.
  • Along with the minimum and maximum values of the data set, the quartiles divide a set of observations into four sections, each representing 25% of the observations.
  • Quartiles are used to calculate the interquartile range, which is a measure of variability around the median.

Understanding Quartiles

To understand the quartile, it is important to understand the median as a measure of central tendency. The median in statistics is the middle value of a set of numbers. It is the point at which exactly half of the data lies below and above the central value.

The median is a robust estimator of location but says nothing about how the data on either side of its value is spread or dispersed. That's where the quartile steps in. The quartile measures the spread of values above and below the median by dividing the distribution into four groups.

They are grouped into four sections of 25% of the data, with the second and third groups representing the interquartile range.

quartile chart with interquartile range

Just like the median divides the data into half so that 50% of the measurement lies below the median and 50% lies above it, the quartile breaks down the data into quarters so that 25% of the measurements are less than the lower quartile, 50% are less than the median, and 75% are less than the upper quartile.

There are three quartile values—a lower quartile, median, and upper quartile—which divide the data set into four ranges, each containing 25% of the data points:

  • First quartile: The set of data points between the minimum value and the first quartile.
  • Second quartile: The set of data points between the lower quartile and the median.
  • Third quartile: The set of data between the median and the upper quartile.
  • Fourth quartile: The set of data points between the upper quartile and the maximum value of the data set.

Calculating Quartiles In a Spreadsheet

Suppose you have a distribution of math scores in a class of 19 students. You'd want to enter them into a spreadsheet in ascending order in a row (you can also use a column):

1 Student A B C D E F G H I J K L M N O P Q R
2 Score 59 60 65 65 68 69 70 72 75 75 76 77 81 82 84 87 90 95

Use the MEDIAN function to get the median value:

  • =MEDIAN (A2:R2)

Then, use the quartile function to return the values for each quartile, where the second variable in the function is the quartile you're calculating for:

  • =QUARTILE (A2:R2, 1)
  • =QUARTILE (A2:R2, 2)
  • =QUARTILE (A2:R2, 3)

In this example, you should end up with the values for each quartile. There is no need to calculate the fourth quartile because it is the last value in your dataset:

  • Median = 75
  • Q1 = 68.25
  • Q2 = 75
  • Q3 = 81.75

You can see that the first quartile contains scores between 59 and 68.5, and the second quartile scores between 68.5 and 75. The third quartile contains scores between 75 and 81.75. It can help to visualize it:

Quartile chart corrected

Calculating Quartiles Manually

Quartile manual calculation requires more effort as there are formulas involved. Using the same values as in the spreadsheet example:

  • 59, 60, 65, 65, 68, 69, 70, 72, 75, 75, 76, 77, 81, 82, 84, 87, 90, 95, 98

Using the following formulas, you calculate each quartile:

  • First Quartile (Q1) = (n + 1) x 1/4
  • Second Quartile (Q2), or the median = (n + 1) x 2/4
  • Third Quartile (Q3) = (n + 1) x 3/4

Where n is the number of integers in your dataset, and the result is the position of the number in the sequence dataset. So:

  • First Quartile (Q1) = 20 x 1/4 = 5
  • Second Quartile (Q2) = 20 x 2/4 = 10
  • Third Quartile (Q3) = 20 x 3/4 = 15

Here, we have the Q1 (fifth) value of 68, the Q2 (tenth and the median) value of 75, and the Q3 (fifteenth) value of 84. The results differ slightly from the spreadsheet results because the spreadsheet calculates them differently. Your graph would then look like this:

Example Quartile

Quartiles are also used to calculate the interquartile range, which is a measure of variability around the median. The interquartile range is simply the range between the first and third quartiles.

In this example, you'd have an interquartile range of 68 to 84 (the fifth value to the tenth value in the dataset).

Special Considerations

If the data point for Q1 is farther away from the median than Q3 is from the median, then you can say there is a greater dispersion among the smaller values of the dataset than among the larger values. The same logic applies if Q3 is farther away from Q2 than Q1 is from the median. This is called quartile skewness.

Another aspect to consider is if there is an even number of data points. In that case, you'd use the average of the middle two numbers to get the median. In the example above, if you had 20 students instead of 19, the median of their scores would be the arithmetic average of the tenth and eleventh numbers.

How Do You Find the Lower Quartile of a Data Set?

The best way is to use a spreadsheet and the QUARTILE function. For example, the function "=QUARTILE(A1:A53,1)" returns the first (lower) quartile of your dataset.

How Do You Find the Upper Quartile of a Data Set?

A spreadsheet and the QUARTILE function is the quickest way to find the upper quartile. For example, the function "=QUARTILE(A1:A53,3)" returns the third (upper) quartile of your dataset.

What Is the Interquartile Range of a Data Set?

The interquartile range is the middle 50% of measurements in a data set—in other words, the range of data between the upper quartile and the lower quartile. This is more statistically meaningful than using the full range of data because it omits possible outliers.

The Bottom Line

Quartiles are values that split lists of datasets into quarters, resulting in lower, middle, and upper quartiles. The purpose of quartiles is to give shape to a distribution, primarily indicating whether or not a distribution is skewed, which can be used to determine the consistency of a fund's performance.

Open a New Bank Account
×
The offers that appear in this table are from partnerships from which Investopedia receives compensation. This compensation may impact how and where listings appear. Investopedia does not include all offers available in the marketplace.
Open a New Bank Account
×
The offers that appear in this table are from partnerships from which Investopedia receives compensation. This compensation may impact how and where listings appear. Investopedia does not include all offers available in the marketplace.