Home / Tools / Box Plot Calculator
Box Plot Calculator
A box plot turns a batch of numbers into a picture of its five-number summary: the box holds the middle 50% from Q1 to Q3, a line marks the median, whiskers reach the data still within 1.5 times the IQR, and anything past that is drawn as an outlier. Paste one group, or several named groups, and this calculator returns each five-number summary and draws the boxes side by side. Quartiles use R's default type-7 rule, with matching R code.
I want to compare several groups side by side
One group per line as Label: values. Values can be separated by commas, spaces or tabs.
-
| Group | n | Min | Q1 | Median | Q3 | Max | IQR | Outliers |
|---|
How these numbers are computed
✓ No data leaves your browser
✓ Verified against R's quantile(), IQR(), fivenum() and boxplot.stats()
✓ Free, no sign-up
Reading a box plot, part by part
Every mark on a box plot stands for a number in the five-number summary. Once you know which is which, the plot is a fast read of center, spread and shape, and a comparison of groups becomes a glance.
The box spans the first quartile to the third quartile, so it holds the middle 50% of the data. Its height is the interquartile range, IQR = Q3 minus Q1, a measure of spread that a few extreme values cannot inflate. A tall box means the middle of the data is spread out; a short box means it is tightly packed.
The line inside the box is the median, the 50th percentile. Where it sits inside the box tells you about skew: a median near the bottom points to a longer upper tail, a median near the top points to a longer lower tail, and a centered line suggests a symmetric middle.
Each whisker reaches to the most extreme value still within 1.5 times the IQR of the box. Values past that fence are drawn as separate points: outliers. The whiskers are not the min and max unless the min and max happen to sit inside the fences.
What each mark means, and its R call
| Mark | What it shows | In R |
|---|---|---|
| Box edges (Q1, Q3) | The 25th and 75th percentiles, the middle-50% band. | quantile(x, c(.25, .75)) |
| Median line | The 50th percentile, robust to extreme values. | median(x) |
| Box height (IQR) | Q3 minus Q1, the spread of the central half. | IQR(x) |
| Five-number summary | Minimum, Q1, median, Q3, maximum. | quantile(x) |
| Whisker ends | Most extreme values inside the 1.5 IQR fences. | boxplot.stats(x)$stats |
| Outlier points | Values beyond a fence, drawn separately. | boxplot.stats(x)$out |
The five-number summary and quartiles use R's type-7 rule, the default of quantile() and summary() and the same hinges ggplot2::geom_boxplot() draws. Base R's boxplot() and fivenum() use Tukey's hinges, which can differ by a fraction of a data step, but the flagged outliers match boxplot.stats(x)$out exactly.
Frequently asked questions
What is a five-number summary?
It is the minimum, Q1, the median, Q3 and the maximum. That is exactly what a box plot draws: the box spans Q1 to Q3 with a line at the median, and the whiskers reach toward the min and max, stopping at the last value still inside the 1.5 times IQR fences. This calculator reports the five numbers using R's default type-7 quartiles.
How do I make a box plot from data?
Sort the data, find Q1, the median and Q3, and draw a box from Q1 to Q3 with a line at the median. Extend a whisker from each box edge to the most extreme value still within 1.5 times the IQR, and draw any value beyond that as its own point. Paste one column or several named groups above and the calculator draws the box, whiskers and outliers for you.
How does the box plot flag outliers?
By the 1.5 times IQR rule. Build a lower fence at Q1 - 1.5*IQR and an upper fence at Q3 + 1.5*IQR. Any value past a fence is drawn as an outlier point instead of being reached by a whisker. This is the same set of points as boxplot.stats(x)$out in R.
How do I paste several groups to compare?
Switch to the compare-groups mode and put each group on its own line as a label, a colon, then its numbers, for example Group A: 12, 15, 18. The calculator draws one box per group side by side on a shared axis and gives a five-number summary for each. Tidy two-column data (a value column and a group column) works too.
Which quartile method does the box use, and does it match R?
The quartiles and five-number summary use R's type-7 rule, the same as quantile(x) and summary(x) with no type argument, which is also what ggplot2::geom_boxplot() draws. Base R's boxplot() and fivenum() build the box from Tukey's hinges, a slightly different rule, but across every test dataset the flagged outliers match boxplot.stats(x)$out exactly.
Why does the median line sit off-center in the box?
An off-center median signals skew. If the median hugs the bottom of the box, the lower part of the middle 50% is more compressed and the distribution has a longer upper tail (right skew); a median near the top means the reverse. A centered median suggests a roughly symmetric middle half.