Descriptive Statistics Data Visualization Quartiles & IQR 22 min read Sep 13, 2026
BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Box Plot: Definition, Examples, IQR, and How to Read It

A box plot shows you five things about a data set at once: the minimum, Q1, median, Q3, and maximum. That is why statisticians reach for it whenever they want to compare distributions quickly or spot values that sit far from the rest of the data.

This guide explains what every part of a box plot means, walks through the IQR and outlier calculations step by step, and includes an interactive calculator that draws a scaled box plot from any set of numbers you enter.

What You'll Learn
  • ✓ What a box plot is and what each part represents
  • ✓ How to calculate the five-number summary, IQR, and fences
  • ✓ How to identify potential outliers using the 1.5 x IQR rule
  • ✓ How to read and interpret a box plot, including skewness
  • ✓ Fully worked examples with and without outliers
  • ✓ How box plots compare to histograms, bar graphs, and scatter plots
  • ✓ Common mistakes and how to avoid them

What Is a Box Plot?

Definition
A box plot (also called a box-and-whisker plot) is a standardised graph that summarises the distribution of a numerical data set using five values: the minimum, first quartile (Q1), median, third quartile (Q3), and maximum. A box spans Q1 to Q3, a line inside marks the median, and lines called whiskers extend outward to the most extreme non-outlier values.
IQR = Q3 − Q1

The five values together are called the five-number summary. They divide the data set into four equal groups: 25% of observations fall below Q1, 25% fall between Q1 and the median, 25% fall between the median and Q3, and 25% fall above Q3.

John Tukey introduced box plots in his 1977 book Exploratory Data Analysis as a tool for quickly seeing where data clusters and where unusual observations might lurk. The basic design has not changed much since, which speaks to how much information it packs into a compact graphic.

Quick Reference
  • Minimum: The smallest non-outlier value (left whisker endpoint)
  • Q1 (first quartile): The 25th percentile; 25% of values fall below this
  • Median (Q2): The 50th percentile; the middle value of the ordered data
  • Q3 (third quartile): The 75th percentile; 75% of values fall below this
  • Maximum: The largest non-outlier value (right whisker endpoint)
  • IQR: Q3 minus Q1; the width of the box; covers the middle 50% of observations
  • Potential outliers: Points below Q1 − 1.5(IQR) or above Q3 + 1.5(IQR)

Interactive Box Plot Calculator

Box Plot Calculator & Generator

Enter numbers separated by commas, spaces, or line breaks. Negative values and decimals are accepted. This calculator uses the median-of-halves method for quartiles: Q1 is the median of the lower half and Q3 is the median of the upper half; the median observation itself is excluded when the data set has an odd count. Results may differ slightly from software that uses a different quartile convention.
Minimum
Q1
Median
Q3
Maximum
IQR (Q3 − Q1)
Lower Fence
Upper Fence
Potential Outliers:
Quartile method: Median-of-halves (Tukey). Whiskers extend to the most extreme observations within the fences. Points outside the fences are plotted individually as potential outliers.

What Does a Box Plot Show?

Each part of a box plot carries specific information about where values concentrate and how spread out they are.

Part What It Represents Notes
Left whisker endpointSmallest non-outlier valueNot always the raw data minimum if outliers exist
Left edge of box (Q1)25th percentile25% of observations lie below this value
Line inside box (median)50th percentileThe middle value of the ordered data set
Right edge of box (Q3)75th percentile75% of observations lie below this value
Right whisker endpointLargest non-outlier valueNot always the raw data maximum if outliers exist
Box widthIQR (Q3 − Q1)Covers the middle 50% of observations
Individual points beyond whiskersPotential outliersValues outside Q1 − 1.5(IQR) or Q3 + 1.5(IQR)
⚠️
Common Confusion: Whisker Endpoints vs. Min/Max

In a modified box plot (the standard type taught in most courses), whiskers extend to the most extreme values that are not classified as potential outliers, not necessarily to the raw minimum and maximum. The raw minimum and maximum may sit beyond the whiskers as individual plotted points.

Five-Number Summary

The five-number summary is the backbone of every box plot. Given the ordered data set 2, 5, 7, 8, 10, 13, 15, 18, 22, the five values are:

Five-Number Summary
Min   Q1   Median   Q3   Max
Min = 2 Q1 = 6 (median of lower half: 2,5,7,8) Median = 10 Q3 = 16.5 (median of upper half: 13,15,18,22) Max = 22

With 9 observations, the median is the 5th value (10). The lower half is the four values below the median (2, 5, 7, 8), giving Q1 = (5 + 7) / 2 = 6. The upper half is the four values above the median (13, 15, 18, 22), giving Q3 = (15 + 18) / 2 = 16.5.

How to Make a Box Plot

1

Order the data from smallest to largest

Write all observations in ascending order. Duplicate values are kept. This sorted list is what every subsequent step works from.

2

Find the median (Q2)

If the count is odd, the median is the single middle value. If the count is even, the median is the average of the two middle values. Record this as Q2.

3

Find Q1

Take the lower half of the sorted data (excluding the median observation when the count is odd). The median of that lower half is Q1.

4

Find Q3

Take the upper half of the sorted data (again excluding the median when the count is odd). The median of that upper half is Q3.

5

Calculate IQR

IQR = Q3 − Q1. This one number tells you how spread out the middle 50% of the data is. It is also the width of the box in the final plot.

6

Calculate the lower and upper fences

Lower Fence = Q1 − 1.5 × IQR. Upper Fence = Q3 + 1.5 × IQR. Any observation outside these boundaries is a potential outlier.

7

Identify potential outliers

Scan the sorted data for any values below the lower fence or above the upper fence. These are plotted separately as individual points, not connected to a whisker.

8

Draw the box, median line, whiskers, and outlier points

Draw a box from Q1 to Q3. Place a vertical line inside the box at the median. Extend the left whisker to the smallest observation within the lower fence, and the right whisker to the largest observation within the upper fence. Plot any potential outliers as separate points beyond the whiskers.

Worked Examples

Example 1: Box Plot with No Outliers

Worked Example 1

Data: 3, 5, 7, 8, 10, 12, 14, 16

Formulas Used
IQR = Q3 − Q1    Fences = Q ± 1.5(IQR)
1

Ordered data (n = 8): 3, 5, 7, 8, 10, 12, 14, 16

2

Median: n is even; two middle values are 8 and 10. Median = (8 + 10) / 2 = 9

3

Q1: Lower half = 3, 5, 7, 8. Median of lower half = (5 + 7) / 2 = 6

4

Q3: Upper half = 10, 12, 14, 16. Median of upper half = (12 + 14) / 2 = 13

5

IQR: 13 − 6 = 7

6

Lower Fence: 6 − 1.5(7) = 6 − 10.5 = −4.5
Upper Fence: 13 + 1.5(7) = 13 + 10.5 = 23.5

7

Outliers: No values fall below −4.5 or above 23.5. No potential outliers. Whiskers extend to 3 (left) and 16 (right).

Five-number summary: 3, 6, 9, 13, 16. IQR = 7. No potential outliers.

Example 2: Box Plot with an Outlier

Worked Example 2

Data: 4, 5, 6, 7, 8, 9, 10, 50

The value 50 looks extreme. Let's find out whether the IQR rule classifies it as a potential outlier.

1

Ordered data (n = 8): 4, 5, 6, 7, 8, 9, 10, 50

2

Median: Two middle values are 7 and 8. Median = (7 + 8) / 2 = 7.5

3

Q1: Lower half = 4, 5, 6, 7. Median = (5 + 6) / 2 = 5.5

4

Q3: Upper half = 8, 9, 10, 50. Median = (9 + 10) / 2 = 9.5

5

IQR: 9.5 − 5.5 = 4

6

Lower Fence: 5.5 − 1.5(4) = 5.5 − 6 = −0.5
Upper Fence: 9.5 + 1.5(4) = 9.5 + 6 = 15.5

7

Outlier check: 50 > 15.5, so 50 is a potential outlier. The right whisker extends to 10 (the largest non-outlier value). The value 50 is plotted as a separate point.

Five-number summary: 4, 5.5, 7.5, 9.5, 50. IQR = 4. Potential outlier: 50. Right whisker reaches 10, not 50.

💡
Outlier does not automatically mean error

A value flagged by the 1.5 x IQR rule is a potential outlier. It may be a legitimate extreme observation, a data entry mistake, or evidence that the data comes from a mixed population. Always investigate the source before deciding what to do with it. For more, see the guide to outliers in statistics.

How to Read a Box Plot

Reading a box plot is a skill that gets faster with practice. The five questions below cover the most common things analysts extract from one.

What is the center?

Look at the line inside the box. That is the median. It is the middle value of the data set, and it is the best single summary of center when the data is skewed or has outliers. Note that the median is not the same as the mean; outliers pull the mean but leave the median relatively unaffected.

How spread out is the middle 50%?

The width of the box is the IQR. A wide box means the middle half of the data covers a large range. A narrow box means observations cluster closely around the median. The IQR is covered in more depth in the interquartile range page.

What does whisker length tell you?

Each whisker shows how far the non-outlier data extends beyond Q1 or Q3. A long right whisker means there is a wider spread of values in the upper portion of the data (without reaching outlier territory). Whisker length alone does not prove a distribution is skewed, but an asymmetry in whisker length is worth noting.

Are there potential outliers?

Points plotted individually beyond the whiskers are potential outliers under the 1.5 x IQR rule. Their position relative to the fences tells you roughly how extreme they are.

What shape might the distribution be?

Three rough patterns come up often:

Pattern What it can suggest Caution
Median near center of box, whiskers roughly equal Approximately symmetric distribution Box plots cannot confirm normality; use a Q-Q plot or normality test for that
Median closer to Q1, long upper whisker or high outliers Right-skewed (positively skewed) distribution A box plot cannot show bimodality or fine distribution shape
Median closer to Q3, long lower whisker or low outliers Left-skewed (negatively skewed) distribution Small samples may show asymmetry by chance; interpret cautiously

Box plot geometry can suggest skewness, but it should not be treated as definitive proof. Other features of the distribution, especially multimodality, can produce similar-looking plots for different reasons.

IQR and the Outlier Rule

The 1.5 x IQR Rule
Lower Fence = Q1 − 1.5(IQR)    Upper Fence = Q3 + 1.5(IQR)
IQR = Q3 − Q1 Values below Lower Fence = potential outlier Values above Upper Fence = potential outlier

The 1.5 x IQR rule was proposed by Tukey as a practical threshold, not a theoretically derived one. Under a normal distribution it catches roughly 0.7% of observations, which is why it has become a common default.

The IQR itself is a resistant measure of spread. It is less sensitive to extreme values than the standard deviation, which is why it pairs naturally with the median rather than the mean in skewed data sets. That said, IQR is not completely unaffected by outliers; very extreme values can shift Q1 or Q3 if enough of them exist in the data.

When you see a potential outlier flagged by the calculator, the right response is to investigate, not to delete. Ask: Is this a data entry error? Is it a legitimate unusual value? Could the data contain observations from two different populations? The answer changes what you do next. See the guide to outliers in statistics for a fuller treatment.

IQR vs. Range

Both measure spread, but they capture different things.

Measure Formula What it covers
Range Maximum − Minimum The full width from smallest to largest value; heavily affected by extreme observations
IQR Q3 − Q1 The spread of the middle 50%; more resistant to extreme values

On a box plot, the range is the total distance from the left whisker endpoint to the right whisker endpoint (or from the leftmost outlier to the rightmost, if you include them). The IQR is simply the width of the box. For data with a long tail or extreme values, the range can be misleading as a summary of typical spread.

Comparing Box Plots

Side-by-side box plots drawn on a shared axis are one of the best tools for comparing distributions across groups. Shared scale is the key requirement. If the axes differ between plots, you cannot visually compare medians or spreads.

When comparing two or more box plots, four questions guide the analysis: Which group has the higher median? Which has the larger IQR? Are the ranges dramatically different? Does either group show potential outliers that the other does not?

Example: Comparing Two Groups

Group A: 12, 15, 18, 20, 22  |  Group B: 10, 14, 17, 25, 30

Group A: Median = 18, Q1 = 13.5, Q3 = 21. Group B: Median = 17, Q1 = 12, Q3 = 27.5. Group A has the higher median. Group B has the larger IQR (15.5 vs. 7.5), meaning more variability in the middle of the distribution. Neither group shows a potential outlier under the 1.5 x IQR rule in this small sample.

Box Plot vs. Histogram

Feature Box Plot Histogram
Shows frequency / countNoYes
Shows median clearlyYesNo (requires calculation)
Shows IQR and quartilesYesNo
Flags potential outliersYesNot directly
Reveals multimodalityPoorlyYes
Best for comparing groupsYes (side by side)Awkward with many groups
Preserves individual valuesNoNo (bins observations)

A box plot and a histogram answer different questions. For a single distribution where shape detail matters (bimodal patterns, gaps, flat versus peaked), a histogram gives more information. For quickly comparing several groups or communicating spread and center without distributional detail, a box plot is usually cleaner. For more on choosing chart types, see the data visualization section.

Box Plot vs. Bar Graph

A bar graph compares categories (e.g., revenue by region). A box plot summarises a numerical distribution within one group or across groups. They are not interchangeable. Using a bar graph to show the distribution of test scores, for example, throws away almost all the information that a box plot or histogram would preserve.

Box Plot vs. Scatter Plot

A scatter plot shows the relationship between two numerical variables by plotting individual data points. A box plot summarises the distribution of one numerical variable (or one variable across groups). They serve different purposes and are not direct substitutes.

Advantages of Box Plots

  • Compact summary of a distribution in a single graphic
  • Shows median, quartiles, IQR, and potential outliers simultaneously
  • Resistant to extreme values for the quartile-based measures it displays
  • Well-suited to comparing multiple groups side by side
  • Works well with both small and large data sets
  • Scale is determined by the data, so no bin-width decision is needed

Limitations of Box Plots

  • Two data sets with very different shapes can produce identical box plots
  • Multimodality is invisible in a box plot; peaks and valleys are lost
  • Individual values are not shown (except potential outliers)
  • Quartile conventions differ between software packages; results can vary slightly
  • Skewness assessment from a box plot is approximate, not definitive
  • For very small samples (fewer than about 5 values), the five-number summary carries limited meaning

Real-World Applications

🏥

Healthcare

Comparing patient blood pressure distributions across treatment groups or hospitals. Spotting unusual readings that may warrant further review.

📚

Education

Summarising exam score distributions by class or school. Comparing performance across different terms or curricula side by side.

💼

Business

Comparing sales figures, delivery times, or customer wait times across teams, regions, or time periods.

📈

Finance

Visualising the distribution of daily returns for different assets. Identifying months or securities with unusually extreme movements.

🔬

Research

Comparing measurements across experimental groups in a study. Quickly checking whether distributions overlap substantially before running a hypothesis test.

🏭

Manufacturing

Monitoring production measurements (part dimensions, fill weights) over time. Box plots across shifts or batches can reveal process drift.

Common Mistakes

Mistake Why it is wrong What to do instead
Treating the whisker endpoints as always the min and max They reach the min/max only when no outliers exist Check whether any outliers were plotted separately
Confusing Q1 with the minimum Q1 is the 25th percentile, not the smallest value The left edge of the box is Q1; the whisker extends further left
Saying the box shows the full range The box spans only the middle 50% (IQR) The range is from the minimum to the maximum, including whiskers and outliers
Automatically deleting potential outliers Outliers may be real observations with important information Investigate the cause before deciding whether to exclude the value
Comparing box plots drawn on different scales Visual comparison is meaningless without a common axis Always use a shared numerical axis when comparing groups
Claiming a box plot proves normality A symmetric-looking box plot is consistent with normality but does not confirm it Use a Q-Q plot or a formal normality test
Ignoring the quartile method Different methods (Excel, R, Python) give slightly different Q1 and Q3 Note which method your software uses and stay consistent

Practice Problems

Practice Problem 1

Data: 5, 9, 11, 14, 17, 20, 24, 28

Find the five-number summary, IQR, lower and upper fences, and state whether any values are potential outliers.

Show Solution
1

n = 8, even: Sorted: 5, 9, 11, 14, 17, 20, 24, 28

2

Median: (14 + 17) / 2 = 15.5

3

Q1: Median of 5, 9, 11, 14 = (9 + 11) / 2 = 10

4

Q3: Median of 17, 20, 24, 28 = (20 + 24) / 2 = 22

5

IQR: 22 − 10 = 12 | Lower Fence: 10 − 18 = −8 | Upper Fence: 22 + 18 = 40

Five-number summary: 5, 10, 15.5, 22, 28. IQR = 12. No potential outliers (all values between −8 and 40).

Practice Problem 2

Data: 2, 4, 4, 5, 7, 8, 9, 11, 45

Calculate IQR and the fences. Is the value 45 a potential outlier? What would the right whisker endpoint be?

Show Solution
1

n = 9, odd: Median is 5th value = 7

2

Lower half (excluding median): 2, 4, 4, 5. Q1 = (4 + 4) / 2 = 4

3

Upper half (excluding median): 8, 9, 11, 45. Q3 = (9 + 11) / 2 = 10

4

IQR: 10 − 4 = 6 | Lower Fence: 4 − 9 = −5 | Upper Fence: 10 + 9 = 19

5

45 > 19, so 45 is a potential outlier. Right whisker extends to 11 (largest non-outlier value).

IQR = 6. Upper Fence = 19. Value 45 is a potential outlier. Whisker reaches 11; 45 is plotted as a separate point.

Frequently Asked Questions

A box plot is a graph that displays the distribution of a numerical data set using five values: the minimum, first quartile (Q1), median, third quartile (Q3), and maximum. A rectangular box spans Q1 to Q3, with a line at the median. Lines called whiskers extend outward to the most extreme non-outlier values, and any potential outliers appear as individual points beyond the whiskers.

The box represents the interquartile range (IQR), which is Q3 minus Q1. It covers the middle 50% of all observations. Half of all data points lie within the box. The line inside the box marks the median.

In a modified box plot (the standard type), each whisker extends to the most extreme observed value that is not classified as a potential outlier under the 1.5 x IQR rule. The left whisker reaches the smallest value above the lower fence, and the right whisker reaches the largest value below the upper fence. Values outside the fences are plotted as individual points.

Calculate IQR = Q3 − Q1. Then compute the lower fence as Q1 − 1.5(IQR) and the upper fence as Q3 + 1.5(IQR). Any observation below the lower fence or above the upper fence is classified as a potential outlier. It is shown as a separate point in the plot, beyond the whisker endpoint.

Yes. Two data sets with very different shapes, frequency patterns, or even different values can sometimes share the same five-number summary, producing identical box plots. This is one of the key limitations of the format. A box plot hides individual values and cannot reveal bimodality or fine distributional structure.

Multiple mathematical conventions for computing quartiles exist, and software packages implement different ones. Excel, R, Python (NumPy), and various textbooks can produce slightly different Q1 and Q3 for the same data set. The differences are usually small and disappear as sample size grows, but for small data sets they can be noticeable. This calculator uses the median-of-halves method, which is the convention most commonly taught in introductory statistics courses.

In a box plot that is consistent with a right-skewed (positively skewed) distribution, the median tends to sit closer to Q1 than to Q3, and the upper whisker or potential outlier region extends further than the lower side. This reflects the asymmetry of the distribution, where a longer tail extends to the right. Income data is a common real-world example. Keep in mind that box plot geometry suggests skewness rather than proving it definitively.

Box plots work best when you want to compare the distribution of a numerical variable across multiple groups, or when you need a compact summary of center, spread, and potential outliers. Histograms are better when you want to see the full shape of a single distribution, including whether it has one peak or two, where gaps occur, and how steeply it rises or falls. For many purposes the two charts complement each other rather than compete.

Box plots sit within the broader field of descriptive statistics. Related topics that extend what you can do with the concepts covered here include: