Written and maintained by CASRAI Editorial Board
Last updated
To find the range in a box and whisker plot, subtract the smallest value from the largest value. The catch is which two values you use: on a plot with no outlier dots, they are the ends of the two whiskers; on a plot that draws outliers as separate dots, the true range runs from the lowest dot or whisker end to the highest dot or whisker end. Subtracting only the whisker ends understates the range whenever a dot is present.
How to find the range of a box plot
The range is the largest value minus the smallest value in a data set (NIST/SEMATECH e-Handbook, section 1.3.5.6). A box plot does not label those two values for you, so you read them off the plot:
- Find the top end of the plot: the highest whisker end, or the highest dot if any dots sit above the upper whisker.
- Find the bottom end of the plot: the lowest whisker end, or the lowest dot if any dots sit below the lower whisker.
- Subtract: range = top value minus bottom value.
The box itself (the span from the lower quartile to the upper quartile, which holds the middle 50% of the data) is not the range. Its width is the interquartile range, covered below.
Range when the plot shows outlier dots
In the basic construction, the whiskers run from the lower quartile to the minimum point and from the upper quartile to the maximum point, so the whisker ends are the minimum and maximum and their difference is the range. Many plots use the fence version instead. With IQ defined as the upper quartile minus the lower quartile, the NIST Handbook sets fences at the lower quartile minus 1.5 times IQ and the upper quartile plus 1.5 times IQ. The lower whisker extends to the smallest point that is inside the lower fence, and the upper whisker to the largest point inside the upper fence. Points beyond a fence are drawn as separate circles (the Handbook draws points between the 1.5 and 3.0 fences as small circles and points beyond the 3.0 fences as large circles).
Those circles are real observations. So on a fence-style plot, the whisker-to-whisker distance is not the data range. It is the range of the points that fall inside the fences. The data range is the highest circle (or whisker end) minus the lowest circle (or whisker end). The worked example below shows the two answers side by side.
Formula and symbols
Range = xmax − xmin, where xmax is the largest observation and xmin the smallest. The related box-plot quantity is the interquartile range, IQ = Q3 − Q1, where Q1 is the lower quartile (25th percentile) and Q3 is the upper quartile (75th percentile). Fences: lower = Q1 − 1.5×IQ, upper = Q3 + 1.5×IQ.
Worked example with the arithmetic shown
Eleven measurements, sorted: 4, 7, 8, 9, 10, 11, 12, 13, 14, 16, 31.
- Minimum = 4, maximum = 31, median (6th value) = 11.
- Quartiles by linear interpolation (the default in numpy and Excel’s QUARTILE.INC): Q1 = 8.5, Q3 = 13.5. IQR = 13.5 − 8.5 = 5.
- Fences: lower = 8.5 − 1.5×5 = 1; upper = 13.5 + 1.5×5 = 21.
- Lower whisker: 4 is inside the lower fence (4 ≥ 1), so it ends at 4.
- Upper whisker: the largest value at or below 21 is 16, so it ends at 16. The value 31 is above 21, so it is drawn as a dot.
| Quantity | Calculation | Result |
|---|---|---|
| Data range | 31 − 4 | 27 |
| Whisker-to-whisker span | 16 − 4 | 12 |
| Interquartile range (box width) | 13.5 − 8.5 | 5 |
Reading only the whiskers gives 12, less than half the true range of 27. If the NIST (N+1) quartile rule is used instead (Q1 at the 3rd value = 8, Q3 at the 9th value = 14, IQ = 6, fences −1 and 23), the whisker ends and the dot are the same, so the range is still 27.
Range vs interquartile range: reading the box
The range depends only on the two extreme values. NIST notes that it is based only on the lowest and highest extreme values in the sample, that the spread near the center is not captured at all, and that one should be cautious about using it for large N. The interquartile range, by contrast, is more robust to extreme values. In the example above, removing the single value 31 would cut the range from 27 to 12 while the quartiles barely move.
| Part of the plot | What it shows | Use it for |
|---|---|---|
| Whisker end to whisker end | Spread of the points inside the fences | Typical spread without extreme points |
| Lowest to highest point (including dots) | The range | Total spread, sensitive to one extreme value |
| Width of the box | Interquartile range, the middle 50% of the data | Spread that resists outliers |
For more on quartiles and the five-number summary, see the interquartile range and five-number summary guide. For flagging dots, see how to find an outlier in statistics.
Assumptions and common mistakes
- Subtracting whisker ends when dots are present. This gives the span of the non-outlying points, not the range.
- Reporting the box width as the range. The box is the interquartile range.
- Treating the median line as the center of the range. The median need not sit midway between the extremes; in skewed data it is off-center (see right-skewed box plots).
- Reading values off a figure. When you only have an image, your answer is limited by the axis resolution; state it as approximate.
- Software mismatch. Programs differ in how they compute quartiles, which can shift the box and fences slightly, though whisker ends and dots often agree.
How to report it
Report the range as the two end values rather than only their difference, and pair it with a robust measure when outliers are possible. For the example data: “Scores ranged from 4 to 31 (Mdn = 11, IQR = 5).” If you describe the whiskers instead, say so explicitly: “Excluding one outlier (31), scores ranged from 4 to 16.”
How to calculate it in Excel, R or Python
Excel
=MAX(A1:A11)-MIN(A1:A11) // range = 27
=QUARTILE.INC(A1:A11,3)-QUARTILE.INC(A1:A11,1) // IQR = 5
R
x <- c(4,7,8,9,10,11,12,13,14,16,31)
diff(range(x)) # data range: 27
s <- boxplot.stats(x)
s$stats # whisker ends and quartiles: 4 8.5 11 13.5 16
diff(s$stats[c(1,5)]) # whisker-to-whisker span: 12
s$out # outlier dots: 31
Note that in R, the range argument of boxplot() is a whisker multiplier, not the statistical range; see box plots in R.
Python
import numpy as np
x = np.array([4,7,8,9,10,11,12,13,14,16,31])
print(np.ptp(x)) # 27
q1, q3 = np.percentile(x, [25, 75]) # 8.5, 13.5
lo, hi = q1 - 1.5*(q3-q1), q3 + 1.5*(q3-q1)
inside = x[(x >= lo) & (x <= hi)]
print(inside.max() - inside.min()) # 12
In SPSS, see box plots in SPSS.
FAQ
How do you find the range in a box and whisker plot?
Subtract the lowest value from the highest value. Use the whisker ends if the plot has no outlier dots; if it has dots, use the lowest and highest dots or whisker ends.
How do you find the range of a box plot with outliers?
Include the outliers. They are real data points, so the range is the highest point minus the lowest point, including every dot. Whisker end to whisker end is a smaller number.
Is the range the same as the length of the box?
No. The length of the box is the interquartile range, Q3 minus Q1, the middle 50% of the data. The range covers the full extent of the data.
Can you find the exact range from a box plot image?
Only approximately, to the precision of the axis. The exact minimum and maximum require the raw data.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.3.7 Box Plot, itl.nist.gov/div898/handbook/eda/section3/boxplot.htm (checked 2026-10-29).
- NIST/SEMATECH e-Handbook, 1.3.5.6 Measures of Scale, itl.nist.gov/div898/handbook/eda/section3/eda356.htm (checked 2026-10-29).
- NIST/SEMATECH e-Handbook, 7.1 quartile definitions, itl.nist.gov/div898/handbook/prc/section1/prc16.htm (checked 2026-10-29).
Related: descriptive statistics.








