IQR Calculator

Get IQR and outlier fences.

How it is calculated

You supply the first quartile Q1 and the third quartile Q3 yourself; the tool does not take a raw list of data. It computes IQR = Q3 − Q1, then the outlier fences lower = Q1 − 1.5 × IQR and upper = Q3 + 1.5 × IQR. All three results are in the same unit as your data and shown to 4 decimal places. A Q3 smaller than Q1 is impossible and gives no result, as does an empty box. If Q1 = Q3 the IQR is 0 and both fences collapse onto that value. Negative quartiles are fine. The tool does not check any dataset against the fences; it only gives you the two limits. Different software computes quartiles with slightly different methods, so use the same method that produced your Q1 and Q3.

Worked example

A set of test scores has Q1 = 42 and Q3 = 58. The IQR is 58 − 42 = 16.0000. Then 1.5 × 16 = 24. The lower fence is 42 − 24 = 18.0000 and the upper fence is 58 + 24 = 82.0000. Any score below 18 or above 82 would be flagged as a potential outlier, while a score of 95 would be flagged and a score of 70 would not.

Try this example →

Common mistakes

  • Typing the minimum and maximum instead of Q1 and Q3. That produces the range, not the interquartile range, and the fences become meaningless.
  • Entering the median in place of Q1 or Q3. The IQR needs the 25th and 75th percentiles, which sit either side of the median.
  • Treating a value outside the fences as an error to delete. The fences only flag a potential outlier; check whether it is a real measurement first.
  • Swapping Q1 and Q3 and getting no result. Q1 must be the smaller number.
  • Mixing quartile methods. Q1 and Q3 can differ slightly between textbooks and software, so the fences change a little depending on how they were found.

About this calculator

The interquartile range (IQR) measures the spread of the middle 50% of a dataset: it is simply Q3 (the 75th percentile) minus Q1 (the 25th percentile). Unlike the standard deviation, which every extreme value pulls on, the IQR ignores the top and bottom quarters of the data entirely, which makes it a far more robust measure of spread when a dataset contains skew or outliers — a property statisticians call resistance.

The IQR’s best-known application is Tukey’s outlier fences: any value below Q1 − 1.5×IQR or above Q3 + 1.5×IQR is flagged as a potential outlier, the exact rule that draws the whiskers on a box-and-whisker plot. Data analysts use it to screen sensor readings or survey responses for anomalies, teachers use it to summarize test-score distributions without letting one exceptional score distort the picture, and quality-control engineers use it to spot production measurements that fall outside expected tolerances.

This calculator takes your Q1 and Q3 values and returns the IQR along with the lower and upper outlier fences, so you can immediately see which values in your dataset warrant a closer look.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators