Coderhouse goes global

🌍

Read more

What Is a Box Plot? How Data Analysts Read Box and Whisker Plots

AI Engineering

Build and ship real applications with LLMs, agents and automation.

8 weeks · Live online · View course →

Data Analytics

Go from zero to job-ready analyst with SQL, Python and BI tools.

10 weeks · Live online · View course →

Dan Patiño

AI Strategy & Innovation at Coderhouse

Data

What Is a Box Plot? How Data Analysts Read Box and Whisker Plots

What Is a Box Plot? How Data Analysts Read Box and Whisker Plots

A box plot, also called a box and whisker plot, is a chart that summarizes a numeric variable with five values: the minimum, the first quartile (Q1), the median, the third quartile (Q3) and the maximum. The box shows where the middle half of the data sits, the line inside it marks the median and the whiskers stretch toward the extremes. Points drawn beyond the whiskers are potential outliers.

Data analysts use box plots because they compress a whole distribution into a small shape you can read in seconds, and because several boxes side by side make it easy to compare groups: delivery times by warehouse, order values by channel or response times before and after a release.

The parts of a box plot

  • Median: the line inside the box. Half the values are below it and half above.

  • Box (Q1 to Q3): the middle 50% of the data. Its height or width is the interquartile range (IQR = Q3 − Q1).

  • Whiskers: lines that extend from the box toward the lowest and highest values that are not flagged as outliers.

  • Outliers: individual points beyond the whiskers.

  • Mean marker (optional): some tools add a dot or an x for the average.

The NIST Engineering Statistics Handbook describes the box plot as an excellent tool for conveying location and variation, particularly when comparing groups. If quartiles are new to you, start with our guide to percentiles, quartiles and the IQR.

Where the whiskers end: the 1.5 × IQR rule

Whiskers do not always reach the true minimum and maximum. In the most common version, popularized by statistician John Tukey, they stop at the most extreme data points that lie within 1.5 times the IQR from the box:

  • Lower fence = Q1 − 1.5 × IQR

  • Upper fence = Q3 + 1.5 × IQR

Anything outside the fences is drawn as a separate point. Libraries such as Matplotlib use 1.5 as the default whisker setting and let you change it. Always check which convention your tool uses before you describe a point as an outlier in a report.

A quick example

Suppose these are delivery times in days for 11 orders: 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 19.

  • Median = 5

  • Q1 = 3.5 and Q3 = 6.5 (using the common linear interpolation method), so IQR = 3

  • Upper fence = 6.5 + 4.5 = 11, lower fence = 3.5 − 4.5 = −1

The upper whisker ends at 8, the highest value under the fence, and 19 appears as an outlier. The plot tells you at a glance that most deliveries take three to seven days and one order needs investigating. Different tools use slightly different quartile formulas, so expect small differences in Q1 and Q3.

How to read a box plot

Center

Compare medians first. If one group's median sits above another group's entire box, the difference is probably meaningful and worth testing formally.

Spread

A tall box (or a wide one, in a horizontal plot) means the middle half of values varies a lot. A short box means results are consistent.

Skew

If the median sits close to the bottom of the box and the upper whisker is long, the data is right-skewed: most values are small, with a tail of large ones. Income, order values and response times often look like this.

Outliers

Points beyond the whiskers deserve a look, not automatic deletion. They may be data entry errors, or the most interesting customers in your dataset. Our article on detecting and handling outliers covers what to do next.

Box plot vs histogram

A histogram shows the full shape of a distribution, including gaps and multiple peaks. A box plot hides that detail but is compact and excellent for comparing many groups side by side. Two very different distributions, for example one with two peaks and one with a single peak, can produce nearly identical boxes. A good habit is to explore with a histogram first, then use box plots to compare segments in a report.

How to make a box plot

In Python

With pandas and seaborn, one line draws a box per group:

sns.boxplot(data=df, x="channel", y="order_value")

The seaborn boxplot documentation shows options for horizontal plots, grouping by a second variable and hiding outliers. Pandas also offers df.boxplot(column="order_value", by="channel").

In Excel

Select your data and choose Insert > Insert Statistic Chart > Box and Whisker. According to Microsoft's guide, you can also show mean markers and choose between inclusive and exclusive median methods for the quartile calculation.

In BI tools

Tableau has built-in box plot reference lines, and Power BI supports box plots through custom visuals. In both, make sure each box is built from row-level data, not from pre-aggregated averages.

Common mistakes

  • Plotting tiny samples: with five values, quartiles are unstable. Show the individual points instead, or overlay them on the box.

  • Ignoring group sizes: a box built from 12 orders and one from 12,000 look equally solid. Add counts to labels.

  • Assuming the whiskers are min and max: they usually are not.

  • Deleting outliers to make the chart tidy: investigate first.

FAQ

What are the five numbers in a box plot?

Minimum, first quartile, median, third quartile and maximum, often with the minimum and maximum replaced by the whisker ends when outliers are shown.

What does a long whisker mean?

That values on that side are more spread out, which usually signals skew in that direction.

When should I use a box plot instead of a bar chart?

Use a box plot when you care about the distribution of values in each group, not just one summary number such as the average.

Keep learning with Coderhouse

Reading distributions is one of the first habits of a good analyst. Choose the path that fits you:

Dan Patiño

I'm Dan Patiño, head of AI Strategy & Innovation at Coderhouse. My day-to-day work involves merging the tactical management of e-commerce (CRO, Email Marketing and SEO) with the development of disruptive solutions. I specialize in building internal AI-powered apps to automate tasks and boost innovation within the team. I firmly believe that technology is strategy's best ally. To dive deeper into my professional journey, I'll be waiting for you on my LinkedIn profile.