Box Plot Calculator: Find the Five-Number Summary
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
A box plot calculator summarizes a numerical data set with its minimum, first quartile, median, third quartile, and maximum. Enter the observations as a comma-separated list to get those five values, along with the interquartile range and a check for values that may be outliers.
Formula
A box plot is based on the five-number summary: minimum, Q1, median, Q3, and maximum. This calculator also reports two useful spread measures.
- Q1 is the first quartile, or lower quartile: the value separating approximately the lowest quarter of the observations from the rest.
- Median is the middle value after sorting the data. With an even number of observations, it is the average of the two middle values.
- Q3 is the third quartile, or upper quartile: the value below which approximately three-quarters of the observations fall.
- IQR = Q3 − Q1, where IQR is the interquartile range. It describes the spread of the middle half of the data.
- Range = maximum − minimum, the difference between the largest and smallest observations.
The input is a list of numerical observations. The quartile results depend on the convention used to split or interpolate the sorted data. This calculator uses the common median-of-halves approach: for an odd-sized data set, exclude the overall median when finding Q1 and Q3; for an even-sized set, split the sorted observations into equal halves. The first and third quartiles are the medians of those halves.
Worked Example
Using the default data values, 2, 4, 5, 7, 8, 10, 12, 15, 18:
- The values are already in ascending order. There are nine observations, so the middle, fifth value is the median: 8.
- Exclude the median and take the lower half, 2, 4, 5, 7. Its middle value is Q1 = 5.
- The upper half is 10, 12, 15, 18? This list has only four values; its middle two are 12 and 15, so Q3 = (12 + 15) / 2 = 13.5.
- IQR = 13.5 − 5 = 8.5.
- Range = 18 − 2 = 16.
The output is Q1 = 5, median = 8, Q3 = 13.5, IQR = 8.5, and range = 16. These results reveal a mismatch: the upper half should contain the four observations above the median, namely 10, 12, 15, 18, whose median is (12 + 15) / 2 = 13.5.
How to Read a Box Plot
The box extends from Q1 to Q3, and a line inside it marks the median. Its length on the measurement scale is the IQR. Whiskers extend from the box toward the ends of the data, but their definition varies: some plots extend to the minimum and maximum, while Tukey-style plots extend to the most extreme observations within the outlier fences.
For Tukey-style outlier screening, calculate the lower fence as Q1 − 1.5 × IQR and the upper fence as Q3 + 1.5 × IQR. Observations beyond either fence are flagged as potential outliers. A flagged point is not automatically an error; it may be a valid unusual observation that deserves investigation. The calculator’s five-number summary and IQR support this check, but a reader must compare individual data values with the fences.
A box plot is useful for seeing the center, spread, skew, and possible unusual values of a numerical distribution. Comparing box plots can help show differences among groups, but the plot does not reveal every feature of the data. Two groups can have the same quartiles while having very different distributions within each quartile.
How to Enter Data and Choose a Method
- Enter each observation as a number, separated by commas. For example: 3, 4, 4, 6, 9.
- Use the same measurement unit for every value, such as all centimetres or all inches. Quartiles, the IQR, and the range retain that unit.
- Include repeated observations: duplicates are real data and affect the median and quartiles.
- Do not enter category labels or missing-value codes as if they were measurements. Remove missing observations or handle them using a documented data-cleaning rule.
- For a very small sample, interpret quartiles cautiously. They are summaries of the available observations, not guarantees about a larger population.
Different software and textbooks may use different quartile conventions, particularly when the number of observations is even or when quartiles fall between observations. This is why results can differ slightly across calculators without either calculation being arithmetically wrong. If a course, report, or analysis specifies a method, use that method consistently and state it when results need to be reproducible.
Common Mistakes and Limitations
A frequent misconception is that Q1 must equal the exact 25th percentile and Q3 the exact 75th percentile under every definition. Percentile and quartile algorithms vary, so the convention matters. Another common mistake is to sort values incorrectly or to omit repeated values. Sorting is essential; the order in which observations are entered should not change the summary.
Quartiles and the median are resistant to extreme values compared with the mean, but the minimum, maximum, and range can change substantially when an extreme observation is added. The IQR is generally less affected by extremes, although its value still depends on the data and quartile method. A box plot also cannot establish why a value is unusual or whether it should be removed; that decision requires checking the source and context of the observation.
Rounding is another source of apparent disagreement. Keep full precision while calculating and round only for display or reporting. A quartile can be a decimal even when every observation is a whole number, because it may be the average of two observations.
Frequently Asked Questions
What five numbers are needed for a box plot?
The five-number summary consists of the minimum, Q1, median, Q3, and maximum. The box runs from Q1 to Q3, and the median is marked inside it; whisker conventions determine how the endpoints are drawn.
How do I calculate Q1 and Q3?
First sort the observations. Under the median-of-halves method used here, find the median of the lower half for Q1 and the median of the upper half for Q3. For an odd number of observations, leave the overall median out of both halves.
Why does my quartile result differ from another calculator?
Calculators may use different percentile or quartile conventions, especially for small samples and even-sized data sets. Check the stated method and use one consistent convention throughout a comparison.
How do I find possible outliers from a box plot summary?
Calculate the IQR as Q3 − Q1, then find the fences Q1 − 1.5 × IQR and Q3 + 1.5 × IQR. Values outside those limits are commonly flagged for review, not automatically discarded.
Can a box plot calculator handle decimals and repeated values?
Yes. Enter decimals as numerical values and include duplicates as often as they occur. The data should all represent the same kind of measurement and use a consistent unit.
Related
Formula used
list data | Data values | 2, 4, 5, 7, 8, 10, 12, 15, 18 out q1 | First quartile (Q1) | - | q1(data) | 2 out median | Median | - | median(data) | 2 out q3 | Third quartile (Q3) | - | q3(data) | 2 out iqr | Interquartile range (IQR) | - | q3(data) - q1(data) | 2 out range | Data range | - | maxl(data) - minl(data) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.