
Quartiles are among the most practical tools in descriptive statistics, giving you a clear picture of how data is distributed across a range. Whether you are analyzing test scores, income levels, or product sales figures, knowing where your data clusters — and where it spreads — is essential for drawing meaningful conclusions.
Q1 (the first quartile) and Q3 (the third quartile) are two of the most frequently used quartile measures. Together, they define the interquartile range, a reliable indicator of spread that resists distortion from extreme values. Understanding how to calculate them accurately is a foundational skill for students, researchers, and analysts alike.
Quartiles divide an ordered dataset into four equal parts, each containing 25% of the data. There are three quartile points in total — Q1, Q2, and Q3 — and each marks a boundary between those parts.
Q1, known as the first quartile or the lower quartile, is the value that separates the bottom 25% of a dataset from the remaining 75%. In practical terms, 25% of all data points fall at or below Q1.
Q3, known as the third quartile or the upper quartile, is the value that separates the bottom 75% of a dataset from the top 25%. In other words, 75% of all data points fall at or below Q3.
Together, Q1 and Q3 form the boundaries of the interquartile range (IQR), calculated simply as Q3 − Q1. The IQR captures the middle 50% of the data and is widely used as a measure of statistical spread, particularly because it is not affected by outliers or extreme values the way the full range is.
It is worth noting that Q2 — the second quartile — is the median of the dataset, marking the exact midpoint. While Q2 is equally important, this article focuses specifically on finding Q1 and Q3.
Q1 and Q3 are more than reference points on a number line — they are practical tools that reveal the shape, spread, and reliability of your data.
Measuring spread without distortion The most immediate use of Q1 and Q3 is calculating the interquartile range (IQR). Unlike the full range, which stretches from the minimum to the maximum value, the IQR focuses on the middle 50% of the data. This makes it a far more stable measure of spread when a dataset contains outliers or heavily skewed values.
Identifying outliers Q1 and Q3 are central to one of the most widely used methods for detecting outliers. By calculating the IQR and applying the 1.5 × IQR rule — flagging any value below Q1 − 1.5(IQR) or above Q3 + 1.5(IQR) — analysts can objectively identify data points that fall unusually far from the rest of the distribution.
Building box plots A box plot, one of the most common data visualizations in statistics, is built directly from Q1, Q2, and Q3. The left and right edges of the box represent Q1 and Q3 respectively, while the line inside the box marks the median. Box plots make it easy to compare distributions across multiple groups at a glance.
Supporting real-world decisions Quartiles appear across a wide range of professional fields. In education, they are used to rank student performance. In finance, they help compare fund returns. In healthcare, they assist in evaluating patient data across populations. Whenever a clear, distortion-resistant summary of a dataset is needed, Q1 and Q3 are reliable tools for the job.
Step 1: Arrange the data in ascending order Before any calculation can begin, the dataset must be sorted from the smallest value to the largest. Quartiles are positional measures, meaning their values depend entirely on the order of the data. Skipping this step will produce incorrect results.
Step 2: Find the median (Q2) Locate the median of the full dataset. If the dataset has an odd number of values, the median is the middle value. If it has an even number of values, the median is the average of the two middle values. The median divides the dataset into a lower half and an upper half, and it is this division that makes finding Q1 and Q3 possible.
Step 3: Identify the lower half of the dataset Take all values that fall below the median. If the dataset has an odd number of values, exclude the median itself from both halves. If it has an even number of values, split the dataset cleanly down the middle.
Step 4: Find Q1 Q1 is the median of the lower half identified in Step 3. Apply the same method used in Step 2 — if the lower half has an odd number of values, Q1 is the middle value; if it has an even number of values, Q1 is the average of the two middle values.
Step 5: Identify the upper half of the dataset Take all values that fall above the median. As in Step 3, exclude the median if the dataset has an odd number of values.
Step 6: Find Q3 Q3 is the median of the upper half identified in Step 5. Again, apply the same median method. The result is your third quartile.
Step 7: Verify your results As a final check, confirm that Q1 < Q2 < Q3. This ordering must always hold true. If any value falls out of sequence, revisit your calculations starting from Step 1.
While the step-by-step method works well for small datasets, the position method provides a more systematic approach — particularly useful when working with larger datasets where locating the middle value by eye becomes impractical.
The Formulas
The position of Q1 and Q3 within an ordered dataset is calculated as follows:
Position of Q1 = ¼ (n + 1)
Position of Q3 = ¾ (n + 1)
Where n is the total number of values in the dataset.
These formulas do not return the quartile values directly — they return the position, or rank, of the quartile within the ordered dataset. You then look up the value sitting at that position.
When the Position Is a Whole Number
If the formula returns a whole number, the quartile value is simply the data point sitting at that position in the ordered dataset. For example, if the position of Q1 is 3, Q1 is the third value in the ordered list.
When the Position Is a Decimal
If the formula returns a decimal — which is common — interpolation is required. A result of 2.5, for instance, means Q1 sits halfway between the second and third values. To find the exact value, take the average of those two data points:
Quartile Value = Lower Value + Decimal Portion × (Upper Value − Lower Value)
For a position of 2.75, Q1 would be calculated as:
Q1 = Value at position 2 + 0.75 × (Value at position 3 − Value at position 2)
An Important Note on Methods
It is worth being aware that different textbooks, courses, and software packages use slightly different formulas for quartile positions. Some use ¼ (n + 1) and ¾ (n + 1), as shown above. Others use ¼ (n − 1) + 1 or similar variations. These differences can produce slightly different results on the same dataset, which is normal. What matters most is applying one method consistently throughout a given analysis.
This example walks through finding Q1 and Q3 for a dataset with an odd number of values, using the step-by-step method.
The Dataset
A teacher records the following quiz scores for 9 students:
7, 15, 3, 22, 18, 9, 14, 6, 25
Step 1: Arrange the data in ascending order
3, 6, 7, 9, 14, 15, 18, 22, 25
There are n = 9 values in the dataset.
Step 2: Find the median (Q2)
With 9 values, the median is the middle value — the 5th value in the ordered list.
3, 6, 7, 9, 14, 15, 18, 22, 25
Q2 = 14
Step 3: Identify the lower half
The lower half consists of all values below the median. Since the dataset has an odd number of values, the median is excluded.
Lower half: 3, 6, 7, 9
Step 4: Find Q1
Q1 is the median of the lower half. With 4 values, the median is the average of the two middle values — the 2nd and 3rd values.
3, 6, 7, 9
Q1 = (6 + 7) ÷ 2 = 6.5
Step 5: Identify the upper half
The upper half consists of all values above the median, with the median again excluded.
Upper half: 15, 18, 22, 25
Step 6: Find Q3
Q3 is the median of the upper half. With 4 values, the median is the average of the two middle values — the 2nd and 3rd values.
15, 18, 22, 25
Q3 = (18 + 22) ÷ 2 = 20
Step 7: Verify the results
Q1 = 6.5 → Q2 = 14 → Q3 = 20 ✓
The values increase in order, confirming the results are correct.
Summary
| Measure | Value |
|---|---|
| Q1 (Lower Quartile) | 6.5 |
| Q2 (Median) | 14 |
| Q3 (Upper Quartile) | 20 |
| IQR (Q3 − Q1) | 13.5 |
The interquartile range of 13.5 tells us that the middle 50% of quiz scores span a range of 13.5 points, from 6.5 to 20.
Example 2: Even Number of Data Points
This example walks through finding Q1 and Q3 for a dataset with an even number of values, using the step-by-step method.
The Dataset
A small business records the following daily sales figures (in dollars) over 10 days:
120, 45, 210, 88, 305, 172, 60, 135, 250, 95
Step 1: Arrange the data in ascending order
45, 60, 88, 95, 120, 135, 172, 210, 250, 305
There are n = 10 values in the dataset.
Step 2: Find the median (Q2)
With 10 values, the median is the average of the 5th and 6th values.
45, 60, 88, 95, 120, 135, 172, 210, 250, 305
Q2 = (120 + 135) ÷ 2 = 127.5
Step 3: Identify the lower half
With an even number of values, the dataset splits cleanly into two equal halves. The lower half is the first 5 values.
Lower half: 45, 60, 88, 95, 120
Step 4: Find Q1
Q1 is the median of the lower half. With 5 values, the median is the middle value — the 3rd value.
45, 60, 88, 95, 120
Q1 = 88
Step 5: Identify the upper half
The upper half is the remaining 5 values.
Upper half: 135, 172, 210, 250, 305
Step 6: Find Q3
Q3 is the median of the upper half. With 5 values, the median is the middle value — the 3rd value.
135, 172, 210, 250, 305
Q3 = 210
Step 7: Verify the results
Q1 = 88 → Q2 = 127.5 → Q3 = 210 ✓
The values increase in order, confirming the results are correct.
Summary
| Measure | Value |
|---|---|
| Q1 (Lower Quartile) | 88 |
| Q2 (Median) | 127.5 |
| Q3 (Upper Quartile) | 210 |
| IQR (Q3 − Q1) | 122 |
The interquartile range of $122 tells us that the middle 50% of daily sales figures fall between $88 and $210 — a useful benchmark for understanding what a typical trading day looks like for this business, free from the distorting effect of the slowest and busiest days.
Working through quartiles by hand builds a solid understanding of the underlying process, but for speed and convenience — especially with larger datasets — a calculator is a practical alternative. Most modern scientific and graphing calculators include built-in statistical functions that return Q1 and Q3 directly.
Using a Graphing Calculator (TI-83/TI-84)
The TI-83 and TI-84 are among the most widely used calculators in statistics courses and return quartile values as part of their one-variable statistics summary.
Using a Casio Scientific Calculator (fx-series)
Many Casio fx-series calculators also support quartile calculations through their statistics mode.
Note: The exact menu layout varies by Casio model. Consult your calculator’s manual if the steps above differ from what you see on screen.
Using an Online Calculator
For quick calculations without a physical device, an online quartile calculator is the fastest option. Simply enter your dataset, and Q1, Q2, Q3, and the IQR are returned instantly.
A reliable option is the CalculatorSoup Quartile Calculator, which supports multiple quartile calculation methods and clearly labels all output values.
A Note on Calculator Methods
As mentioned in the Formula section, different calculators use different methods for computing quartiles, and results can vary slightly depending on the tool. The TI-84, for example, uses a specific interpolation method that may not match the step-by-step approach covered in this article for every dataset. When accuracy and consistency matter — such as in an exam setting — confirm which method your course or textbook expects, and apply it accordingly.
Excel offers a straightforward way to calculate Q1 and Q3 using built-in functions, making it a reliable tool for anyone working with data in a spreadsheet environment.
The QUARTILE Functions
Excel provides two quartile functions: QUARTILE.INC and QUARTILE.EXC. For most purposes, QUARTILE.INC is the standard choice and the one used in the examples below.
The syntax is:
=QUARTILE.INC(array, quart)
Where:
Step-by-Step Instructions
=QUARTILE.INC(A1:A10, 1)
=QUARTILE.INC(A1:A10, 3)
Excel will return the Q1 and Q3 values instantly.
Returning All Quartiles at Once
The same function can return any quartile by changing the second argument:
| Formula | Returns |
|---|---|
| =QUARTILE.INC(A1:A10, 0) | Minimum value |
| =QUARTILE.INC(A1:A10, 1) | Q1 |
| =QUARTILE.INC(A1:A10, 2) | Median (Q2) |
| =QUARTILE.INC(A1:A10, 3) | Q3 |
| =QUARTILE.INC(A1:A10, 4) | Maximum value |
QUARTILE.INC vs QUARTILE.EXC
The difference between the two functions lies in whether the endpoints of the dataset are included in the quartile calculation.
For most student and professional use cases, QUARTILE.INC is the appropriate choice.
