**Quartiles** are values that split up a dataset into four equal parts.

To find the first and third quartile for a dataset with an **even** number of values, use the following steps:

- Identify the median value (the average of the two middle values)
- Split dataset in half at the median
- Q
_{1}is the median value in the lower half of the dataset (not including median) - Q
_{3}is the median value in the upper half of the dataset (not including median)

To find the first and third quartile for a dataset with an **odd** number of values, use the following steps:

- Identify the median value (the middle value)
- Split dataset in half at the median
- Q
_{1}is the median value in the lower half of the dataset (not including median) - Q
_{3}is the median value in the upper half of the dataset (not including median)

The following examples show how to calculate quartiles for both types of datasets.

**Note**: When calculating quartiles, some formulas do include the median value. As noted by Wikipedia, there is actually no universal agreement on how to calculate quartiles for discrete distributions. The formulas shared here are used by TI-84 calculators, which is why we have chosen to use them.

**Example 1: Calculate Quartiles for Even Length Dataset**

Suppose we have the following dataset with ten values:

Data: 3, 3, 6, 8, 10, 14, 16, 16, 19, 24

The median value is the average of the middle two values, which is (10 + 14) / 2 = 12.

We will not include this median value when calculating the quartiles.

The first quartile is the median of the lower half of values, which turns out to be **6**:

Q_{1} = 3, 3, **6**, 8, 10

The third quartile is the median of the upper half of values, which turns out to be **16**:

Q_{3} = 14, 16, **16**, 19, 24

Thus, the first and third quartiles for this dataset are 6 and 16, respectively.

**Example 2: Calculate Quartiles for Odd Length Dataset**

Suppose we have the following dataset with nine values:

Data: 3, 3, 6, 8, 10, 14, 16, 16, 19

The median value is the value located directly in the middle: 10.

We will not include this median value when calculating the quartiles.

The first quartile is the median of the lower half of values. Since there are two values in the middle, we will take the average which turns out to be (3 + 6) / 2 = **4.5**:

Q_{1} = 3, **3**, **6**, 8

The third quartile is the median of the upper half of values. Since there are two values in the middle, we will take the average which turns out to be (16 + 16) / 2 = **16**:

Q_{3} = 14, **16**, **16**, 19

Thus, the first and third quartiles for this dataset are 4.5 and 16, respectively.

**Additional Resources**

The following tutorials explain how to find the quartiles of a dataset using different statistical software:

How to Calculate Quartiles in Excel

How to Calculate Quartiles in R

How to Calculate Quartiles in SAS