Statistics

### Understanding Variables in Statistics: Types & Examples

Learn the different types of variables in statistics, how they are categorized, their main differences, as well as several examples.

#### Sarah Thomas

Subject Matter Expert

Skip to content## If you could change one thing about college, what would it be?

## What Are Quartiles?

### The First Quartile

### The Second Quartile

### The Third Quartile

## How Do Quartiles Work in Statistics?

### Percentiles

### Deciles

### Quintiles

## Why Are Quartiles Important in Statistics?

### Five-Number Summary

### Interquartile Range (IQR)

### Outliers

## How To Calculate Quartiles?

### Calculate Quartiles by Hand Using the Locator Method

#### Step 1 - Count and Arrange Data Points

#### Step 2 - Calculate Q1

#### Step 3 - Calculate Q2 (The Median)

#### Step 4 - Calculate Q3

### Calculate Quartiles by Hand Using the Median Method

#### Step 1 - Find the median of the data (Q2)

#### Step 2 - Find the median of the lower half of the data

#### Step 3 - Find the median of the upper half of the data

### Calculate Quartiles Using Excel or Google Sheets

#### Step 1 - Find Q1

#### Step 2 - Find Q2

#### Step 3 - Find Q3

#### Calculate Quartiles Using R

## How To Interpret Quartiles?

## Quartile Examples

### Example 1

### Example 2

**Explore Outlier's Award-Winning For-Credit Courses**

## Related Articles

### Understanding Variables in Statistics: Types & Examples

#### Sarah Thomas

### What Is Standard Error? Statistics Calculation and Overview

#### Sarah Thomas

### What Is Statistical Analysis?

#### Sarah Thomas

Outlier Articles Home# What Are Quartiles? Statistics 101

## Sarah Thomas

Statistics

03.26.2023 • 5 min read

Subject Matter Expert

Learn what quartiles are and how they work in statistics. Understand how to calculate them and why even learn them.

In This Article

In statistics, quartiles divide your data into four equal groups, each containing 25% (or a quarter) of your data points.

3 quartiles exist:

The first quartile—also called the lower quartile or Q1—marks the 25th percentile of a data set. It divides the bottom quarter of your data from the second quarter.

The second quartile—also called the median or Q2—marks the 50th percentile of the data set. It divides the second quarter of your data from the third quarter. It also divides your data into two equal groups: the bottom 50 percent and the top 50 percent.

The third quartile—also called the upper quartile or Q3—marks the 75th percentile of the data set. It divides the third quarter of your data points from the top quarter.

Quartiles are a type of quantile—a set of values that divide data into equal groups, each containing approximately the same number of observations.

Whenever you use quantiles, you arrange your data from smallest to largest, and the quantiles act as markers or cutoff points between each group.

Other commonly used quantiles include:

Percentiles divide data into 100 groups, each containing 1% of your observations.

Deciles divide data into 10 groups, each containing 10% of your observations.

Quintiles divide data into 5 groups, each containing 20% of your observations.

Quartiles are useful because they provide a quick and easy way to summarize the spread and skewness of your data.

Once you know what your quartiles are, you can use them to contextualize other data points. For example, say you have data where Q1 is equal to 300, Q2 is equal to 500, and Q3 is 900. You can now take any data point, say 450, and know that it’s located between the 25th percentile and the median.

You can also use quartiles to construct the following related measures of location:

The five-number summary is a list of the three quartiles and the minimum and maximum of your data.

The interquartile range is the difference between the upper and lower quartiles (Q3-Q1). The IQR measures the dispersion of the middle 50 percent of your data.

You can also use quartiles and the interquartile range to identify outliers in your data. The outlier formula describes any value greater than Q3 + (1.5 x IQR) and any value less than Q1 - (1.5 x IQR) as an outlier.

To calculate quartiles by hand, follow these steps.

Count the number of data points and arrange them from smallest to largest. Arrange the data in ascending order and find the total $(n)$ number of values in your data.

To find Q1, multiply n by 25/100 (or ¼). This will give you a locator value, $L$.

If $L$ is a whole number, take the average of the $L^{th}$ value of the data set and the $(L+1)^{th}$ value. This average will be the first quartile.

If $L$ is not a whole number, round $L$ up to the nearest whole number and find the corresponding value in the data set. This will be the first quartile.

To find Q2, use the same method used to find Q1, except this time, multiply $n$ by 50/100 (or ½) to get the locator value, $L$.

To find Q3, use the same method used to find Q1, except this time, multiply $n$ by 75/100 (¾) to get the locator value, $L$.

Another way of calculating quartiles by hand is by first identifying the median of the data. Here are the step-by-step instructions for calculating quartiles using the median method.

To find the median (or Q2), arrange your data in ascending order. If the number of data points you have is odd, the median will be the middle value of your data. If you have an even number of data points, the median will be the average of the two middle numbers in your data.

The median divides your set of data into two equal parts: a lower half and an upper half. You can calculate the first quartile (Q1), by finding the median of the lower half of the data.

You can calculate the upper quartile (Q3) by finding the median of the upper half of your data.

To calculate quartiles in Excel or Google Sheets, use the QUARTILE() function. Because we can use different methods for calculating quartiles, the results you get from calculating quartiles in Excel or Google Sheets may be slightly different than the results you get when calculating quartiles by hand.

Suppose your data is in cells A1 through A20. To find Q1, type: =QUARTILE(A1:A20, 1)

To find Q2, use the same function, only this time, type a 2 before the closing parenthesis. Type =QUARTILE(A1:A20,2)

To find Q3, use the same function, but type a 3 before the closing parenthesis. Type =QUARTILE(A1:A20,3)

To calculate quartiles in R, use the QUANTILE() function.

Suppose you have your data stored in a variable called $x$. You can find the three quartiles by typing: QUANTILE(x, probs = (0.25, 0.5, 0.75)).

You can also use the quantile function to find percentiles, deciles, and quintiles.

Quartiles are listed as a set of numbers or shown visually using a box plot or a box and whisker plot.

A box plot is a graph in the shape of a rectangle. The two shorter sides of the rectangle mark the lower and upper quartiles, and a line in the middle of the rectangle marks the median (Q2).

A box plot with two lines stretching out from either end of the rectangle is called a box and whisker plot. In addition to the three quartiles, a box and whisker plot marks the minimum and the maximum of your data.

Whether you are looking at a list of quartiles, a boxplot, or a box and whisker plot, always remember what each quartile represents.

Q1 marks the 25th percentile of your data and divides the bottom quarter of your data from the second quarter.

Q2 marks the 50th percentile (the median) of your data and divides the second quarter of your data from the third quarter.

Q3 marks the 75th percentile of your data and divides the third quarter of your data points from the top quarter.

Subtracting Q3 from Q1 will give you the interquartile range (IQR). The IQR tells you how dispersed the middle 50 percent of your data is.

Here are two examples of quartiles calculated for different data sets. Notice that in each of these examples, we have already arranged the data in ascending order.

$2, 4, 6, 8, 10, 12, 14, 16, 18$

$Q1 = 6^*$

$Q2 = 10$

$Q3 = 14^*$

*Answer will depend on what method you use

$10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65$

$Q1 = 22.5^*$

$Q2 = 37.5$

$Q3 = 52.5^*$

*Answer will depend on what method you use

Outlier (from the co-founder of MasterClass) has brought together some of the world's best instructors, game designers, and filmmakers to create the future of online college.

Check out these related courses:

Statistics

Learn the different types of variables in statistics, how they are categorized, their main differences, as well as several examples.

Subject Matter Expert

Statistics

Learn what is standard error in statistics. This overview explains the definition, the process, the difference with standard deviation, and includes examples.

Subject Matter Expert

Statistics

Learn what statistical analysis is and why it’s important. We’ll list the most used types and examples and go over how to do statistical analysis.

Subject Matter Expert