The interquartile range calculator above does two jobs. First it measures spread: the IQR is the distance between Q1 and Q3, the width of the middle half of your data. Then it turns that width into a test. Tukey's rule places a fence 1.5 times the IQR beyond each quartile, and anything outside those fences is flagged. The panel names those observations individually rather than counting them, and separates the ones beyond the outer three-times fence.
Arb Digital publishes this alongside the rest of the statistics set because outlier detection is where most real analysis starts. Before you explain a mean that moved or a rate that jumped, you need to know whether the change sits in the body of the data or in one or two extreme records. The IQR answers that without being distorted by the values it is looking for.
What This Interquartile Range Calculator Does
Paste any set of numbers and the tool sorts them, finds Q1, the median and Q3, and reports the IQR as Q3 minus Q1. It then computes four boundaries: the inner pair at Q1 minus k times IQR and Q3 plus k times IQR, and the outer pair at twice that distance. Every value outside the inner fences is named, split into mild outliers between the two pairs and extreme outliers beyond the outer pair.
You control two things most free tools hide. The multiplier k defaults to 1.5, and changing it lets you watch the flagged set grow or shrink. The quartile method defaults to the exclusive or Tukey-hinge convention, because Tukey defined this rule on hinges rather than interpolated percentiles; Type 7 is the alternative. The parsed count n is printed back so a mis-paste is obvious.
How to Use It
- Paste your values into the box. Commas, spaces, tabs, semicolons and line breaks all work in any mix, so a spreadsheet column needs no cleaning.
- Check the parsed count. If n does not match what you pasted, something in the source was text rather than a value.
- Pick the quartile method. Leave it on exclusive unless you are reconciling against software that uses Type 7.
- Set the multiplier. Keep 1.5 for the standard rule. Raising it to 3 flags only the most extreme values; lowering it toward 1 flags far more.
- Read the named list rather than the count. Which values are flagged tells you more than how many, and the mild versus extreme split shows where to look first.
The Formula: IQR and the Four Fences
The interquartile range is the plainest formula in descriptive statistics: IQR = Q3 − Q1. Since a quarter of the data sits below Q1 and three quarters below Q3, the gap between them holds exactly the middle 50% of the observations. A large IQR means the central half is spread out; a small one means it is tightly packed.
The outlier rule builds four boundaries from that width. The inner fences are Q1 − k × IQR and Q3 + k × IQR with k = 1.5, and the outer fences use 3 × IQR. A value outside an inner fence is a mild outlier; one beyond an outer fence is extreme. Nothing here depends on the mean, the sum of squares, or an assumed distribution shape — only on the sorted order of the data.
Note what the fences are not. They are not the smallest and largest values, and they are not the whiskers on a box plot, which stop at the most extreme observation still inside the fence.
A Worked Example You Can Check Yourself
The calculator loads with ten values: 1, 2, 3, 4, 5, 6, 7, 8, 9 and 100. They are already sorted, so the quartiles need no machinery. The exclusive method splits them into two halves of five. The lower half is 1, 2, 3, 4, 5, whose median is the third value, so Q1 = 3. The upper half is 6, 7, 8, 9, 100, giving Q3 = 8. The median sits between the fifth and sixth values, so Q2 = 5.5.
That gives IQR = 8 − 3 = 5. Multiply by 1.5 to get 7.5. The lower fence is 3 − 7.5 = −4.5 and the upper is 8 + 7.5 = 15.5. Everything from 1 to 9 sits inside. Only 100 is outside, so exactly one value is flagged.
Now the second question, which most calculators never ask. The outer fences use 3 × IQR = 15, giving 3 − 15 = −12 and 8 + 15 = 23. The value 100 is well past 23, so it is not borderline — it is an extreme outlier, a value that needs explaining before any summary of this data is trustworthy. The NIST/SEMATECH e-Handbook chapter on exploratory data analysis sets out the treatment of fences and hinges formally.
Why the IQR Does Not Move When the Standard Deviation Does
Take the same ten values and compute both spread measures. The mean is 145 ÷ 10 = 14.5, larger than nine of the ten observations, which already tells you it has failed as a summary of the centre. The sum of squared deviations from it is 8,182.5, so the sample variance is 909.17 and the sample standard deviation is about 30.15 — a spread of 30 for a set where nine values live between 1 and 9.
The resistant pair does not budge: the median is 5.5 and the IQR is 5. Replace the 100 with 1,000 and the mean and standard deviation both roughly multiply, while the median and IQR stay exactly where they are. Q1 and Q3 depend only on which values sit at particular sorted positions, not on how far the extremes travel.
That is the whole argument for a resistant spread measure, and it is why the outlier rule is built on the IQR rather than on sigma. A rule of the form "more than three standard deviations from the mean" uses a threshold the outlier itself has already inflated: one large value can push the boundary out far enough to cover itself, and two can hide each other. The standard deviation calculator measures spread around the mean and is itself distorted by exactly the outliers the IQR is used to find; if that is the number you need, use it there.
What a Flag Actually Means, and What It Does Not
On normally distributed data the 1.5 times IQR rule flags roughly 0.7% of observations by construction. That is what the fences enclose when the distribution really is normal, not an accident of one sample. In a clean sample of a thousand observations the rule flags around seven, and every one is a false alarm. Scale to a hundred thousand rows and you get several hundred flags in a dataset with no errors in it.
A flag is therefore a prompt to investigate a value, never an instruction to delete it. The useful questions are whether it is a recording error, whether it came from a different population, or whether it is a real observation from a long-tailed process. Removing points because a rule flagged them narrows your data and produces spread estimates that are too small.
The reverse error is just as common: an unflagged dataset is not a clean one. The rule only sees values extreme relative to the middle half of the same data, so it misses a systematic bias, a duplicated block of records, or a value that is impossible in context but numerically unremarkable. An age of −2 in a set running from 20 to 80 would be flagged; an age of 19 would not, and it is the second kind that survives in production data.
A Second Scenario Where Nothing Gets Flagged
Try 4, 6, 8, 10, 12, 14, 16, 18 — eight values, evenly spaced, symmetric. The exclusive method splits them into halves of four. The lower half is 4, 6, 8, 10, whose median is the average of 6 and 8, so Q1 = 7. The upper half gives Q3 = 15. The IQR is 8, the inner fences sit at −5 and 27, and every value is inside. Nothing is flagged, and the panel says so rather than showing an empty list.
The pairing is the point. Flagged does not mean wrong and unflagged does not mean clean; neither result is a verdict on data quality by itself.
Changing the Multiplier, and Why 1.5 Became Standard
The 1.5 is a convention, not a derivation. Tukey chose it as a compromise: small enough to catch values worth a second look, large enough that well-behaved data is not constantly setting off alarms. The 0.7% false-alarm rate is the price, and the 3 times IQR outer fence marks a second tier far fewer points reach.
The multiplier field lets you see that trade-off rather than take it on faith. Lower k and the fences close in and the flagged set grows; raise it and only severe values survive. Watching which points cross tells you something a single verdict cannot: whether a flagged value sits just outside the line or far beyond it. A value that stops being flagged when k goes from 1.5 to 1.6 was never a strong signal. The default data goes the other way — 100 is still flagged at k = 3.
Quartile Method Choice and Points Near the Fence
The choice of quartile method can change which points get flagged near the fence, because a different Q1 or Q3 moves the fence itself. On the default data the exclusive method gives Q1 = 3 and Q3 = 8, an IQR of 5 and an upper fence of 15.5, while Type 7 interpolates to Q1 = 3.25 and Q3 = 7.75, an IQR of 4.5 and an upper fence of 14.5. Both flag 100 and nothing else — but a value at 15 would be flagged by one and not the other, which is not rare in real data.
Fix your method before you look at the results and stay consistent; switching after seeing the flags is a way of choosing your conclusion. The quartile calculator explains where Q1 and Q3 themselves come from; if that is your question, use it rather than this page. For any percentile other than 25 and 75, the percentile calculator takes a single cut point directly, and the five-number-summary calculator presents the same quartiles as a picture rather than as a test, adding the minimum and maximum and drawing the box. The Penn State Eberly College of Science statistics courses work through the competing conventions with examples.
Arb Digital builds measurement setups where a spike is investigated before it is acted on, so decisions rest on the pattern rather than on the last data point.
Browse All Free Tools Talk To Arb DigitalCommon Mistakes to Avoid
- Deleting flagged values automatically — the rule identifies candidates for inspection. Removing them without a reason understates the true spread.
- Treating the fences as the whiskers — a whisker stops at the most extreme value inside the fence, so it is shorter than the fence and differs on each side.
- Reporting a count instead of the values — three flags at 15.6, 15.9 and 16.1 mean something entirely different from three at 16, 400 and 9,000.
- Reading no flags as no problems — a uniform bias or a units error passes straight through a rule that only sees relative extremes.
- Comparing IQRs from different quartile methods — the numbers are not interchangeable. Fix the method first and state which one you used.
Related Free Tools From Arb Digital
Work out where Q1 and Q3 come from with the quartile calculator, or see them drawn with the five-number-summary calculator. Compare resistant and mean-based summaries using the mean, median and mode calculator and the standard deviation calculator, and locate one observation with the z-score calculator. The free online tools hub lists the full set.
Frequently Asked Questions
The interquartile range is Q3 minus Q1. It measures the width of the middle 50 percent of the data and is unaffected by how far the most extreme values sit from the centre.
Multiply the IQR by 1.5 and subtract that from Q1 to get the lower fence, then add it to Q3 to get the upper fence. Any value outside those two boundaries is flagged as an outlier. The outer fences use 3 times the IQR instead.
A mild outlier lies beyond an inner fence at 1.5 times the IQR but inside the outer fence at 3 times the IQR. An extreme outlier lies beyond the outer fence. The calculator lists the two groups separately.
No, not on the strength of the flag alone. A flag is a prompt to investigate. Check whether the value is a recording error, came from a different population, or is a genuine extreme observation.
On normally distributed data the fences enclose about 99.3 percent of the distribution, so roughly 0.7 percent of observations fall outside them by construction. In a large clean sample the rule will always flag some points.
The exclusive or Tukey hinge method is the default here because the 1.5 times IQR rule was defined on hinges. Type 7 is the interpolating method most software uses. Pick one before you look at the results and stay consistent.
The standard deviation is computed from squared deviations about the mean, so a single extreme value inflates it and pushes any threshold built on it outward. The IQR depends only on sorted positions, so it does not move.
This calculator applies a descriptive rule to the numbers you enter. Whether a flagged value is an error, a different population or a genuine observation is a judgement about your data that the tool cannot make for you.