Checking an IQR fence rule without assuming a fixed outlier share
The 1.5 times IQR rule flags values by distance from the quartiles, so the share flagged changes from one data set to the next. This guide compares two five-value lists that share the same fences.
How the fences are built
The calculator sorts the values and finds the first and third quartiles using the type 7 method, which interpolates linearly between order statistics. The interquartile range is Q3 minus Q1. The lower fence is Q1 - 1.5 × IQR and the upper fence is Q3 + 1.5 × IQR. Any value below the lower fence or above the upper fence is flagged. The rule is credited to John Tukey, who used it in the box plots of his 1977 book Exploratory Data Analysis. The multiplier 1.5 is a convention. It was chosen as a convenient screening distance, and nothing in the arithmetic ties it to a particular percentage of the data.
The first list: 0, 1, 2, 3, 100
With five values, the type 7 quartile positions are at index 1 and index 3 counting from zero, so Q1 is 1 and Q3 is 3. The IQR is 2. The lower fence is 1 - 3 = -2, and the upper fence is 3 + 3 = 6. The value 100 lies far beyond 6, so it is flagged, and the other four values sit between -2 and 6. One value out of five is flagged, which is 20 percent. The quartiles themselves did not move even though 100 is a very large value, which shows why the rule uses quartiles: the extreme value cannot stretch the fences that are meant to catch it, unlike a rule based on the mean and standard deviation. In this list the mean is 21.2 and the standard deviation is large because of the 100 itself, so a rule that flags values more than two standard deviations from the mean would not catch it. Using quartiles keeps the extreme value from hiding.
The second list: 0, 1, 2, 3, 4
Now replace 100 with 4. The sorted list is evenly spaced, Q1 is still 1, Q3 is still 3, and the fences are still -2 and 6. Every value lies inside them, so none is flagged and the share is 0 percent. The two lists have the same fences and different flag counts, because the fences depend on the middle half of the data and the flagged values depend on the tails. The example shows that 1.5 × IQR does not mean that a fixed share, such as 5 percent or 1 percent, will be flagged. In some data sets none are flagged, and in others a large part of the list is outside the fences.
What happens with normal data
For data drawn from a normal distribution, the quartiles lie about 0.6745 standard deviations from the mean, so the IQR is about 1.349 standard deviations, and the fences fall near 2.698 standard deviations on each side. About 0.7 percent of normally distributed values fall outside them. That is a property of the normal distribution and not of the rule. Heavy-tailed data, such as incomes or response times, can have many more flagged values, and a distribution with very short tails can have none. A sample of 20 normal values has a good chance of containing none outside the fences, and one of 1,000 values will usually have several.
Interpolation changes the fences
Different software defines quartiles differently, and the fences move with them. For the four values 1, 2, 3, 4, the type 7 quartiles are 1.75 and 3.25, the IQR is 1.5, and the fences are -0.5 and 5.5. Methods that take medians of halves give different quartiles and so different fences. For large samples the differences shrink, but for small ones they decide whether a borderline value is flagged. This is why the calculator states its quartile method. When you compare results with a spreadsheet or statistics package, check which quartile definition it uses before assuming one of them is mistaken.
A nine-value example
Consider 2, 4, 4, 5, 6, 7, 8, 9 and 30. With nine values the type 7 quartiles sit at index 2 and index 6, so Q1 is 4 and Q3 is 8. The IQR is 4, the lower fence is 4 - 6 = -2 and the upper fence is 8 + 6 = 14. Only 30 is outside, which is about 11 percent of the list. Adding one more large value, say 31, changes the quartiles slightly while the flagged share grows to two of ten. Small lists react strongly to a single added value, so a flag count on ten observations carries much less weight than the same count on ten thousand.
A flag is not a verdict
A flagged value is one that the rule marks as far from the middle of the data. It might be a typing error, a measurement fault, a legitimate rare event or the signature of a skewed distribution. Deleting it needs a reason from outside the rule, such as a known instrument failure or a value that is physically impossible. In many analyses the unusual values carry the most important information, for example a rare but severe loss in insurance data or a fast outlier in an athletic record. A sound workflow is to flag, investigate the source, document the decision and report results both with and without the flagged points when the choice matters.
Choosing the multiplier
The 1.5 in the rule is a screening distance. Tukey described values beyond 1.5 times the IQR from the quartile as outside and values beyond 3 times as far out. Using 3 for the first list would give fences of 1 - 6 = -5 and 3 + 6 = 9, and 100 would still be flagged. For the nine-value example, a multiplier of 3 gives an upper fence of 8 + 12 = 20, and 30 would still be outside. A wider multiplier flags fewer points in moderately skewed data. Neither choice has a statistical justification that applies to every data set, so state the multiplier you used whenever you report a count of flagged values.
Tiny lists and the 1.5 multiplier
The two lists are descriptive and tiny. They show that the same fences can flag one value or none, and they give no recommendation about cleaning data. The multiplier 1.5 is the conventional one; some analysts use 3 to define far outliers, which gives wider fences. The calculator applies the rule as stated, and nothing in it tests whether a value is erroneous or whether the data follow a particular distribution. Use the flags as a prompt to look at the record, and keep the original data intact.
Reproduce the checks
One flagged endpoint
Open the Outlier Calculator and enter:
- Numbers
0,1,2,3,100
Expected output:
Lower fence
-2Upper fence
6The high endpoint is outside the upper fence.
No flagged endpoints
Open the Outlier Calculator and enter:
- Numbers
0,1,2,3,4
Expected output:
Lower fence
-2Upper fence
6Every observation lies inside these same fences.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.
Sources
- Primary definition and convention reference ↗ · 2026-10-08