BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Box Plot Generator

Create box-and-whisker plots instantly from your data. Enter values for one group or multiple groups — the generator calculates the five-number summary, IQR, whiskers, and outliers, then draws a publication-ready box plot with full step-by-step workings.

Box Plot Generator

IQR Q3 − Q1 Outlier fence Q1 − 1.5×IQR  |  Q3 + 1.5×IQR

Paste from Excel, type values manually, or click Load Example to see a demo.

Mode Side-by-side box plots Groups Up to 6 datasets

Enter data for each group. Each textarea accepts comma, space, or newline separated values. Use the colour-coded groups to compare distributions.

Mode Smart Illustration Generator No API 100% browser-based

Describe your box plot in plain English — mention group names, medians, ranges, and outliers. The generator parses your description and draws a polished, publication-ready SVG illustration instantly. No data entry required.

0 / 1000 characters

Try an example:

Box Plot Examples

Browse examples or generate your own above

View:

What Is a Box Plot?

A box plot, also called a box-and-whisker plot, is a standardized diagram that displays the distribution of a dataset using its five-number summary: minimum, first quartile (Q1), median (Q2), third quartile (Q3), and maximum. The rectangular "box" spans from Q1 to Q3, representing the interquartile range (IQR) — the middle 50% of the data. A line inside the box marks the median. "Whiskers" extend outward to the smallest and largest values still within 1.5 times the IQR. Any data points beyond the whisker boundaries are plotted individually as outliers.

Box plots were introduced by statistician John Tukey in his 1977 book Exploratory Data Analysis as a tool for quickly assessing shape, spread, and symmetry in a dataset. According to the NIST Engineering Statistics Handbook, box plots are especially valuable when comparing multiple datasets side by side because they condense each distribution into a compact five-number summary without losing information about center, spread, or outliers.

The Five-Number Summary

StatisticFormula / PositionPlain MeaningBox Plot Location
MinimumSmallest value ≥ lower fenceStart of left whisker (non-outlier floor)Left/bottom whisker tip
Q1 (First Quartile)Median of lower 50%25% of data falls below this valueLeft/bottom edge of box
Median (Q2)Middle value when sorted50% of data falls below this valueLine inside the box
Q3 (Third Quartile)Median of upper 50%75% of data falls below this valueRight/top edge of box
MaximumLargest value ≤ upper fenceEnd of right whisker (non-outlier ceiling)Right/top whisker tip
IQRQ3 − Q1Spread of middle 50% of dataWidth/height of the box

How to Calculate a Box Plot — Step by Step

1
Sort all values in ascending order

Arrange every data point from smallest to largest. This is the foundation for all quartile calculations.

2
Find the median (Q2)

If n is odd, the median is the middle value. If n is even, it is the average of the two middle values. This splits the dataset into a lower half and an upper half.

3
Find Q1 and Q3

Q1 is the median of the lower half (excluding the median if n is odd). Q3 is the median of the upper half. The box spans from Q1 to Q3.

4
Calculate the IQR

IQR = Q3 − Q1. This is the length of the box and measures the spread of the central 50% of data.

5
Determine whisker fences

Lower fence = Q1 − 1.5 × IQR. Upper fence = Q3 + 1.5 × IQR. These are not drawn on the plot — they define the cutoff for outliers.

6
Draw the whiskers

The lower whisker extends to the smallest data value ≥ lower fence. The upper whisker extends to the largest data value ≤ upper fence.

7
Plot outliers individually

Any values below the lower fence or above the upper fence are plotted as individual dots (or circles) beyond the whisker ends.

Worked Example

Dataset: Exam scores for 15 students: 45, 52, 58, 61, 64, 67, 70, 72, 75, 78, 80, 83, 85, 88, 105

CalculationValueWorking
Sorted data45, 52, 58, 61, 64, 67, 70, 72, 75, 78, 80, 83, 85, 88, 105n = 15
Median (Q2)72Position 8 of 15
Q161Median of positions 1–7 (lower half)
Q381.5Median of positions 9–15 (upper half)
IQR20.581.5 − 61 = 20.5
Lower fence30.2561 − 1.5 × 20.5 = 30.25
Upper fence112.2581.5 + 1.5 × 20.5 = 112.25
Lower whisker45Smallest value ≥ 30.25
Upper whisker105Largest value ≤ 112.25 → no outliers here
OutliersNoneAll values within fences

Enter this dataset into the generator above (click Load Example) to see the box plot drawn instantly.

Understanding Quartiles and the IQR

The interquartile range (IQR) is the most important single number in a box plot. It measures the spread of the middle 50% of data, making it far more resistant to outliers than the full range (Max − Min). A wide IQR box means high variability in the center of the distribution; a narrow box indicates that the middle half of values are tightly clustered.

Quartile Calculation (Inclusive Method)

n = 15 data points (sorted) Q2 = value at position (n+1)/2 = position 8 = 72 Q1 = median of lower half = positions 1–7 → pos 4 = 61 Q3 = median of upper half = positions 9–15 → pos 12 = 83 IQR = Q3 − Q1 = 83 − 61 = 22

Fence & Outlier Calculation

IQR = Q3 − Q1 Lower fence = Q1 − 1.5 × IQR Upper fence = Q3 + 1.5 × IQR Mild outlier: beyond 1.5 × IQR Extreme outlier: beyond 3.0 × IQR Whisker = most extreme non-outlier value in dataset

Interpreting Box Plot Shape and Skewness

The position of the median line within the box reveals the skewness of the distribution without computing a single number. Three patterns cover all cases:

Symmetric distribution: The median line sits roughly in the center of the box, and the whiskers are approximately equal length. The data is evenly distributed around the median. Mean ≈ median.
Right-skewed (positively skewed): The median line is closer to Q1 (left/bottom of box), the right whisker is longer, and outliers tend to appear on the right. The mean is pulled above the median by high extreme values. Common in income, house prices, and survival times.
Left-skewed (negatively skewed): The median line is closer to Q3 (right/top of box), the left whisker is longer, and outliers appear on the left. The mean is pulled below the median by low extreme values. Common in exam scores with a ceiling effect.

Box Plot vs. Histogram: When to Use Each

Both charts display distributions, but they serve different purposes. A histogram shows the full shape of a distribution using bars for frequency counts — ideal for understanding detail, detecting multimodality (two peaks), and seeing exact bin frequencies. A box plot condenses the distribution into a compact summary, making it ideal for comparing many groups side by side. Histograms are better for one-group deep analysis; box plots are better for multi-group comparison and outlier spotting.

FeatureBox PlotHistogram
Best forComparing multiple groupsDetailed shape of one group
Shows outliersYes — as individual pointsOnly indirectly (long tails)
Shows multimodalityNoYes — multiple peaks visible
Space requiredCompact — fits many groupsNeeds full panel per group
Five-number summaryYes — directly readableNo — must compute separately

Practice Problems

1. Data: 12, 15, 18, 20, 22, 24, 26, 28, 30, 35. Find Q1, Q3, IQR, and identify any outliers.
Sorted: 12, 15, 18, 20, 22, 24, 26, 28, 30, 35 (n=10)
Q2 = (22+24)/2 = 23  |  Q1 = (15+18)/2 = 16.5  |  Q3 = (28+30)/2 = 29
IQR = 29 − 16.5 = 12.5
Lower fence = 16.5 − 1.5×12.5 = −2.25  |  Upper fence = 29 + 18.75 = 47.75
No outliers — all values between −2.25 and 47.75.
2. A dataset has Q1 = 40, Q3 = 60. Which of these values is an outlier: 5, 25, 75, 95?
IQR = 60 − 40 = 20  |  Lower fence = 40 − 30 = 10  |  Upper fence = 60 + 30 = 90
5 is an outlier (below 10)  |  95 is an outlier (above 90)  |  25 and 75 are within fences.
3. A box plot shows the median very close to Q3, with a long left whisker and several outliers on the left. What does this tell you about the distribution?
The distribution is left-skewed (negatively skewed). The median is high relative to the box, the lower half of data spreads widely, and the extreme low values pull the mean below the median. This pattern is common in test scores where most students score high but a few score very low.
4. (Unsolved) Group A has a median of 50, IQR of 10. Group B has a median of 48, IQR of 25. Which group has more variability in the middle 50%? Which group's median is higher?

Related Topics

Sources & further reading:

  • NIST Engineering Statistics Handbook — Box Plots
  • Tukey, J.W. (1977). Exploratory Data Analysis. Addison-Wesley. [Origin of the box-and-whisker plot]
  • Khan Academy — Box Plot Review

Frequently Asked Questions

Box plots are used to visualize the distribution of a dataset in a compact, standardized format. They are especially useful for comparing multiple groups side by side, identifying outliers, assessing skewness, and summarizing the spread and center of data without showing every individual value. Common applications include comparing test scores across classes, treatment outcomes across clinical groups, or performance metrics across business units.

Outliers are identified using the 1.5 × IQR rule. First compute IQR = Q3 − Q1. Then calculate the lower fence (Q1 − 1.5 × IQR) and upper fence (Q3 + 1.5 × IQR). Any data point below the lower fence or above the upper fence is an outlier and is plotted as an individual dot beyond the whisker. Extreme outliers fall beyond 3 × IQR from the box edges.

The length (or height, in a vertical box plot) of the rectangular box equals the IQR — Q3 minus Q1. A wider box means more variability in the middle 50% of the data. A narrow box indicates that the central data points are tightly clustered. Comparing box widths across groups is one of the fastest ways to compare variability without computing a single number.

A violin plot combines a box plot with a kernel density estimate — the width of the violin at any point represents how many data points fall at that value. This reveals multimodal distributions (two peaks) that a box plot cannot show. Box plots are simpler and more widely understood; violin plots provide more information about the full shape of the distribution but require more space and explanation. For comparing many groups quickly, box plots are usually preferred.

In Excel 2016 and later: select your data, go to Insert → Insert Statistic Chart → Box and Whisker. Excel will calculate the five-number summary and draw the box plot automatically. In older versions, you need to compute Q1, median, Q3 and whisker lengths manually, then build a stacked bar chart and add error bars to simulate the box. Our generator above is faster and shows the full step-by-step calculation.