Skip to main content

Interquartile Range Calculator

Use this interquartile range calculator to find Q1, the median, Q3, IQR, and the 1.5 × IQR outlier fences from a list of numbers. Because accepted quartile definitions can return different answers, the selected method is always visible.

From a list of numbers to quartiles, IQR, and outliers

Sort the data, calculate Q1 and Q3 with one named method, and subtract Q1 from Q3. The method choice matters most when the data set has an odd number of values or when software uses interpolated percentiles.

Choose the method

Match the method named by your class, textbook, spreadsheet, or statistics package.

Check the sorted list

Confirm every value appears once unless the original data genuinely contain duplicates.

Treat fences as flags

Investigate a value outside a fence instead of deleting it automatically.

Example: the same data, three methods

  1. For 1, 2, 3, 4, 5, the exclusive method returns Q1 = 1.5, Q3 = 4.5, and IQR = 3.
  2. The inclusive and type-7 methods both return Q1 = 2, Q3 = 4, and IQR = 2.
  3. The difference comes from the quartile definition, not a rounding error.

Which quartile method should I use, and why do calculators disagree?

The exclusive method leaves an odd-count median out of both halves. The inclusive method keeps it in both halves. The type-7 method interpolates the 25th and 75th percentiles. Those definitions can produce different Q1 and Q3 values from the same data.

How do the 1.5 x IQR outlier fences work?

After calculating IQR, the tool places the inner fences at Q1 minus 1.5 times IQR and Q3 plus 1.5 times IQR. Values outside that interval are listed as possible outliers and remain in the displayed data.

When IQR is useful

IQR describes the spread of the middle 50% of the observations. It is especially useful for skewed data and for box plots because a very large or very small value does not dominate it the way it can dominate the full range.

Frequently asked questions

How do you calculate the interquartile range?

Sort the data, find Q1 and Q3 with the required quartile method, then subtract: IQR = Q3 - Q1. This calculator shows the sorted data and the method used so you can verify the steps.

How do you find Q1 and Q3?

In the default classroom method, Q1 is the median of the lower half and Q3 is the median of the upper half. If the data count is odd, the default excludes the overall median from those halves; the inclusive method includes it.

Why does my spreadsheet give a different IQR?

Spreadsheet and statistics software often use interpolated percentiles instead of a hand-split median-of-halves method. Switch this calculator to the interpolated percentile method when you need to compare with that style of output.

Can I use IQR to find outliers?

Yes, as a screening rule. Compute Q1 and Q3, find IQR, then use fences at Q1 - 1.5 x IQR and Q3 + 1.5 x IQR. Values outside those fences are possible outliers that should be reviewed, not automatically deleted.

References

(5)
  1. NIST/SEMATECH e-Handbook of Statistical Methods, 7.1.6 - What are outliers in the data?

    NIST/SEMATECH e-Handbook · accessed 2026-07-04

  2. NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.17 - Detection of Outliers

    NIST/SEMATECH e-Handbook · accessed 2026-07-04

  3. Hyndman, R.J. & Fan, Y. (1996). Sample Quantiles in Statistical Packages. The American Statistician 50(4):361-365

    The American Statistician · accessed 2026-07-04

  4. R stats manual - quantile()

    R Core Team · accessed 2026-07-04

  5. PERCENTILE.INC function

    Microsoft Support · accessed 2026-08-24