Skip to content

Box Plot Examples: Calculate Quartiles, IQR, Whiskers And Outliers

September 25, 2026 ·
Three Distributions With Quartile Boxes Whiskers And An Outlier

A box plot is a compact graphical summary of a numerical distribution. It can help a reader compare the central locations and spreads of several groups while identifying observations that may deserve additional investigation. A useful plot preserves the measurement definition, sample size and quartile convention. The original fictional examples in this article show how to calculate the five-number summary, construct a Tukey-style box plot, interpret unusual observations and compare processes without confusing statistical fences with acceptance requirements.

Quick Answer

Sort observations, calculate quartiles using a stated convention, find the IQR and applicable fences, and draw the median, box, whiskers and flagged values on a common scale.

Table Of Contents

What Is A Box Plot?

The NIST Engineering Statistics Handbook box plot guide describes this graphical approach to summarizing and comparing distributions. The box typically extends from the first quartile to the third quartile, with a line marking the median. Whisker conventions vary: some extend to the observed minimum and maximum, while a Tukey-style plot uses a rule based on the interquartile range to determine the extreme observed endpoints.

For every worked calculation below, use the median-of-halves method. Sort the data, find the overall median and calculate the medians of the lower and upper halves. For an odd sample size, omit the overall median from both halves. Other methods use percentile interpolation or include the middle value. Specify the convention before comparing results produced by different tools.

Our histogram examples show how counts in intervals represent a distribution. A box plot is convenient for comparing central spread across groups, but it cannot show every feature of the original observations. Retain the raw data when interpretation requires more detail than the summary displays.

Worked Example: Calculate Quartiles From Eight Observations

A fictional stationery retailer records the time required to prepare eight comparable packs. The ordered durations are 4, 5, 6, 7, 8, 9, 10 and 14 minutes. The median is the average of the fourth and fifth values, giving 7.5 minutes. The lower half contains 4, 5, 6 and 7, with a median of 5.5. The upper half contains 8, 9, 10 and 14, with a median of 9.5.

SummaryMinutes
Minimum4
First Quartile Q15.5
Median Q27.5
Third Quartile Q39.5
Maximum14

The interquartile range, abbreviated IQR, is 9.5 minus 5.5, or four minutes. The full range is 14 minus four, or ten minutes. The two measures describe different parts of the distribution. A box extends from 5.5 to 9.5 and its median line lies at 7.5. Under a minimum-to-maximum convention, its whiskers extend to four and 14.

The quartile values need not appear as individual measurements. In this example nobody was recorded at 5.5 minutes, because the lower quartile is calculated between two observations. The value is a summary of ordered observations under the stated method. Similarly, the box does not contain a fixed count of individual observations at each boundary when values are tied.

Worked Example: Calculate Fences And Identify Whisker Endpoints

Under the illustrative Tukey-style rule, the lower fence is Q1 minus 1.5 times IQR and the upper fence is Q3 plus 1.5 times IQR. For the stationery dataset, 1.5 multiplied by four equals six. The lower fence is negative 0.5 and the upper fence is 15.5. Every observation is inside the fences, so the whiskers extend to four and 14.

Change the final value from 14 to 25, leaving all other observations unchanged. Q1 and Q3 remain 5.5 and 9.5 because the middle values of both halves are unchanged. The fences are therefore identical, but 25 now exceeds the upper fence.

QuantityOriginalRevised
Q15.55.5
Median7.57.5
Q39.59.5
Lower Fence−0.5−0.5
Upper Fence15.515.5
Lower Whisker44
Upper Whisker1410
Flagged ObservationNone25

The revised upper whisker ends at ten, which is the largest actual observation not exceeding 15.5. It does not end at the numerical fence. Plot 25 separately. The negative lower fence is merely an arithmetic boundary, not a meaningful negative duration.

A flagged value is not proof of a measurement mistake. The 25-minute case might have required legitimate additional preparation or correction. Investigate the original record and its conditions before excluding it. Our Is/Is Not analysis examples demonstrate why verified differences and unknown conditions need separate treatment. Removing a valid unusual case just to make the box plot look better would conceal meaningful evidence.

Worked Example: Compare Two Preparation Arrangements

A fictional optical accessory supplier compares durations for two legitimate packaging arrangements. Arrangement A has ordered times of 5, 6, 7, 8, 9, 10, 11 and 12 minutes. Arrangement B has times of 4, 5, 6, 7, 8, 9, 10 and 20 minutes. Both use the same measurement start and finish.

MeasureAB
Minimum54
Q16.55.5
Median8.57.5
Q310.59.5
IQR44
Maximum1220
Mean8.58.625

B has a median one minute lower than A and the same IQR, but its arithmetic mean is slightly higher. Its upper fence is 15.5, so 20 is flagged under the chosen rule. A’s upper fence is 16.5, with no values beyond it. The comparison shows why a lower median does not necessarily imply a lower mean or a smaller maximum.

The preferable arrangement depends on the actual objective. If typical preparation time matters, B’s median is relevant. If the service requires reliable completion within an agreed threshold, the long observation may deserve special attention. If the two groups contain different request types, those differences could explain part of the result rather than the arrangement itself.

Our data stratification examples explain how composition affects combined results. Keep the group definitions, sample counts and measurement conventions visible. Display comparable plots on a common axis so that a difference of one minute has the same visual meaning in both groups.

Worked Example: An Odd Sample And Tied Observations

A fictional seed catalog service measures nine retrieval times: 2, 3, 4, 4, 5, 6, 7, 8 and 12 minutes. The median is the fifth observation, five minutes. Excluding it from both halves leaves lower values of 2, 3, 4 and 4, and upper values of 6, 7, 8 and 12. The lower quartile is 3.5, the upper quartile is 7.5 and the IQR is four. The fences are negative 2.5 and 13.5; every measured value is within them.

If a different convention includes the middle observation in both halves, the lower five values have median four and the upper five values have median seven. That produces an IQR of three rather than four. This difference arises from the method, not from a change in the raw observations. When a chart and spreadsheet disagree, inspect their quartile definitions before interpreting the result as a data problem.

Ties also affect visual interpretation. If several observations equal a quartile, the box may have a boundary shared by multiple values. Do not infer the exact number of observations on either side of a boundary from the drawing alone. Use the sorted data or frequency counts when exact counts matter.

Understand Variability And Distribution Shape

The box width along the numerical axis represents central spread. A longer box indicates a greater IQR on a common scale. An off-center median or unequal whiskers may suggest asymmetry, but those features do not by themselves establish a particular population distribution. A small sample can produce an irregular plot even when the underlying process is stable.

Suppose two groups have the same median of ten minutes. One has an IQR of two minutes and the other eight minutes. Their central locations are identical under the median measure, while the second group’s central observations are more dispersed. If a service must deliver predictably, that difference may be important even though the median is unchanged. Investigate which cases and conditions produce the variation.

A box plot can hide multiple clusters. Consider a fictional group containing 4, 5, 5, 6, 14, 15, 15 and 16 minutes. The median is ten, although no measured value lies near ten. The lower and upper clusters may represent different legitimate work types. A histogram or individual-point plot can make that structure easier to see. Our behavior over time graph examples also explain why the ordering of observations in time can be important. A box plot discards that sequence.

Distinguish Statistical Fences From Specification Limits

A fictional print shop measures the widths of approved sample cards. Suppose the required width is between 99 and 101 millimetres, while a group of five observed cards measures 103, 103.2, 103.4, 103.6 and 103.8 millimetres. The values are tightly clustered but all exceed the upper specification limit. Under the stated quartile rule, Q1 is 103.1, Q3 is 103.7 and the IQR is 0.6. The upper Tukey fence is 104.6, so none of the five is flagged as an upper outlier.

The absence of an outlier flag does not establish conformity. In this case every measured card fails the stated dimensional requirement despite appearing consistent relative to the group. Conversely, a flagged observation may lie within the product specification. Show requirements separately and label their origin. A data-derived fence must not replace the applicable acceptance limit.

Measurement reliability must also be established. If the instrument has an unresolved bias or the people performing the measurement use different reference positions, the box may represent measurement differences instead of actual card dimensions. Investigate the suitability and consistency of the measurement arrangement before treating the plotted distribution as a faithful description of the process.

Preserve Sample Size And Missing Observations

A box drawn from eight cases and another drawn from 800 may look similar. The evidence available for estimating the underlying distribution differs significantly. Some plotting systems use variable widths to convey relative sample sizes, while others draw equal widths. Label counts explicitly rather than expect every reader to know the software convention.

Missing measurements need careful handling. Suppose a service receives 50 eligible requests, but only 38 have reached their completion checkpoint. A box plot of the 38 completed durations describes those completed items. It does not yet describe the eventual duration of all 50 requests. The 12 unfinished cases may include the longest durations. Report the measurement population and preserve the unfinished work separately.

Our Kanban board examples distinguish completed-item cycle time from the age of work still in progress. The same distinction helps prevent a box plot of completed work from obscuring outstanding cases. Do not enter zero for an unfinished duration merely because the planned spreadsheet requires a number.

Use The Plot To Support An Improvement Investigation

Suppose the optical supplier’s arrangement B has a long observation caused by the need to verify a missing approved reference. That finding may justify investigating whether the required reference can be made reliably available at the preparation point. It does not justify excluding the case from the performance measurement simply because its mechanism is now understood.

Our design of experiments examples explain why a comparison requires an appropriate design, defined responses and relevant controls. A visual difference between two groups does not prove statistical significance or causation. Examine how the groups were selected, whether relevant conditions differ and whether an appropriate analysis supports the decision.

If the purpose is to compare a proposed improvement, preserve the earlier plot and underlying values. Examine the change in the median, spread, long observations and applicable acceptance outcomes. A smaller IQR can be useful, but a more consistent process that consistently fails a requirement is not an improvement in the intended result.

Worked Example: A Zero Interquartile Range

Suppose seven of eight measurements equal ten and the eighth equals eleven. Under the median-of-halves method, Q1 and Q3 both equal ten because the middle values of each half are ten. The IQR is zero, and both Tukey-style fences equal ten. Eleven is therefore flagged under that simple rule.

The flag reflects the concentrated recorded values and the calculation convention. It does not automatically establish that the difference is material. If the measurement has coarse resolution, the seven equal values may represent different underlying values rounded to the same recorded number. Investigate measurement resolution and the actual requirement before judging the unusual observation. A graphical rule is a prompt for review, not a substitute for context.

Consider the comparison of arrangement A and B using a deadline of 12 minutes. All eight A observations meet that threshold, while seven of eight B observations do. The observed deadline rates are 100% and 87.5%. The median of B is lower, yet the threshold performance in this sample is less favorable. This illustrates why a box plot should be read alongside the measure that corresponds to the actual service objective. A small sample cannot establish the future probability of missing the deadline. Preserve the observed counts and investigate whether the long case represents a recurring condition.

A box plot can also be drawn horizontally or vertically. The numerical scale, not the physical orientation, determines the meaning of spread. If groups use different measurement units, convert the observations to a common compatible unit before plotting them together. For example, a duration recorded in seconds cannot be compared visually with a duration recorded in minutes until the scale is reconciled.

Reusable Box Plot Worksheet

FieldRecord
VariableDefined Numerical Measure And Unit
PopulationGroup, Eligibility And Period
DataOriginal Observations And Sample Size
ConventionQuartile And Whisker Definitions
SummaryMinimum, Q1, Median, Q3 And Maximum
IQR And FencesCalculations Under Declared Rule
WhiskersActual Extreme In-Fence Observations
InterpretationCenter, Spread, Flags And Limitations

Retain the raw data and explain how the plot was constructed. Compare distributions in relation to the actual decision and preserve valid unusual observations. A box plot is most useful when it makes the relevant variation easier to investigate without presenting descriptive statistics as proof of a causal explanation or an acceptance decision.

Frequently Asked Questions

What is a box plot?

A graphical summary of a numerical distribution using quartiles and defined whiskers.

What is Q1?

The first quartile calculated under a stated convention.

What is IQR?

Q3 minus Q1.

How are Tukey fences calculated?

Q1 minus 1.5 IQR and Q3 plus 1.5 IQR.

Do whiskers end at the fences?

Under the chosen Tukey convention, they end at actual extreme observations within the fences.

Is an outlier always a mistake?

A flag requires investigation and may represent a valid measurement.

Does a box plot show the mean?

The internal line normally shows the median; some plots add a mean marker.

Why do software quartiles differ?

Percentile and interpolation conventions may differ.

Do fences replace specification limits?

They describe the distribution, not acceptance requirements.

What else should be reported?

Sample size, units, calculation method and relevant evidence limitations.

Leave a Reply

Your email address will not be published. Required fields are marked *