Quartiles are numbers that divide a dataset into four equal parts (quarters). The top (third) quartile contains the 25% largest numbers in the set (75th percentile). The upper quartile is calculated by determining the median of the upper half of the dataset (this half includes the largest numbers). The upper quartile can be calculated manually or in a spreadsheet editor such as MS Excel.

## Steps

### Part 1 of 3: Preparing the Data Group

#### Step 1. Order the numbers in the dataset in ascending order

That is, write them down, starting with the smallest number and ending with the largest. Remember to write down all the numbers, even if they are repeated.

### For example, given a dataset [3, 4, 5, 11, 3, 12, 21, 10, 8, 7]. Write down the numbers as follows: [3, 3, 4, 5, 7, 8, 10, 11, 12, 21]

#### Step 2. Determine the number of numbers in the dataset

To do this, simply count the numbers that are included in the set. Don't forget to count the duplicate numbers.

### For example, dataset [3, 3, 4, 5, 7, 8, 10, 11, 12, 21] consists of 10 numbers

#### Step 3. Write down the formula for calculating the upper quartile

The formula is: Q3 = 34 (n + 1) { displaystyle Q_ {3} = { frac {3} {4}} (n + 1)}

where Q3 { displaystyle Q_ {3}}

<figure class =" image" />

- upper quartile, n { displaystyle n}

<figure class =" image" />

is the number of numbers in the dataset.

### Part 2 of 3: Calculating the upper quartile

<strong> Step 1. Insert the value into the formula

</strong> { displaystyle n} </strong>

<figure class =" image" />

. </strong>

Recall that n { displaystyle n}

<figure class =" image" />

is the number of numbers in the dataset.

<ul>

<li> In our example, the dataset contains 10 numbers, so the formula looks like this: Q3 = 34 (10 + 1) { displaystyle Q_ {3} = { frac {3} {4}} (10 + 1)} < / li>

<li>

<figure class =" image" />

. </li>

</ul>

#### Step 2. Solve the expression in parentheses.

According to the correct order of mathematical operations, calculations begin with an expression in parentheses. In this case, add 1 to the number of numbers in the dataset.

<ul>

<li> For example: <br /> Q3 = 34 (10 + 1) { displaystyle Q_ {3} = { frac {3} {4}} (10 + 1)}

<figure class =" image" />

<br /> Q3 = 34 (11) { displaystyle Q_ {3} = { frac {3} {4}} (11)}

<figure class =" image" />

</li>

</ul>

#### Step 3. Multiply this amount by 34 { displaystyle { frac {3} {4}}}

<figure class =" image" />

. </strong>

The sum can also be multiplied by 0.75 { displaystyle 0.75}

<figure class =" image" />

. You will find the position of a number in the dataset that is three quarters (75%) from the start of the dataset, that is, the position where the dataset splits into an upper quartile and a lower quartile. But you won't find the top quartile itself.

<ul>

<li> For example: <br /> Q3 = 34 (11) { displaystyle Q_ {3} = { frac {3} {4}} (11)}

<figure class =" image" />

<br /> Q3 = 814 { displaystyle Q_ {3} = 8 { frac {1} {4}}}

<figure class =" image" />

<br /> Thus, the upper quartile is determined by the number located at position 814 { displaystyle 8 { frac {1} {4}}}

<figure class =" image" />

in the dataset. </li>

</ul>

#### Step 4. Find the number that defines the upper quartile.

If the number of the position found is an integer value, just search for the corresponding number in the dataset.

### For example, if you calculate that the position number is 12, the number that defines the upper quartile is at the 12th position in the dataset.

#### Step 5. Calculate the upper quartile (if needed).

In most cases, the position number is equal to an ordinary fraction or a decimal fraction. In this case, find the numbers that are in the data set at the preceding and following positions, and then calculate the arithmetic mean of these numbers (that is, divide the sum of the numbers by 2). This is the top quartile of the dataset.

<ul>

<li> For example, if you calculate that the upper quartile is at position 814 { displaystyle 8 { frac {1} {4}}} </li>

<li>

<figure class =" image" />

, then the desired number is located between the numbers at the 8th and 9th positions. The dataset [3, 3, 4, 5, 7, 8, 10, 11, 12, 21] contains numbers 11 and 12 at the 8th and 9th positions. Calculate the arithmetic mean of these numbers: <br /> 11 +122 { displaystyle { frac {11 + 12} {2}}}

<figure class =" image" />

<br /> = 232 { displaystyle = { frac {23} {2}}}

<figure class =" image" />

<br /> = 11.5 { displaystyle = 11.5}

<figure class =" image" />

<br /> So the top quartile of the dataset is 11.5 </li>

</ul>

### Part 3 of 3: Using Excel

#### Step 1. Enter the data into an Excel spreadsheet.

Enter each number in a separate cell. Don't forget to enter duplicate numbers. Data can be entered in any column or row of the table.

### For example, enter dataset [3, 3, 4, 5, 7, 8, 10, 11, 12, 21] in cells A1 through A10.

#### Step 2. Enter the quartile functions in a blank cell.

The quartile function is: = (QUARTILE (AX: AY; Q)), where AX and AY are the starting and ending cells with data, Q is the quartile. Start typing this function and then double-click on it in the menu that opens to paste it into the cell. <strong> Step 3. Select cells with data. </strong>

Click on the first cell and then click on the last cell to specify the data range. <strong> Step 4. Replace Q with 3 to indicate the upper quartile. </strong>

After the data range, enter a semicolon and two closing parentheses at the end of the function.

### For example, if you want to find the upper quartile of the data in cells A1 through A10, the function would look like this: = (QUARTILE (A1: A10; 3)).

#### Step 5. Display the upper quartile.

To do this, press Enter in the function cell. The quartile is displayed, not its position in the dataset.

<ul>

<li> Note that Office 2010 and later include two different functions for calculating quartile: QUARTILE. EXC and QUARTILE. INC. In earlier versions of Excel, you can only use the QUARTILE function. </li>

<li> The two above Excel quartile functions use different formulas to calculate the upper quartile. QUARTILE / QUARTILE. INC uses the formula Q3 = 34 (n − 1) { displaystyle Q_ {3} = { frac {3} {4}} (n-1)} </li>

<li>

<figure class =" image" />

and QUARTILE. EXC uses the formula Q3 = 34 (n + 1) { displaystyle Q_ {3} = { frac {3} {4}} (n + 1)}

<figure class =" image" />

. обе формулы применяются для вычисления квартилей, но первая все чаще встраивается в статистическое программное обеспечение.