Box Plot Generator
Paste the numbers and the box plot generator draws the plot and the figures behind it. It also says which quartile method it used, because four common ones give four different boxes on small data.
Five-number summary, A
- A: count
- 12
- A: five-number summary Minimum, Q1, median, Q3, maximum: the five numbers the box and whiskers draw.
- 12, 17.5, 21.5, 26, 48
- A: interquartile range (IQR) Q3 - Q1 = 26 - 17.5: the width of the box, holding the middle half of the data. Tukey's hinges.
- 8.5
- A: fences Q1 - 1.5 x IQR and Q3 + 1.5 x IQR. Tukey's rule: anything outside them is flagged as a possible outlier.
- 4.75 and 38.75
- A: outliers Outside the fences. A flag to look at, not a verdict to delete: check each for a typo or a different population before dropping it.
- 48
- A: whiskers To the most extreme values still inside the fences. These are data values, not the fences themselves.
- 12 to 29
- A: mean Above the median of 21.5, pulled up by the high values. The median is the better center for skewed data; the mean is the diamond in the plot.
- 23.1667
- B: count
- 11
- B: five-number summary Minimum, Q1, median, Q3, maximum: the five numbers the box and whiskers draw.
- 14, 22, 26, 29, 35
- B: interquartile range (IQR) Q3 - Q1 = 29 - 22: the width of the box, holding the middle half of the data. Tukey's hinges.
- 7
- B: fences Q1 - 1.5 x IQR and Q3 + 1.5 x IQR. Tukey's rule: anything outside them is flagged as a possible outlier.
- 11.5 and 39.5
- B: outliers Nothing falls outside the fences.
- none
- B: whiskers To the most extreme values still inside the fences. These are data values, not the fences themselves.
- 14 to 35
- B: mean Close to the median of 26: the middle of the data is roughly symmetric.
- 25.4545
- Medians compared B's median sits inside A's box, but A's median is outside B's: they overlap, and B runs higher. A box plot comparison is visual; whether a difference in centers is more than noise is a question for a test.
- B is 4.5 higher
| Method | A: Q1 | A: Q3 | A: IQR | B: Q1 | B: Q3 | B: IQR |
|---|---|---|---|---|---|---|
| Tukey's hinges (used) | 17.5 | 26 | 8.5 | 22 | 29 | 7 |
| Halves, median excluded (TI-84) | 17.5 | 26 | 8.5 | 21 | 30 | 9 |
| Inclusive (Excel QUARTILE.INC) | 17.75 | 25.5 | 7.75 | 22 | 29 | 7 |
| Exclusive (Excel QUARTILE.EXC) | 17.25 | 26.5 | 9.25 | 21 | 30 | 9 |
- The four quartile methods converge as the data grow; on a dozen values they can move the box by a whole step. If your answer must match a textbook, a calculator or a spreadsheet, pick its method from the list.
- A box plot hides the shape inside the box. Two peaks, a gap, or a cluster at one value all draw the same box, so look at the raw values or a histogram before reading much into it.
- With fewer than about five values the quartiles are barely defined and the plot is mostly the data itself.
How the Box Plot Generator works
A box plot draws five numbers: the minimum, the first quartile (Q1), the median, the third quartile (Q3) and the maximum. The box runs from Q1 to Q3 and holds the middle half of the data; the line inside it is the median; the whiskers reach out toward the extremes. It is the most compact honest picture of a distribution: where the middle is, how wide it is, whether it leans one way, and which values sit far from the rest.
For the default data set A, twelve values from 12 to 48, the median is the average of the sixth and seventh values, 21 and 22, so 21.5. Q1 is the median of the lower six values, 17.5, and Q3 the median of the upper six, 26. The interquartile range (IQR) is 26 - 17.5 = 8.5.
Outliers and the whiskers. Tukey's rule puts a fence 1.5 IQRs beyond each end of the box: 17.5 - 12.75 = 4.75 below and 26 + 12.75 = 38.75 above. Anything outside a fence is drawn as a separate dot and flagged as a possible outlier, and each whisker stops at the most extreme value still inside its fence: here 12 and 29, with 48 plotted on its own. The 1.5 is a convention Tukey chose, not a law: for normally distributed data it flags about 0.7% of values, so a dot is worth a second look but not automatic deletion. The other common style runs the whiskers all the way to the minimum and maximum, which is simpler and lets one stray value stretch the plot.
Why your box might not match someone else's. There is no single definition of a quartile, and the common ones disagree on small data. On data set A, Tukey's hinges (the medians of the two halves) give Q1 = 17.5 and Q3 = 26. Excel's QUARTILE.INC, which Google Sheets and R's default share, interpolates between values and gives 17.75 and 25.5. Excel's QUARTILE.EXC, the convention in Minitab and SPSS, interpolates at slightly wider positions and gives 17.25 and 26.5. Three methods, three boxes, from the same twelve numbers. For an odd count the split differs again: TI-83 and TI-84 calculators, and many textbooks, leave the median out of both halves, while Tukey's original hinges include it in both. Data set B has eleven values and shows it: Q1 is 22 with the median included and 21 with it excluded. None of these is wrong. They converge as the data grow, and on a few hundred values the difference is invisible, but on a homework problem it decides whether the answer matches the key. Pick the method your course, calculator or spreadsheet uses; the table under the result shows all four side by side.
Comparing two groups. Drawn on one scale, two box plots compare center, spread and shape at a glance. Data set B's median, 26, sits on the top edge of A's box, while A's median of 21.5 sits just below B's box: the groups overlap a good deal, but B runs higher. That is a description; whether the difference in centers is more than sampling noise is a question for a hypothesis test, such as a two-sample t test on the test statistic calculator.
What a box plot hides. The box shows where the middle half is, not how it is arranged. Data with two peaks, a gap, or a pile-up at one value can draw exactly the same box as smooth, single-peaked data. The mean is drawn as a diamond because its distance from the median is the quickest read of skew: a mean well above the median means a long upper tail. For anything beyond that, look at the values themselves.
Box Plot Generator FAQ
How do you make a box plot?
Sort the data and find five numbers: the minimum, Q1, the median, Q3 and the maximum. Draw a box from Q1 to Q3 with a line at the median. Compute the IQR (Q3 - Q1) and fences 1.5 IQRs beyond each end of the box; draw whiskers to the most extreme values inside the fences and plot anything beyond them as individual points.
Why do different calculators give different quartiles?
Because there are several definitions in use. Tukey's hinges and the TI-84 both take medians of the two halves but treat the middle value differently when the count is odd; Excel's QUARTILE.INC and QUARTILE.EXC interpolate between values at different positions. On small data sets they can differ by a whole step. Use the method your course or software uses.
How do you find outliers on a box plot?
Compute the IQR, then fences at Q1 - 1.5 x IQR and Q3 + 1.5 x IQR. Any value below the lower fence or above the upper one is a possible outlier and is drawn as a separate point. It is a flag for a closer look, not proof that the value is an error.
What does the length of the whiskers mean?
Under Tukey's rule each whisker reaches the most extreme data value within 1.5 IQRs of the box, so a long whisker means the data stretch out on that side without being extreme enough to flag. Under the min-max rule the whiskers reach the smallest and largest values.