To find the interquartile range from a box plot, subtract the value at the bottom edge of the box (Q1) from the value at the top edge of the box (Q3): IQR = Q3 − Q1. Both quartiles are read off the same vertical or horizontal axis the plot is drawn against, so a single tick-mark comparison gives you the answer. Read carefully — the IQR is the box's length, never its whole span from whisker to whisker.
A quick example fixes the mechanics. If a vertical box runs from 18 at its lower edge to 42 at its upper edge, the interquartile range is 24. Everything else — medians, whiskers, outliers — sits around that one subtraction. What follows covers how to line up the box edges with an axis, how to tell quartiles from medians and whisker ends, how software labels and computes these values, and where readers of box plots typically go wrong.
Identify Which Edge of the Box Is Q1 and Which Is Q3
The bottom edge of a vertical box marks Q1, the 25th percentile, and the top edge marks Q3, the 75th percentile. On a horizontal box plot, the left edge is Q1 and the right edge is Q3. That orientation rule covers most plots drawn by hand or in statistical software, and it's the first thing to check before reading any number.
Quartiles divide ranked data into four groups of roughly equal size. Q1 is the value below which a quarter of the observations fall; Q3 is the value below which three-quarters fall. The box between them, sometimes drawn with a shaded band, holds the middle half of the data. That's why the box length carries statistical meaning instead of being decorative.
The median sits inside the box, usually as a thicker vertical line, a notch, or a small marker. It splits the data in half but plays no part in the IQR calculation. Treat it as a separate reading: median for typical value, box length for spread.
Before you read anything, confirm that the box is actually a box. Some diagrams label quartiles outside the rectangle, and a few pencil sketches put Q1 and Q3 marks on the whiskers. If the plot's legend or axis labels disagree with the position rule above, trust the labels and re-read the geometry.
Subtract the Two Box Edges: The IQR Calculation in Practice
Read the value of Q1 and Q3 off the axis to the precision the grid supports, then subtract. If the axis is marked every 10 units and the top of the box sits halfway between 40 and 50, record 45, not "about 45". Round only at the end, and keep the same precision for both readings so your subtraction doesn't mix scales.
One worked example on a vertical plot: the bottom edge sits at 18, the top edge at 42, so IQR = 42 − 18 = 24. A second on a horizontal plot: left edge at 65, right edge at 81, giving IQR = 16. Both results carry the units of the axis — dollars, kilograms, seconds — so quote them with the unit.
Gridline arithmetic saves time. If the box covers three major grid intervals of 10, plus one interval of 5, the IQR reads 35 without hunting for endpoint numbers. This is the practical advantage of a well-scaled plot: you can often count intervals faster than you can read two exact values.
Interpolation accuracy matters when the edges fall between ticks. Half-ticks are the realistic limit for most printed plots; anything finer is a guess dressed as a number. When precision matters more than speed, go back to the raw data or the tool that produced the plot and read the quartile values from its summary output.
What Else the Box Plot Tells You, and Why the Whiskers Aren't Part of the IQR
The IQR spans the box alone; the whiskers extend outward to show the rest of the distribution, so measuring from whisker tip to whisker tip gives you a range, not an interquartile range. Corn bread — Tukey-style — box plots draw whiskers to the most extreme observations within 1.5 × IQR of the box edges, per John Tukey's original exploratory-data conventions. Different tools draw whiskers to the minimum and maximum instead, so a whisker-tip reading is neither the IQR nor a consistent range.
Outliers appear as individual dots or asterisks beyond the whiskers. Their position alone doesn't affect the IQR, but it tells you how much data sits outside the middle half. A plot with many outliers on one side is telling you the box understates the tails, which is worth mentioning whenever you report an IQR.
Tukey's 1.5 rule produces a fence, not a verdict. A point beyond Q3 + 1.5 × IQR is flagged as a candidate outlier, and the flag is a prompt to look at the record, not a finding that it's wrong. In large samples, a scatter of dots outside that fence is normal.
Skew shows up in the asymmetry of the whiskers and the numbers on the axis. If the upper whisker is twice the length of the lower one, the distribution leans right. The IQR itself is robust to that lean, which is a reason to report it alongside a mean and standard deviation rather than replacing them.
Read the Axis First: A Six-Step Routine That Prevents Misreads
The routine below works on any static box plot, printed or on screen, and it takes about as long as reading a short paragraph. It's deliberately ordered so the arithmetic comes last, after the scale and orientation are settled.
1: Find the axis the box is plotted against — the vertical axis on a standard chart, the horizontal one on a rotated chart. 2: Record the axis scale: starting value, the value of one major tick, and how many minor ticks exist per major interval. 3: Confirm orientation: on a vertical plot, bottom edge = Q1 and top edge = Q3; on a horizontal plot, left = Q1 and right = Q3. 4: Read Q1 from the lower box edge, then read Q3 from the upper edge, noting the value to the nearest tick. 5: Subtract Q1 from Q3 to get the IQR, then add the axis unit to the result. 6: Sanity-check the answer against the median: the two box halves on either side of the median line should roughly match the data's spread, and the IQR should be smaller than the whisker-tip range.
Two failure cases are worth naming because the routine catches them. A truncated axis — one that starts at 50 instead of 0 — throws off visual estimates if you count pixel distances instead of tick values; read numbers, not lengths. A log-scale axis changes the arithmetic entirely, because a subtraction on log values doesn't equal a subtraction on the original measurements. On any log-scaled plot, convert both edges back to raw units before subtracting.
If the box has a notch, don't panic. The notch marks a confidence interval around the median, and its width is unrelated to the quartile edges. The routine's step 3 handles it: edges only.
Quartiles in Python, R, and Excel: Where Software Quietly Changes IQR
Statistical software computes Q1 and Q3 with slightly different formulas, so two tools can report different IQRs from the same numbers. The variation is small — typically a fraction of one data step — but for a report that quotes an exact IQR, the tool matters. Software outputs are also a reliable source for the quartile values themselves when the plot's axis is too coarse.
| Tool / function | What it produces | Default quartile method | Practical note |
|---|---|---|---|
| Python pandas DataFrame.boxplot() | Box plot drawn from a DataFrame column | Median-based quartiles, matplotlib-rendered | Pass whis to change whisker length from the 1.5 × IQR default |
| Python pandas Series.quantile() | Q1 at 0.25, Q3 at 0.75 | Linear interpolation between order statistics | Read Q1 and Q3 directly, subtract, skip the plot entirely |
| R boxplot() | Base-graphics box plot | boxplot.stats quartiles via the stats package | Store the result and read $stats and $stats for Q1 and Q3 |
| R quantile() | Named Q1/Q3 values | Type 7 by default | Nine quantile types exist; name the type in any report |
| Excel QUARTILE.INC | Q1 or Q3 value | Inclusive, tenth-percentile-style definition | The legacy QUARTILE function matches it; QUARTILE.EXC differs |
| Excel QUARTILE.EXC | Q1 or Q3 value | Exclusive definition, traditional median-of-halves | Use it to match hand-worked textbook questions |
The naming is worth internalising: pandas' quantile() and R's quantile() both default to interpolated definitions, while Excel's inclusive and exclusive functions follow a simpler split-the-data approach taught in most statistics courses. Verify which definition your course, client, or regulator expects before quoting an IQR in a formal setting, because the report has to name the method.
For plot-level reading, the same caution applies in reverse. A box plot generated by pandas' boxplot() uses a matplotlib axis with a default tick grid that you can zoom into for a precise read, and R's base boxplot() returns the statistics invisibly, so assigning the plot to an object and reading its $stats gives exact quartiles without squinting at ticks.
Compare Spreads: Two Box Plots, Two IQRs, and What the Difference Means
Comparing two box plots on the same axis is the most common reason people need an IQR. Read both boxes, subtract for each, and then read the difference in spreads. A plot with a box twice as long as another's has roughly twice the middle-half spread, and that comparison of lengths is exactly what the subtraction supports.
| Reading | Group A plot | Group B plot | What it shows |
|---|---|---|---|
| Q1 (lower box edge) | 18 | 30 | Group B's 25th percentile is higher |
| Q3 (upper box edge) | 42 | 54 | Group B's 75th percentile is also higher |
| IQR (Q3 − Q1) | 24 | 24 | Identical middle-half spread |
| Median line | 27 | 41 | Group B is shifted upward, not more variable |
| Whisker span | Approx. 10–52 | Approx. 22–63 | Whisker reach differs with the same IQR |
The table models the reading you'd produce for two summaries in a spreadsheet or a paper. The two IQRs match at 24, so the honest sentence is "the two groups have similar middle-half spread, but Group B's values are shifted upward" — an interpretation that separates location from spread. Reporting only the medians would hide the matching spreads; reporting only the IQRs would hide the shift.
A study-skills point sits inside that comparison. Many test questions pair a box plot with a second plot and ask which distribution is more variable, so the routine matters: compare boxes first, whiskers second, outliers third. Whisker length varies with the plotting convention in ways the IQR does not.
When the axes differ between plots, convert both readings to the same units before comparing. A box of 10 units on an axis marked in thousands and a box of 40 on an axis marked in hundreds are not comparable until both become thousands or hundreds. Comparing tick counts across differently scaled axes is one of the quieter ways an IQR comparison goes wrong.
The Tukey Number: Turning an IQR Into Outlier Fences at 1.5 × IQR
Once you've computed the IQR, the next arithmetic step produces the fences that define outliers. Multiply the IQR by 1.5, then add that product to Q3 for the upper fence and subtract it from Q1 for the lower fence. With Q1 = 18 and Q3 = 42, the IQR is 24, the product is 36, and the fences land at −18 and 78. Anything inside that window is a regular observation; anything outside is a flagged outlier.
That multiplication is the reason IQR shows up on the very first page of most exploratory data analysis guides. It gives a cutoff that doesn't depend on the mean and isn't dragged around by extreme values. A single corrupt reading can wreck a standard deviation; it can't wreck an IQR fence in the same way.
Fences are conventions, not laws. Tukey's 1.5 multiplier is the default in R's boxplot() and in most statistical software; some fields use 3 × IQR for "extreme" outliers. If your box plot's whiskers reach the fences exactly and the remaining points are plotted as dots, the plotmaker is using the Tukey convention, and you can work backward from the whiskers to check the plot's IQR arithmetic.
Edge cases show up when the IQR is small. A tight box with an IQR of 0.5 pushes the fences close to the box, flagging points that look unremarkable on the raw scale. On small samples, the 1.5 rule also mislabels ordinary variation. State the fence method and sample size when reporting flagged points, and don't accept a plot's outlier dots as a finding without the underlying values.
A Failed Reading With a Real Lesson
Sometimes the arithmetic comes out wrong because the plot itself is unfriendly. Take a hand-drawn box plot from a printed worksheet whose axis runs from 20 to 80, with gridlines every 10 units but no minor ticks, and whose box top sits roughly halfway between 50 and 60. A reasonable reader might record Q3 as 56, since it's visibly past the midpoint. If the true value is 54 and the bottom edge is 23, the correct IQR is 31, and the sloppy reading gives 33. The difference is small but real.
The lesson is to read precisely where the scale supports it. Without minor ticks, interpolating to a single unit is unreliable; record the value to the nearest half-ticks — 55 in this case — and state the precision. If the exact IQR matters for a grade or a report, obtain it from the raw data or the software output rather than from the drawing.
A second failure pattern is a mislabelled axis. Box plots exported from a spreadsheet may inherit the wrong axis title or a truncated scale from a template, so a plot whose axis starts at zero is read against a template that starts at 10. Both errors are caught by the same habit: compare the axis's labeled start value and gridline spacing against the plotted marks before reading any number.
These errors rarely surface on their own. Reporting the Q1 and Q3 readings alongside the IQR — rather than the subtraction alone — lets a reviewer spot an implausible edge and correct the record.
FAQ
What is the answer if Q1 and Q3 are the same value?
The IQR is zero, and that's a real finding, not a mistake. Identical quartiles mean at least half the data takes values that fall at or near a single point, so the box collapses to a line. Worth checking whether the data is genuinely concentrated — an attendance count where most days register the same figure — or whether the variable was recorded to such coarse precision that the quartiles coincide.
Does the whisker length ever equal the IQR?
No, under the standard Tukey convention — the whiskers always extend past the box edges or stop at a nearby point. A whisker of exactly zero length only appears when the plot omits the whiskers entirely. If a plot seems to show a whisker shorter than one tick, look for a different convention, such as minimum-to-maximum whiskers, before accepting the drawing.
Why do I get a different IQR in Excel than in R on the same numbers?
The two tools use different quartile definitions. Excel's QUARTILE.INC and R's default quantile() type 7 interpolate between order statistics, while the legacy Excel QUARTILE and many textbook methods split the data by the median and take the medians of each half. On small datasets the results can differ by fractions of a data step; name the method in any write-up.
Can I read the IQR from a box plot with no axis labels?
Only if a legend gives the scale — otherwise the answer is a length with no unit. Some plots are drawn with proportional geometry and rely on a companion table for the values; check the surrounding text. Without either, you can still compare the boxes' lengths across panels to rank the groups by spread, but quoting a number would be a fabrication.
What's the difference between range and interquartile range on a box plot?
Range measures the full distance between the smallest and largest observations, while the IQR measures the middle half. On a Tukey box plot, the range isn't drawn as a whisker span at all, because whiskers are cut at the 1.5 × IQR fence and outliers appear as separate dots. Read the IQR from the box, and note that naming the range from the plot requires the minimum and maximum values, not the whisker tips.
Is an IQR of 24 in kilograms meaningful without context?
It means the middle half of the observations spread across 24 kilograms, but its importance depends on the typical value. A 24 kg spread around a median of 30 kg is a very wide distribution; the same spread around a median of 300 kg is proportionally modest. Report the IQR with the median and a mention of sample size, because the IQR alone doesn't rank as large or small in absolute terms.
What should I do if the median line sits outside the box?
That usually means the box edge nearest the median was drawn incorrectly, or the plot is a variant where the box represents a confidence interval rather than the quartiles. Check the legend. A median outside a genuine quartile box is logically impossible, so the drawing or its labels are the first thing to suspect, not the data.