A box plot is built from five numbers, not from the raw rows: the minimum, the first quartile (Q1), the median, the third quartile (Q3), and the maximum. Sort the data, compute those five values, derive the interquartile range (IQR = Q3 − Q1), and place the whiskers at the most extreme values that fall inside 1.5 × IQR beyond each quartile. Anything outside those fences is plotted as a separate point. The most consequential choice comes before any of that: how you define quartiles changes every edge of the picture.

Sort the Values and Confirm Your Quartile Method Before Drawing Anything

Sorting is mechanical; the quartile definition is not. Excel's QUARTILE.INC, Google Sheets' QUARTILE, Python's NumPy default, and the TI-84 all interpolate. Excel's QUARTILE.EXC and Minitab's default do not interpolate the same way. Statisticians John Tukey, who popularized the box plot in the 1970s, used a median-of-halves approach that excludes the median from both halves when the count is odd.

The disagreement is invisible on large samples and glaring on small ones. With 10 values, Tukey's hinges and linear interpolation can shift Q1 by most of a data step. That shift moves the fences, which can demote a genuine outlier to a whisker tip. Pick one convention, name it in your caption, and never mix conventions across charts you plan to compare.

Excel users should type the function name in full. QUARTILE.INC exists in Excel 2010 and later; files opened in Excel 2007 may reject the dotted names. Google Sheets accepts QUARTILE and QUARTILE.INC as synonyms. The TI-84's 1-Var Stats output labels Q1 and Q3 without stating its interpolation rule, so students comparing calculator output to spreadsheet output will sometimes see different numbers on identical data. That is not an error in either tool.

An even count matters for a subtler reason: if the median falls between two values, you must decide whether it joins the lower half, the upper half, or neither, because that decision changes the halves whose medians become Q1 and Q3. Write the rule down. Auditors and reviewers ask.

Compute the Five-Number Summary Step by Step in a Spreadsheet

The exact sequence below works in Excel 2016 through Microsoft 365 and in Google Sheets with one label difference. Assume your values sit in cells A2 through A21: twenty numbers, one column, no blanks.

1: Put your data in one column with a header in A1. Delete blank rows rather than leaving gaps, because gaps break range references. 2: In an empty cell, enter =COUNT(A2:A21). Confirm it returns 20. If it returns 19, a cell holds text or a stray space. 3: Enter =MIN(A2:A21) for the minimum and =MAX(A2:A21) for the maximum. 4: Enter =MEDIAN(A2:A21) for the center line. 5: Enter =QUARTILE.INC(A2:A21,1) for Q1 and =QUARTILE.INC(A2:A21,3) for Q3. In Google Sheets, =QUARTILE(A2:A21,1) and =QUARTILE(A2:A21,3) return the same values. 6: Subtract Q1 from Q3 in a new cell to get the IQR. 7: Multiply the IQR by 1.5, then add it to Q3 (upper fence) and subtract it from Q1 (lower fence).

If COUNT disagrees with the number of rows you selected, stop. Text-formatted numbers imported from a CSV are the single most common cause of a box plot that looks wrong. Select the column, use Data → Text to Columns, and click Finish to coerce the values to numbers. The second most common failure is a hidden row inside the range; Excel includes hidden rows in functions but ignores them when charting directly, which produces a mismatch between your computed median and the drawn line.

Build the Box and Whiskers Natively in Excel's Box and Whisker Chart

Excel 2016 introduced a native Box and Whisker chart type, and Microsoft 365 carries it forward. Select your single-column range including the header, then choose Insert → Insert Statistic Chart → Box and Whisker. Excel computes quartiles with inclusive interpolation, plots the median inside the box, and marks outliers beyond 1.5 × IQR as individual dots.

The native chart draws whiskers to the furthest data point inside the fence, not to the fence itself. That distinction matters when you write a report: a whisker tip is a real observation, while the fence is an invisible boundary. Customize through the Format pane: Show Inner Points, Show Outlier Points, and Show Mean Markers are separate checkboxes. The mean marker is a small × that many readers mistake for a second outlier.

Excel's chart will not accept multiple series as side-by-side boxes in the way a clustered column chart accepts series. To compare four groups, lay them out as four columns of unequal length and select the whole block; Excel treats each column as a category. Unequal column lengths are handled, but blank cells inside a column should be genuinely empty, not zero.

If you need whiskers drawn to the 5th and 95th percentiles rather than the Tukey fences, the native chart cannot do it. Build the box from a stacked column chart with an invisible base segment instead. That workaround takes about ten minutes and is the standard route for publications that specify percentile whiskers.

Draw the Same Plot in Google Sheets, Python, and R Without Changing the Story

Google Sheets has no native box plot, so the standard route is a candlestick chart. Organize five columns in this exact order: minimum, Q1, median, Q3, maximum. Select the row, insert a candlestick chart, and format the series so the "wicks" carry your minimum and maximum. The middle box spans Q1 to Q3, with the median drawn as a line inside it, which is precisely the box plot geometry. Outliers must be added as a separate scatter series, because candlestick charts have no outlier concept.

Python users call matplotlib.pyplot.boxplot or seaborn.boxplot, both of which default to Tukey's 1.5 × IQR rule. Seaborn's default whis=1.5 can be changed to whis=(5, 95) for percentile whiskers, or set to whis='range' to force whiskers to the min and max with no outliers. That last option produces a chart that looks like a box plot but hides exactly the observations a box plot exists to reveal.

R's boxplot() in base graphics uses range = 1.5 by default and applies Tukey's hinges. Setting range = 0 extends whiskers to the extremes. Both Python and R label outliers individually by default, which is the behavior you want when sample sizes are small and every extreme value deserves a name.

Tool Default quartile rule Default whisker rule Native outlier points
Excel 2016+ chart Inclusive interpolation 1.5 × IQR Yes
Google Sheets candlestick Inclusive interpolation You set min and max manually No
Python (matplotlib, seaborn) Linear interpolation 1.5 × IQR Yes
R base boxplot() Tukey hinges 1.5 × IQR Yes
TI-84 (1-Var Stats plus plot) Calculator interpolation 1.5 × IQR Yes

The verdict is straightforward. Use the native chart when speed matters and your audience accepts Excel's interpolation. Use code when you need the rule stated in the caption and reproducible across reruns. Use the candlestick workaround only when Sheets is the only tool available.

Match the Whisker Rule to Your Field, Not to the Software Default

Tukey's 1.5 × IQR rule is the default everywhere, and it is a screening heuristic, not a statistical test. A point beyond the fence is unusual relative to the spread of the middle half of the data; it is not automatically an error, and deleting it without a reason is misconduct in any field that reports results.

Laboratory and quality-control work often prefers whiskers at the 5th and 95th percentiles with everything beyond plotted individually. That convention keeps the whisker length stable across samples and stops a single extreme value from stretching the whisker across half the axis. Environmental monitoring and some clinical reporting use the same percentile convention for the same reason.

Tukey himself framed the fence as a labeling device. His 1977 book Exploratory Data Analysis treats the plot as a way to look at data before assuming a distribution, which is why the rule has no p-value attached. Software defaults inherited the convention, and most readers now expect it.

If your field has a written convention, follow it and say so in the caption. If it does not, the 1.5 × IQR rule is defensible because it is what the tools do and what reviewers expect. Either way, state the rule. A box plot without a stated whisker rule is ambiguous to anyone who knows the alternatives exist.

Resolve Outliers With a Written Rule, Not With Deletion Reflex

An outlier on a box plot earns an investigation, not an instant removal. Three outcomes are legitimate. Keep it and note it. Keep it and analyze with and without it, reporting both. Remove it only if you can document why it is not a valid observation, such as a sensor reading of −40 °C in a climate chamber rated to 0 °C.

The 1.5 multiplier is a convention, and the 3.0 multiplier marks "extreme" outliers in Tukey's framework. Some textbooks and software treat points beyond 3 × IQR as a separate class. Neither threshold tests a hypothesis, so neither licenses deletion. If you need a formal test, the Grubbs test or a Dixon Q test asks a different question with stated assumptions, and a box plot is not a substitute for either.

Report the count of flagged points in your write-up. A chart with six dots beyond the upper fence tells a different story from one with a single dot, and readers cannot count reliably on a small image. Give the number, give the fence values, and give the maximum so the reader can verify the arithmetic.

One practical failure case: with fewer than about ten observations, the fences are so wide that almost nothing is flagged, and the box is drawn from quartiles that sit between single data points. A box plot of six values conveys less than the six values typed out. Show the raw points instead, or overlay them.

Compare Groups on One Axis With Equal Scales and Stated Sample Sizes

Side-by-side boxes are the point of the chart type. Four production lines, three treatments, twelve months: each category gets its own box on a shared vertical axis. Unequal y-axis ranges across panels invite false comparisons, so keep one axis unless the magnitudes differ by orders of magnitude, in which case say so in the caption.

Label each box with its sample size. A box drawn from 8 observations and one drawn from 800 look identical in shape, and readers will weight them equally. Put n under each category label or in the legend. This single addition prevents more misreading than any amount of caption prose.

Order the categories by median rather than alphabetically unless the categories have a natural sequence such as months. Sorted medians make the ranking visible immediately; alphabetical order forces the reader to scan back and forth. Both are defensible, but choose deliberately and keep the order consistent across figures in the same report.

When group sizes are wildly unequal, note it. A group with 12 points and a group with 1,200 points produce quartiles with very different precision, and the small group's box will jump around between reruns. A dot plot with jittered points layered over the boxes shows both the summary and the sample, which addresses the concern directly.

Label the Median, Fences, and Sample Size So the Chart Audits Itself

A publishable box plot carries five pieces of text beyond the axis labels: the median value, the Q1 and Q3 values or the IQR, the whisker rule ("whiskers at 1.5 × IQR"), the sample size per group, and the count of flagged points. Put the numeric values in a small table beneath the chart rather than crowding the graphic; tables survive grayscale printing and screen readers.

Axis labels need units. A median of 42 means nothing without "mg/L" or "seconds" attached. If the data are log-transformed, say so, because a box plot of logged values has a median that is a geometric mean of the original scale, which changes the interpretation entirely.

Captions should name the quartile convention when it is not the software default. "Quartiles by inclusive interpolation; whiskers at 1.5 × IQR; 3 points beyond the upper fence" is a complete caption in one line. Readers who care will check it; readers who do not will still see an honest chart.

For accessibility, provide the five-number summary as a table alongside the figure. Screen readers cannot describe a box, and a table of minima, quartiles, medians, maxima, and outlier counts conveys the same information in a format assistive technology handles well. Journals increasingly require this.

Fix the Four Failures That Make a Box Plot Misleading

The first failure is a hidden distribution. Two groups can share identical five-number summaries and look nothing alike: one bimodal, one uniform. The box plot cannot show this because it discards everything between the quartiles. With samples under about 30, overlay the individual points with jitter or show a histogram beside the box. Anscombe's quartet, published in 1973, makes the general point that summary statistics can match while the underlying data differ wildly.

The second failure is a mismatched range. If your formula range stops at row 100 but your data run to row 150, the summary is silently incomplete. Check COUNT every time, and check that MIN and MAX match what you see when you sort the column.

The third failure is treating a box plot as a distribution test. It shows spread and skew through the asymmetry of the box and whiskers, but it does not test normality, and a symmetric box does not prove a symmetric distribution. Use a histogram or a quantile-quantile plot for that question.

The fourth failure is a truncated axis. Starting the y-axis above zero exaggerates differences between groups and hides the lower whisker. If the data range from 80 to 120, a zero-based axis compresses the boxes into a thin band, which is honest but hard to read. Show the full axis, or state the truncation in the caption and explain why.

FAQ

What are the fences in a box plot?

The fences are invisible boundaries at Q1 − 1.5 × IQR and Q3 + 1.5 × IQR; anything beyond them is plotted as an individual point. They are not drawn on a standard box plot, which is why readers sometimes assume the whisker tips are the fences. With an IQR of 10, the upper fence sits 15 units above Q3, so a whisker tip at Q3 + 12 is a real observation inside the fence, not a boundary marker.

Why does Excel give a different median than my calculator?

Excel's MEDIAN and the TI-84 agree on the median for any data set; the disagreement usually appears in Q1 and Q3, where interpolation rules differ. A TI-84 using median-of-halves and Excel using inclusive interpolation will produce different quartiles on the same 15 values. The medians match, the boxes do not, and the fix is to state which convention your figure uses.

Can a box plot show the mean?

Yes, but it does not by default. Excel's Format pane has a Show Mean Markers checkbox that adds a small × inside the box. Seaborn shows the mean only if you pass showmeans=True. The mean is worth showing when the distribution is roughly symmetric and readers expect it, and worth omitting when outliers pull it toward a tail.

How many data points do I need for a box plot?

There is no hard minimum, but below about 10 observations the quartiles fall between individual values and the plot hides more than it shows. With 5 points, the box spans from the second to the fourth value and the median is the third, which the reader could have read from the list. Show the raw values instead, or overlay them.

What is the difference between a box plot and a violin plot?

A violin plot adds a kernel density estimate to each side of the box, showing where values concentrate. The box plot shows five numbers and nothing about shape between the quartiles. Violin plots need larger samples for the density estimate to be meaningful, roughly 30 or more per group, and they obscure the exact quartile values unless you overlay the box.

Does a point beyond the fence mean the data are wrong?

No. The fence is a labeling convention, not an error test, and a flagged point is often the most interesting observation in the set. Removing it requires a documented reason tied to how the value was produced. Report the flagged count and the fence values so a reader can judge for themselves.

Can I build a box plot in Google Sheets without add-ons?

Yes, through a candlestick chart with columns ordered minimum, Q1, median, Q3, maximum. The chart draws the box from Q1 to Q3 and the median as a line inside it, which is the correct geometry. Outliers need a separate scatter series, because the candlestick chart type has no concept of points beyond the whiskers.