A box plot shows the five-number summary — minimum, Q1, median, Q3 and maximum — with a box from Q1 to Q3 and whiskers out to the extremes; values more than 1.5 × IQR beyond the box are outliers. Paste your numbers into this box plot maker to get the five-number summary, interquartile range, 1.5 × IQR fences, a list of outliers, the mean and standard deviation, and a box and whisker plot drawn to scale.
By default quartiles use the textbook median-of-halves method taught in OpenStax Introductory Statistics. Because different books and software define quartiles differently, you can switch to the NIST default or the Excel/R method and see the numbers change.
How to use the box plot maker
- Paste or type your data. Commas, spaces, tabs and line breaks all work, so a spreadsheet column pastes straight in.
- Optionally paste a second data set to compare two groups on one scale.
- Choose the quartile method (leave the default for most homework; pick an Excel option to match a spreadsheet).
- Read the five-number summary and the box plot. Outliers are circled; extreme ones (beyond 3 × IQR) get a bigger circle.
- Copy the link to share the exact data set and plot.
Five-number summary and IQR formulas
- Median (Q2): the middle value of the sorted data, or the mean of the two middle values when n is even.
- Q1 and Q3: the medians of the lower and upper halves (OpenStax). With odd n the median belongs to neither half.
- IQR = Q3 − Q1, the spread of the middle 50%.
- Inner fences: Q1 − 1.5 × IQR and Q3 + 1.5 × IQR. Outer fences: Q1 − 3 × IQR and Q3 + 3 × IQR (NIST e-Handbook §1.3.3.7).
- Outlier: a value outside the inner fences — the OpenStax 1.5 × IQR rule.
Why quartile methods give different answers
The NIST e-Handbook (§7.2.6.2) says plainly that there is no universally accepted way to compute percentiles. Its default sets p(N + 1) = k + d and interpolates between the k-th and (k+1)-th sorted values (Hyndman–Fan method R6); Excel sets 1 + p(N − 1) = k + d (method R7). The table shows Q1 and Q3 from each method for two small data sets and the example data below:
| Data | Median of halves (textbook / OpenStax) | NIST default / Excel QUARTILE.EXC: p(n+1) | Excel QUARTILE.INC / R: 1+p(n−1) |
|---|---|---|---|
| 1, 2, …, 8 | Q1 2.5 · Q3 6.5 | Q1 2.25 · Q3 6.75 | Q1 2.75 · Q3 6.25 |
| 1, 2, …, 9 | Q1 2.5 · Q3 7.5 | Q1 2.5 · Q3 7.5 | Q1 3 · Q3 7 |
| Example data (n = 12) | Q1 17.5 · Q3 26 | Q1 17.25 · Q3 26.5 | Q1 17.75 · Q3 25.5 |
The median is the same in every method. Differences shrink as n grows, and they rarely change which points are outliers — but if your teacher or software expects one method, match it.
Worked example: even number of values
Data (n = 12): 12, 15, 17, 18, 20, 21, 22, 24, 25, 27, 29, 48.
- Median = average of the 6th and 7th values = (21 + 22) ÷ 2 = 21.5.
- Lower half 12, 15, 17, 18, 20, 21 → Q1 = 17.5. Upper half 22, 24, 25, 27, 29, 48 → Q3 = 26.
- IQR = 26 − 17.5 = 8.5; 1.5 × IQR = 12.75.
- Fences: 17.5 − 12.75 = 4.75 and 26 + 12.75 = 38.75.
- Outliers: 48. The upper whisker stops at 29.
Five-number summary: 12, 17.5, 21.5, 26, 48. Mean = 23.1667, pulled above the median of 21.5 by the outlier.
Worked example: odd number of values
Data: 3, 7, 8, 5, 12, 14, 21, 13, 18. Sorted: 3, 5, 7, 8, 12, 13, 14, 18, 21 (n = 9). The median is the 5th value, 12, and it is left out of both halves. Q1 = median of 3, 5, 7, 8 = 6; Q3 = median of 13, 14, 18, 21 = 16. IQR = 10, fences -9 and 31, outliers: none. Five-number summary: 3, 6, 12, 16, 21.
Quartile calculator: match your software
If you are checking homework or a spreadsheet, pick the method that matches the tool you are comparing against. Microsoft's documentation examples reproduce exactly here:
- Excel QUARTILE.EXC = NIST default p(n + 1). Microsoft's example 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49 gives Q1 = 15 and Q3 = 43; the median-of-halves method gives 15 and 43 for the same data.
- Excel QUARTILE.INC = 1 + p(n − 1), also R's default. Microsoft's example 1, 2, 4, 7, 8, 9, 10, 12 gives Q1 = 3.5.
- Median of halves is the textbook rule in OpenStax and most introductory courses.
The same formulas drive the percentile rank calculator, so the 25th and 75th percentiles there equal Q1 and Q3 here under the NIST or Excel option. The sample standard deviation shown in the results divides by n − 1, as OpenStax §2.7 specifies for sample data; for a fuller spread summary with variance and population SD, use the average and standard deviation calculator.
Comparing two groups with side-by-side box plots
Box plots are at their most useful when you compare groups. Paste a second data set and both are drawn on one shared scale. Example: two classes' test scores. Class A 62, 68, 71, 74, 75, 77, 79, 81, 84, 90 has five-number summary 62, 71, 76, 81, 90 (IQR 10); class B 55, 60, 66, 70, 78, 80, 85, 88, 93, 97 has 55, 66, 79, 88, 97 (IQR 22). The medians are close (76 vs 79), but class B's box is 2.2 times as wide: its scores are far more spread out, with both the weakest and the strongest results. A table of means alone would hide that difference.
Box and whisker plot generator and calculator
"Box plot" and "box and whisker plot" are the same chart, so this page works as a box and whisker plot generator and a box and whisker calculator in one. Paste the data and the tool calculates the five-number summary, IQR and fences, then draws the box and whiskers to scale with outliers marked. It handles any count from a single value upwards, decimals and negative numbers, and two groups at once on a shared axis. Copy the link to save or share the exact plot. Every value in the chart is also listed in the results, so you can copy the numbers into homework or a report.
To see every individual value as well as the summary, put the same numbers into the stem and leaf plot maker. It uses the same median-of-halves quartiles, so Q1, the median and Q3 match this box plot exactly.
How to read a box and whisker plot
- Centre: the median line. Compare medians of two groups to compare typical values.
- Spread: the box width (IQR) and whisker length. A wider box means more variable middle data.
- Skew: a longer right whisker or a median closer to Q1 means right (positive) skew.
- Outliers: isolated dots. Check them for data-entry errors before removing anything — an outlier can be the most important point.
Common mistakes
- Not sorting first. Quartiles are positions in sorted data.
- Including the median in both halves when n is odd. The textbook method excludes it; some calculators include it, which shifts Q1 and Q3.
- Drawing whiskers to outliers. When you mark outliers separately, whiskers end at the last value inside the fences.
- Calling every flagged point an error. The 1.5 × IQR rule flags potential outliers; it isn’t proof something is wrong.
Choosing a t, chi-square or F table next? Find the right value with the degrees of freedom calculator. Estimate a value between two data points with the interpolation calculator, work out class averages with the grade calculator, or predict your score with the AP Statistics score calculator.
Frequently asked questions
What is the five-number summary?
Minimum, first quartile (Q1), median, third quartile (Q3) and maximum — the five values OpenStax says a box plot is built from. For 12, 15, 17, 18, 20, 21, 22, 24, 25, 27, 29, 48 it is 12, 17.5, 21.5, 26, 48.
How do you find Q1 and Q3?
Sort the data and find the median. Q1 is the median of the lower half and Q3 the median of the upper half (OpenStax’s definition). With an odd count, leave the overall median out of both halves. Software may use an interpolation formula instead, so answers can differ slightly.
How do you find outliers using the IQR?
Compute IQR = Q3 − Q1. A value below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR is a potential outlier (OpenStax §2.3; NIST calls these the inner fences). In the example data IQR = 8.5, the fences are 4.75 and 38.75, so 48 is an outlier. NIST adds outer fences at 3 × IQR; points beyond them are extreme outliers. The rule flags values to check, not values to delete automatically.
Why does my calculator give a different Q1 or Q3?
There are several quartile definitions. NIST notes there is no universally accepted way to interpolate percentiles; Hyndman and Fan compared nine. Excel’s QUARTILE.INC uses method R7, NIST’s default is R6, and textbooks often use the median-of-halves rule. For 1–8 they give Q1 = 2.75, 2.25 and 2.5. Pick the method your class or software uses.
What do the whiskers on a box plot show?
In a basic box plot the whiskers run from the box to the minimum and maximum (OpenStax). When outliers are shown separately — as in this box plot maker and NIST’s box plot with fences — each whisker stops at the most extreme value still inside the 1.5 × IQR fence.
How do you make a box and whisker plot?
Find the five-number summary. Draw a number line, a box from Q1 to Q3 with a line at the median, then whiskers out to the smallest and largest non-outlier values, and mark any outliers as dots. Or paste your data above and the plot is drawn for you.
What does the box in a box plot represent?
The middle 50% of the data, from Q1 to Q3. Its width is the IQR. A median line off-centre in the box, or one whisker much longer than the other, suggests skew.
Which quartile method does Excel use?
Excel has two. QUARTILE.INC matches the “Excel QUARTILE.INC / R” option here (Hyndman–Fan R7); QUARTILE.EXC matches the NIST default p(n + 1) (R6). Microsoft’s own examples check out: QUARTILE.EXC of 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49 gives Q1 = 15 and Q3 = 43, and QUARTILE.INC of 1, 2, 4, 7, 8, 9, 10, 12 gives Q1 = 3.5.
How do you calculate the IQR?
Subtract the first quartile from the third: IQR = Q3 − Q1. For the example data, 26 − 17.5 = 8.5. The IQR is the width of the box and the basis of the 1.5 × IQR outlier fences. Because Q1 and Q3 depend on the quartile method, so does the IQR.
Is Q1 the same as the 25th percentile?
Yes. Q1 is the 25th percentile, the median the 50th and Q3 the 75th — Microsoft describes QUARTILE.INC(…, 1) as the first quartile (25th percentile). The percentile rank calculator on this site uses the same NIST and Excel formulas, so its 25th and 75th percentiles match Q1 and Q3 here when you pick the same method.
How do you compare two box plots?
Put them on the same scale — paste a second data set into this maker and both are drawn on one axis. Compare the medians first (typical value), then the box widths (IQR, spread of the middle half), then the whiskers and outliers. If the boxes don’t overlap at all, the groups clearly differ; heavy overlap means the difference in medians is small relative to the spread.
Does the mean appear on a box plot?
Not in the standard five-number box plot. This maker adds the mean as a small diamond so you can compare it with the median: a mean well above the median points to right skew or high outliers.
Sources & method
- NIST/SEMATECH e-Handbook of Statistical Methods §1.3.3.7 — Box plot (quartiles, 1.5 and 3 × IQR fences, whiskers)
- NIST/SEMATECH e-Handbook §7.2.6.2 — Percentiles (p(N+1) method, Hyndman–Fan R6/R7/R8, Excel)
- OpenStax Introductory Statistics 2e §2.3 — Measures of the location of the data (quartiles, IQR, 1.5 × IQR outlier rule)
- OpenStax Introductory Statistics 2e §2.4 — Box plots (five values, whiskers)
- OpenStax Introductory Statistics 2e §2.7 — Measures of the spread of the data (sample standard deviation, n − 1)
- Microsoft Support — QUARTILE.EXC function (example: Q1 = 15, Q3 = 43)
- Microsoft Support — QUARTILE.INC function (example: Q1 = 3.5)
Results are estimates for general information. Found an error? It helps everyone — see our methodology.