Box Plot: Median, Quartiles, and Outliers

April 12, 2026

Problem

Create a box-and-whisker plot from data. Show median, Q1, Q3, IQR, whiskers, and outliers.

Explanation

What is a box plot?

A box plot (box-and-whisker plot) displays the five-number summary of a dataset at a glance: minimum, Q1, median, Q3, maximum. It shows the center, spread, and skewness of data.

How to construct a box plot — step by step

Step 1 — Sort the data. Example: {2,3,4,5,5,6,7,8,100}\{2, 3, 4, 5, 5, 6, 7, 8, 100\}.

Step 2 — Find the median (Q2). Middle value: 55.

Step 3 — Find Q1 (median of lower half). Lower half: {2,3,4,5}\{2, 3, 4, 5\}. Q1 =(3+4)/2=3.5= (3+4)/2 = 3.5.

Step 4 — Find Q3 (median of upper half). Upper half: {6,7,8,100}\{6, 7, 8, 100\}. Q3 =(7+8)/2=7.5= (7+8)/2 = 7.5.

Step 5 — Compute the IQR. IQR=Q3Q1=7.53.5=4\text{IQR} = Q3 - Q1 = 7.5 - 3.5 = 4.

Step 6 — Find the fences (outlier boundaries): Lower fence =Q11.5×IQR=3.56=2.5= Q1 - 1.5 \times \text{IQR} = 3.5 - 6 = -2.5. Upper fence =Q3+1.5×IQR=7.5+6=13.5= Q3 + 1.5 \times \text{IQR} = 7.5 + 6 = 13.5.

Step 7 — Identify outliers. Any value below 2.5-2.5 or above 13.513.5 is an outlier. Here: 100100 is an outlier!

Step 8 — Draw the box from Q1 to Q3, with a line at the median. Whiskers extend to the most extreme non-outlier values (2 and 8). Outliers are plotted as individual dots (100).

What box plots reveal

  • Skewness: If the median line is closer to Q1 → right-skewed. Closer to Q3 → left-skewed.
  • Spread: A wide box (large IQR) means more variability.
  • Outliers: Dots beyond the whiskers flag unusual values.

Try it in the visualization

Toggle the outlier on/off. Watch how the box, whiskers, and median change. The data points animate into sorted order, then the box forms around the quartiles.

Interactive Visualization

Parameters

Default {2,3,4,5,5,6,7,8,100}
100.00
Horizontal
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Box Plot: Median, Quartiles, and Outliers | MathSpin