What is the interquartile range?
The interquartile range (IQR) measures how spread out the middle half of a dataset is. You find the first quartile (Q1) and third quartile (Q3), then subtract: IQR = Q3 − Q1. Values between Q1 and Q3 sit in the central portion of the sorted data; the IQR captures the width of that middle band without using every observation in the same way the full range does.
IQR uses the same units as the original measurements. Whether an IQR looks wide or narrow depends on the scale and context of the data.
What is an outlier?
In exploratory data analysis, an outlier is an observation that appears unusually far from the bulk of the data. Outliers are not automatically mistakes. They may reflect rare events, measurement issues, or genuine extreme values that deserve investigation.
This calculator flags observations that fall strictly outside Tukey-style fence boundaries derived from the IQR. Values exactly on a fence are not classified as outliers. Nothing is removed from your dataset automatically—the tool only labels points for review.
IQR formula
CalcLume uses the following definition:
IQR = Q3 − Q1
Lower fence = Q1 − k × IQR
Upper fence = Q3 + k × IQR
- Q1 — first quartile (25th percentile position under the selected method)
- Q3 — third quartile (75th percentile position under the selected method)
- k — fence multiplier (1.5 for standard inner fences, 3.0 for wider outer fences)
- IQR — Q3 − Q1
Whiskers on the box plot show the most extreme non-outlier observations—the smallest and largest values that remain inside the fences. Fences are reference boundaries; whiskers are data extrema among non-outliers.
How IQR fences work
Tukey-style fences extend outward from the quartiles by a multiple of the IQR. With the default 1.5 × IQR rule (sometimes called inner fences), the lower fence is Q1 − 1.5 × IQR and the upper fence is Q3 + 1.5 × IQR. The 3.0 × IQR option widens both fences; quartiles and IQR stay the same—only the fence distance changes.
Classification uses strict inequalities: a value below the lower fence is a lower outlier; a value above the upper fence is an upper outlier. A value equal to a fence is treated as within the acceptable range and is not listed as an outlier.
NIST materials discuss inner and outer fence multipliers in box-plot practice. CalcLume labels the selectable multipliers by distance (1.5× and 3.0× IQR) rather than claiming universal “mild” or “extreme” terminology for every field.
How to calculate IQR and outliers
- Enter your numeric observations (4 to 1,000 values).
- Choose a quartile method. The default is exclusive-halves (median of halves): sorted data is split into lower and upper halves and the median of each half becomes Q1 and Q3. When n is odd, the overall median is excluded from both halves.
- The alternate Excel-compatible percentile (INC) option uses linear interpolation equivalent to Excel
PERCENTILE.INC (Hyndman–Fan type 7). - Choose a fence multiplier: default 1.5× IQR or alternate 3.0× IQR.
- Press Calculate outliers and IQR. Review the IQR, fences, whiskers, outlier lists, step-by-step work, classification table, and box plot.
Changing only decimal places reformats displayed values without marking the result stale. Changing the dataset, quartile method, or multiplier requires recalculation to refresh the output.
Worked example
Dataset (original order): 1, 2, 3, 4, 5, 6, 7, 8, 9, 100 (fixture F02; example high-outlier)
Quartile method: Median of halves (exclusive) (exclusive-halves). Fence multiplier: 1.5× IQR.
Sorted values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 100. Count n = 10.
Lower half (first five values): 1, 2, 3, 4, 5 → Q1 = 3.
Upper half (last five values): 6, 7, 8, 9, 100 → Q3 = 8.
Median = 5.5.
IQR = Q3 − Q1 = 8 − 3 = 5
Lower fence = Q1 − 1.5 × IQR = 3 − 1.5 × 5 = -4.5
Upper fence = Q3 + 1.5 × IQR = 8 + 1.5 × 5 = 15.5
Values 1 through 9 lie strictly inside the fences. #10: 100 is above the upper fence and is flagged as an upper outlier. The calculator does not remove it from your dataset.
Lower whisker = 1 and upper whisker = 9 (most extreme non-outlier observations). Fences at -4.5 and 15.5 are reference boundaries—not whisker endpoints.
Five-number summary explained
The five-number summary reports the minimum observed value, Q1, median, Q3, and maximum observed value. It describes location and spread without assuming a particular distribution shape.
When outliers are present, the whiskers on a box plot may end at non-outlier extrema while the summary minimum and maximum still reflect the full dataset (including outliers). This calculator shows both the five-number summary and separate whisker endpoints so you can see how flagged points relate to the bulk of the data.
How to read the box plot
The horizontal box plot on this page maps numeric values to position along an axis. The box spans Q1 to Q3; the median appears as a distinct line inside the box. Whiskers extend to the lower and upper non-outlier extremes. Dashed vertical lines mark fence positions. Open circles mark outliers beyond the whiskers.
A visible text summary and a screen-reader data table duplicate the key values, so the chart is not the only source of information. Line styles and marker shapes supplement color so the plot remains interpretable without relying on hue alone.
Why quartile methods can disagree
Quartile definitions are not standardized across textbooks, homework systems, and spreadsheet functions. The same dataset can yield different Q1 and Q3 values depending on whether software uses median-of-halves rules, linear interpolation (such as Excel PERCENTILE.INC), or other percentile conventions.
CalcLume’s default exclusive-halves method (labeled median of halves (exclusive) in the calculator) matches many classroom treatments. The Excel-compatible percentile (INC) option helps when you need parity with spreadsheet output. Always report which method you used when sharing results.
IQR versus mean absolute deviation
IQR summarizes spread through quartiles and is relatively resistant to extreme values in the sense that outliers are summarized separately once fences are applied. Mean absolute deviation (MAD) measures average distance from the arithmetic mean and stays in original units with a direct “average deviation from the center” reading.
The two tools answer related but different questions. IQR and fences emphasize the middle half and tail flags; MAD emphasizes mean-centered absolute distance. Many exploratory workflows use both.
IQR versus standard deviation
Standard deviation measures spread around the mean using squared deviations. Large values influence standard deviation more strongly than IQR because squaring amplifies extremes. Standard deviation is common in inference and modeling contexts; IQR is common in robust summaries and box-plot rules.
Neither measure is automatically superior. Choose based on whether quartile-based or mean-based spread better matches your question and audience.
When IQR is useful
- Summarizing the spread of the middle 50% of observations
- Flagging unusually low or high values with transparent fence rules
- Teaching box plots and five-number summaries alongside a worked dataset
- Comparing datasets on a common scale when quartile-based spread is appropriate
- Reviewing data quality before analysis without deleting points automatically
Limitations
- Quartile positions depend on the selected method; compare results only when methods match.
- Fence rules are exploratory heuristics, not hypothesis tests or significance procedures.
- This calculator does not remove, winsorize, or impute outliers for you.
- Only 1.5× and 3.0× multipliers are offered—no arbitrary custom multipliers in this version.
- Between 4 and 1,000 observations are supported; smaller samples are not valid for this tool’s quartile rules.
- Values exactly on a fence are not classified as outliers (strict < / > comparisons).
- Display precision affects rounding in the interface only; it does not change underlying calculations.
For how CalcLume selects formulas and reviews calculator pages, see the methodology and sources pages.