Interquartile Range Calculator

Calculate Q1, median, Q3 and the interquartile range of a data set

Quartiles use the median-of-halves method.

Your result will appear here.

About the Interquartile Range Calculator

The interquartile range measures the spread of the middle 50% of a data set. It is the difference between the third quartile and first quartile and is less sensitive to extreme values than the full range.

IQR is commonly used with box plots and outlier rules because it focuses on the central half of the ordered data.

How to Use the Interquartile Range Calculator

  1. Enter the numerical data set.
  2. Calculate the first quartile Q1 and third quartile Q3.
  3. Subtract Q1 from Q3 to obtain the IQR.
  4. Use the same quartile convention when comparing results from different software.

How the Calculation Works

IQR = Q3 − Q1. The data are sorted, then quartiles are located using the calculator’s selected percentile or median-of-halves convention.

Potential outlier fences are often estimated as Q1−1.5×IQR and Q3+1.5×IQR, although that rule is a descriptive convention rather than proof that a value is erroneous.

Worked examples

Interquartile Range Calculator Worked Examples

Default

For 2, 4, 5, 7, 8, 10, 12, 15, Q1 is 4.5, the median is 7.5 and Q3 is 11, so the IQR is 6.5.

Odd count

For 1 to 7, Q1 is 2, the median is 4 and Q3 is 6, so the IQR is 4.

Outlier check

For 50, 52, 55, 60, 61, 63, 70, 90, the IQR is 13. The upper fence is 86, so 90 is flagged as a possible outlier.

Quartiles and IQR

Median-of-halves method.

DataQ1MedianQ3IQR
2, 4, 5, 7, 8, 10, 12, 154.57.5116.5
1, 2, 3, 4, 5, 6, 72464
10, 20, 30, 4015253520
3, 5, 7, 8, 12, 13, 14, 18, 216121610
1, 1, 2, 2, 3, 3, 100, 1001.52.551.550
50, 52, 55, 60, 61, 63, 70, 9053.560.566.513

How the calculator works

The data is sorted and split at the median. Q1 is the median of the lower half and Q3 is the median of the upper half. With an odd count, the middle value is left out of both halves. The interquartile range is Q3 − Q1, the spread of the middle 50% of the data. At least four values are needed.

Using the IQR

The IQR ignores the most extreme quarter at each end, so it is not distorted by outliers the way the range is. A common rule flags values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR as possible outliers, which is how box plots draw their whiskers. Other quartile methods exist, so results may differ slightly from some software.

Common Mistakes

  • Using the range. The range is distorted by extremes.
  • Including the median in both halves. This method leaves it out for odd counts.
  • Expecting all software to match. Quartile methods vary.

Result guide

Understanding Your Interquartile Range Calculator Result

A larger IQR means the central half of the data is more spread out. Extreme minimum or maximum values do not directly change the IQR unless they affect quartile positions.

Before you rely on the answer

Assumptions and Limitations

  • The quartile convention is consistent.
  • Values belong to one comparable data set.
  • Outlier fences are descriptive thresholds, not automatic deletion rules.

Practical tip

Using This Result in Practice

Use IQR alongside a plot or ordered list. A flagged outlier may be a valid unusual observation rather than a data error.

Authoritative references

Useful Official Sources

For standards, definitions or real-world guidance related to this calculation, these primary sources may be useful:

Common questions

Interquartile Range Calculator FAQ

What is the interquartile range?

Q3 − Q1, the spread of the middle half.

How do I find Q1?

The median of the lower half.

How are outliers found?

Below Q1 − 1.5 IQR or above Q3 + 1.5 IQR.

Why use IQR instead of SD?

It is resistant to outliers.

How many values do I need?

At least four.

About the author

Adupa Derrick

Adupa Derrick designs every calculator on Numi Calculator, uses AI tools to help draft code and explanations and checks each formula against worked examples and published references before it goes live.

About Numi Calculator Our methodology