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.
Before you begin

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.

Interquartile rangeIQR=Q3Q1IQR=Q_3-Q_1
Lower fenceQ11.5(IQR)Q_1-1.5(IQR)
Upper fenceQ3+1.5(IQR)Q_3+1.5(IQR)
  • 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.

Find the middle half without losing the convention

  1. 1
    Order the observations

    Quartiles are positions in sorted data, so entry order cannot be used.

  2. 2
    Find the overall median

    The median divides the ordered observations into a lower and upper half.

    Q2=medianQ_2=\text{median}
  3. 3
    Form the two halves

    With an odd count, exclude the overall median from both halves under this guide's convention.

  4. 4
    Find Q1 and Q3

    Q1 is the median of the lower half and Q3 is the median of the upper half.

  5. 5
    Subtract 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.

    IQR=Q3Q1IQR=Q_3-Q_1

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.

1, 2, 4, 5,7, 8, 10, 12, 131,\ 2,\ 4,\ 5,\boxed{7},\ 8,\ 10,\ 12,\ 13
7
Q13
Median7
Q311
IQR8

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.

Build from recognition to verification

Odd number of observations

Exclude the overall median 7 before finding the medians of the two four-value halves.

1, 2, 4, 5, 7, 8, 10, 12, 131,\ 2,\ 4,\ 5,\ 7,\ 8,\ 10,\ 12,\ 13
  1. Split at the median: The lower half is 1, 2, 4, 5 and the upper half is 8, 10, 12, 13.
    Q2=7Q_2=7
  2. Find the two quartiles: Average each half's two middle values.
    Q1=(2+4)/2=3,Q3=(10+12)/2=11Q_1=(2+4)/2=3,\quad Q_3=(10+12)/2=11
  3. Subtract: The middle-half width is 8.
    IQR=113=8IQR=11-3=8

Answer

Q1=3,Q3=11,IQR=8Q_1=3,\quad Q_3=11,\quad IQR=8

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.

2, 4, 5, 7, 9, 12, 15, 182,\ 4,\ 5,\ 7,\ 9,\ 12,\ 15,\ 18
  1. Find the overall median: Average 7 and 9.
    Q2=8Q_2=8
  2. Find Q1 and Q3: Average 4 and 5, then 12 and 15.
    Q1=4.5,Q3=13.5Q_1=4.5,\quad Q_3=13.5
  3. Find IQR: Subtract the lower quartile from the upper quartile.
    IQR=13.54.5=9IQR=13.5-4.5=9

Answer

IQR=9IQR=9

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.

1, 2, 2, 3, 4, 5, 6, 201,\ 2,\ 2,\ 3,\ 4,\ 5,\ 6,\ 20
  1. Find quartiles: The lower-half median is 2 and the upper-half median is 5.5.
    Q1=2,Q3=5.5Q_1=2,\quad Q_3=5.5
  2. Find IQR: The middle-half width is 3.5.
    IQR=5.52=3.5IQR=5.5-2=3.5
  3. Build the upper fence: Values above 10.75 are flagged.
    5.5+1.5(3.5)=10.755.5+1.5(3.5)=10.75

Answer

20>10.75so 20 is a potential outlier20>10.75\quad\text{so 20 is a potential outlier}

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.

5, 5, 5, 5, 5, 55,\ 5,\ 5,\ 5,\ 5,\ 5
  1. Find Q1: The lower half contains only 5s.
    Q1=5Q_1=5
  2. Find Q3: The upper half also contains only 5s.
    Q3=5Q_3=5
  3. Subtract: The quartile box has zero width.
    IQR=55=0IQR=5-5=0

Answer

IQR=0IQR=0

Check: Every observation equals both quartiles, so the middle half has no spread.

Practice the decision before checking the answer

  1. 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.

  2. 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.

  3. 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.

  4. 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.

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.