Uni-Sine
MathematicsStatistics

Box plot calculator

A box plot calculator turns a list of numbers into a box and whisker plot and its five-number summary: the smallest value, the lower quartile Q1, the median, the upper quartile Q3 and the largest value. The box runs from Q1 to Q3 with a line at the median, and the whiskers reach out to the smallest and largest values that are not outliers. Our Box Plot Maker draws up to four box plots on one axis, finds outliers with the 1.5 × IQR rule, and compares the sets in plain words.

It opens with two classes' test scores side by side, so you can see a comparison straight away. Clear the table to enter your own data.

Try it

Box Plot Maker

Draw box plots and compare quartiles and outliers

Go to its page

How to use the box plot calculator

  1. Under Data, type or paste your values into the table, one data set per column. Up to four sets of up to 150 values each.
  2. Under Data sets, give each set a name, such as Class A, so the plot and the comparison are labelled.
  3. Choose a Quartile rule: Median of each half, Position (n + 1)/4, or Position (n − 1)/4 + 1. Different textbooks and software use different rules, and the calculator states the one it is using.
  4. Turn on Mark the mean if you want the mean shown on each box.
  5. Read the plot, the summary of each data set, and the working: the quartiles, the IQR and the outlier fences.

Outliers are drawn as separate points beyond the whiskers. With two or more sets, the calculator writes a sentence on which set has the higher median and which is more spread out. Practice and help sets questions on whether a value is an outlier, with worked solutions.

How to make a box plot by hand

  1. Put the data in order from smallest to largest.
  2. Find the median, the middle value. With an even number of values, it is halfway between the middle two.
  3. Find Q1, the median of the lower half, and Q3, the median of the upper half. When n is odd, leave the median out of both halves.
  4. Work out the interquartile range, IQR = Q3 − Q1, and the fences: Q1 − 1.5 × IQR and Q3 + 1.5 × IQR. Any value outside the fences is an outlier.
  5. Draw a scale, a box from Q1 to Q3, a line at the median, and whiskers to the smallest and largest values that are not outliers. Mark outliers with a cross or a dot.

Worked examples you can check in the calculator

Example 1: an odd number of values, with an outlier

Eleven runners finish a race in these times, in minutes: 12, 15, 18, 21, 22, 25, 27, 30, 31, 35, 58. The median is the 6th value, 25. The lower half is 12, 15, 18, 21, 22, so Q1 = 18; the upper half is 27, 30, 31, 35, 58, so Q3 = 31.

\text{IQR} = 31 - 18 = 13 \qquad \text{fences: } 18 - 19.5 = -1.5,\ \ 31 + 19.5 = 50.5

58 is above 50.5, so it is an outlier. The upper whisker stops at 35, the largest value that is not an outlier, and 58 is drawn as a separate point.

SmallestQ1MedianQ3LargestIQROutliers
12182531581358

Type the times into one column with Median of each half chosen. The calculator gives the same summary and lists 58 as an outlier.

Example 2: an even number of values

For 4, 7, 9, 10, 12, 15, 16, 21, the median is halfway between 10 and 12, so 11. The lower half is 4, 7, 9, 10, so Q1 = (7 + 9) ÷ 2 = 8; the upper half is 12, 15, 16, 21, so Q3 = (15 + 16) ÷ 2 = 15.5. The IQR is 7.5, and the fences are −3.25 and 26.75, so there are no outliers and the whiskers run to 4 and 21.

Example 3: why quartiles can differ

Change the quartile rule for Example 2 and the quartiles move, while the median stays at 11:

Quartile ruleQ1Q3IQR
Median of each half815.57.5
Position (n + 1)/4, like QUARTILE.EXC in Excel7.515.758.25
Position (n − 1)/4 + 1, like QUARTILE.INC in Excel8.515.256.75

None of them is wrong. Use the rule your course or exam board uses; most school courses use the median of each half. If your answer is slightly off from a textbook's, the quartile rule is the usual reason.

Check yourself:

practice
Pick an answer, then check it.
A data set has Q1 = 20 and Q3 = 32. Which of these values is an outlier by the 1.5 × IQR rule?

Comparing box plots

Box plots make two data sets easy to compare. The calculator's opening example has test scores for two classes:

ClassQ1MedianQ3IQROutliers
Class A50.557.564.514None
Class B4958671896

Compare a measure of average and a measure of spread, in context. The calculator says: Class B has the higher median, 58 against 57.5, so its scores are typically slightly higher, and Class A has the smaller IQR, 14 against 18, so its scores are more consistent. The outlier of 96 in Class B does not affect the median or the IQR, which is why box plots use them.

What the calculator does not do

  • It needs the raw data. You cannot type a five-number summary to draw from. If that is all you have, draw the plot by hand from the five values.
  • One outlier rule. It uses the 1.5 × IQR fences. Some courses use 2 standard deviations from the mean instead; work that by hand.
  • No grouped data. For a frequency table with class intervals, estimate the quartiles from a cumulative frequency graph: see our cumulative frequency guide.

Common mistakes

  • Not ordering the data first. Quartiles only make sense on sorted values.
  • Drawing whiskers to an outlier. A whisker ends at the last value inside the fences, and the outlier gets its own mark.
  • Comparing only the medians. A full comparison mentions spread too, using the IQR or range, and says what it means in context.
  • Reading the box as half the values in each part. Each of the four parts, two whiskers and two halves of the box, holds about a quarter of the data, whatever its length.
  • Thinking a longer whisker means more values. It means the values are more spread out in that quarter, not that there are more of them.

Practise statistics in a short timed paper

Box plots, quartiles and the IQR come up in AP Statistics practice, and in GCSE Maths Higher and A-level Maths: Statistics in the UK. Each daily paper is a short timed paper of 8 questions worth 25 to 35 marks, and the papers mix topics. For the mean, median and mode on their own, see our mean, median and mode calculator guide.

Common questions

How do you make a box plot?
Order the data, find the median, the quartiles Q1 and Q3, and the smallest and largest values. Draw a box from Q1 to Q3 with a line at the median, and whiskers out to the smallest and largest values that are not outliers.
What is the five-number summary?
The smallest value, the lower quartile Q1, the median, the upper quartile Q3 and the largest value. A box plot draws all five.
How do you find outliers on a box plot?
Work out IQR = Q3 − Q1. Any value below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR is an outlier.
What is the interquartile range?
Q3 − Q1, which measures how spread out the central 50% of values are. Unlike the range, outliers do not affect it.
Why do different calculators give different quartiles?
They use different quartile rules. For small data sets the median of each half, (n + 1)/4 and (n − 1)/4 + 1 rules can all give different answers. The calculator lets you choose.
What does a box and whisker plot show?
The centre (the median), the spread (the IQR and the range), how symmetric the data is, and any outliers.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Box Plot Maker

    Draw box plots and compare quartiles and outliers

    Open the tool
  • Test it

    AP Statistics

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
  • Test it

    Geometry, Algebra 2 & SAT Math

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · StatisticsP-value calculator: z, t and chi-square testsFree p-value calculator: run a z, t, chi-square or F test from your data or summary values and get the p-value, the critical value and a plain conclusion.