Learning goals
What you should understand
- Calculate Q1, Q3, and IQR from an ordered data set using a stated convention.
- Interpret IQR as the spread of the middle half rather than the full range.
- Connect quartiles to the box in a box plot and use 1.5 IQR fences to flag potential outliers.
- Explain why quartile results can differ across textbooks and software.
You should be able to order numerical data, find a median for odd and even counts, subtract signed numbers, and read a number line.
The middle-half spread
Q1 marks the center of the lower half and Q3 marks the center of the upper half under the convention used here. The IQR is the length of the interval between them. Outlier fences flag values for investigation; they do not prove that a value is an error.
- Order the numerical data before finding quartiles.
- This guide uses the median-of-halves convention and excludes the overall median from both halves when the count is odd.
- Other accepted quartile algorithms can produce different Q1 and Q3 values, so state the method when exact agreement matters.
Reusable process
Find the middle half without losing the convention
- 1Order the observations
Quartiles are positions in sorted data, so entry order cannot be used.
- 2Find the overall median
The median divides the ordered observations into a lower and upper half.
- 3Form the two halves
With an odd count, exclude the overall median from both halves under this guide's convention.
- 4Find Q1 and Q3
Q1 is the median of the lower half and Q3 is the median of the upper half.
- 5Subtract and, if needed, build fences
Subtract Q1 from Q3. Multiply IQR by 1.5 before extending below Q1 and above Q3 for potential-outlier fences.
Quartile explorer
See which observations form the middle half
Move through the ordered values and compare the lower half, median, upper half, quartile box, and outlier fences.
The selected observation is 7, the overall median.
Check the reasoning
The lower half is 1, 2, 4, 5 and its median is 3. The upper half is 8, 10, 12, 13 and its median is 11. The box therefore spans 3 to 11, its width is 8, and every listed value lies inside the fences from negative 9 to 23. This text remains the complete fallback if the visual does not run.
Worked examples
Build from recognition to verification
Odd number of observations
Exclude the overall median 7 before finding the medians of the two four-value halves.
- Split at the median: The lower half is 1, 2, 4, 5 and the upper half is 8, 10, 12, 13.
- Find the two quartiles: Average each half's two middle values.
- Subtract: The middle-half width is 8.
Answer
Check: The lower and upper halves each contain four values, and the quartile interval from 3 to 11 has width 8.
Even number of observations
Split the eight ordered observations into two groups of four.
- Find the overall median: Average 7 and 9.
- Find Q1 and Q3: Average 4 and 5, then 12 and 15.
- Find IQR: Subtract the lower quartile from the upper quartile.
Answer
Check: The quartile box from 4.5 to 13.5 has width 9 and contains the two central pairs used to define the halves.
Flag a potential outlier
Use 1.5 IQR fences after finding quartiles.
- Find quartiles: The lower-half median is 2 and the upper-half median is 5.5.
- Find IQR: The middle-half width is 3.5.
- Build the upper fence: Values above 10.75 are flagged.
Answer
Check: The lower fence is negative 3.25, so no low value is flagged; 20 is the only observation beyond either fence.
No middle-half spread
When all observations are identical, both quartiles are the shared value.
- Find Q1: The lower half contains only 5s.
- Find Q3: The upper half also contains only 5s.
- Subtract: The quartile box has zero width.
Answer
Check: Every observation equals both quartiles, so the middle half has no spread.
Try it yourself
Practice the decision before checking the answer
Find IQR for 1, 3, 5, 7, 9, 11 using the median-of-halves convention.
Show answer and explanation
Answer: Q_1=3,\ Q_3=9,\ IQR=6
The lower and upper halves each have three values.
For Q1 = 10 and Q3 = 18, find IQR and the two 1.5 IQR fences.
Show answer and explanation
Answer: IQR=8,\quad\text{fences }-2\text{ and }30
One and a half times 8 is 12; extend 12 below Q1 and above Q3.
Does a value beyond an outlier fence have to be deleted?
Show answer and explanation
Answer: No.
A fence flags a value for investigation. Context determines whether it is valid, unusual, or erroneous.
Why must a quartile convention be stated?
Show answer and explanation
Answer: Different accepted algorithms can assign different quartile values to the same finite data set.
Stating the method makes the result reproducible.
Common mistakes
Notice the decision before the algebra
Using the unsorted input order
Taking quartiles from the positions in which values were typed.
Fix: Sort from least to greatest before locating any quartile.
Hiding the quartile convention
Presenting Q1 and Q3 as though every method must return the same values.
Fix: Name the median-of-halves rule or the software algorithm used.
Confusing IQR with range
Subtracting the minimum from the maximum.
Fix: Range uses endpoints; IQR subtracts Q1 from Q3.
Deleting every flagged value
Treating a 1.5 IQR flag as proof of measurement error.
Fix: Investigate collection, context, and influence before deciding how to handle the observation.