Interquartile Range Calculator

Find the IQR and outlier fences.

How it is calculated

This tool does not take raw data; you give it the first quartile Q1 and the third quartile Q3 that you have already found. It computes IQR = Q3 − Q1, then the outlier fences lower fence = Q1 − 1.5 × IQR and upper fence = Q3 + 1.5 × IQR. Results are shown with four decimals, in the same unit as your data. A value outside the two fences is usually flagged as a possible outlier, not automatically as an error. If Q3 is smaller than Q1 the tool returns no result, because quartiles cannot be in that order. Q1 equal to Q3 is accepted and gives an IQR of 0, with both fences at the same value. Only the 1.5 multiplier is used; the tool does not show the stricter 3 × IQR fences.

Worked example

Suppose a data set has Q1 = 42.5 and Q3 = 58.25. IQR: 58.25 − 42.5 = 15.7500. The fences use 1.5 × 15.75 = 23.625. Lower fence: 42.5 − 23.625 = 18.8750. Upper fence: 58.25 + 23.625 = 81.8750. Any observation below 18.875 or above 81.875 would be flagged as a possible outlier, while a value of 80 is still inside the fences.

Try this example →

Common mistakes

  • Typing the minimum and maximum of the data instead of Q1 and Q3; that gives the range, not the IQR.
  • Entering the median in place of a quartile.
  • Swapping the two values so that Q1 is larger than Q3; the tool then returns nothing.
  • Assuming every value outside the fences is a mistake. It is only a flag; genuine extreme values can be real and should be checked before removal.
  • Comparing quartiles from different software without checking the method. Quartile definitions differ slightly between tools, so Q1 and Q3 may not match your textbook value.

About this calculator

The interquartile range (IQR = Q3 − Q1) measures the spread of the middle 50% of a dataset, the difference between the third quartile (the value below which 75% of observations fall) and the first quartile (below which 25% fall). Because it ignores the extreme top and bottom quarters, IQR is far less sensitive to outliers than the full range or standard deviation, making it a robust measure of variability for skewed or messy data.

Statisticians use the IQR to draw box-and-whisker plots and to flag outliers with Tukey's fences: any value below Q1 − 1.5×IQR or above Q3 + 1.5×IQR is treated as a potential outlier, with 3×IQR marking "extreme" outliers. Data analysts, quality-control engineers screening for defective measurements, and researchers cleaning survey or experimental data all rely on this rule before running further analysis.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators