Interquartile Range Calculator

StatisticsFreeNo sign-up

The interquartile range (IQR) is the spread of the middle half of a data set: IQR = Q₃ − Q₁. For 1, 3, 5, 7, 9, 11, 13, 15, the lower half has median Q₁ = 4 and the upper half Q₃ = 12, so IQR = 8. Values beyond 1.5 × IQR from the quartiles are outliers.

FreeStep by stepBox plot
Try:
Interquartile range
\(\displaystyle \mathrm{IQR} = Q_{3} – Q_{1} = 12 – 4 = 8\)
The middle 50% of the data lies between 4 and 12.
−50510152025Q₁MedQ₃

Box plot: the box spans Q₁ to Q₃ (the IQR), the line is the median, whiskers reach the most extreme values inside the fences, and circles are outliers.

Five-number summary
Minimum 1
Q₁ (first quartile) 4
Median 8
Q₃ (third quartile) 12
Maximum 15
Spread
Interquartile range (IQR) 8
Range 14
Semi-interquartile range 4
Lower fence −8
Upper fence 24
Outliers none
Count n 8
Other quartile methods
Inclusive (Excel QUARTILE.INC) Q₁ 4.5, Q₃ 11.5, IQR 7
Exclusive (Excel QUARTILE.EXC) Q₁ 3.5, Q₃ 12.5, IQR 9
Show steps
  1. Sort the data: 1, 3, 5, 7, 9, 11, 13, 15
  2. The median is 8. n = 8 is even, so split the data into two halves of 4.
  3. Lower half: median Q₁ = 4. Upper half: median Q₃ = 12.
  4. IQR = Q₃ − Q₁ = 12 − 4 = 8
  5. Outlier fences: Q₁ − 1.5·IQR = −8 and Q₃ + 1.5·IQR = 24. No value is outside the fences, so there are no outliers.

How to use the IQR calculator

  1. Paste or type the data, separated by commas, spaces or new lines.
  2. Choose a quartile method; the default (median of each half) is the one most textbooks and TI calculators use.
  3. Press Calculate to get the IQR, the five-number summary, outlier fences and a box plot.

How to find the interquartile range

  1. Sort the data from smallest to largest.
  2. Find the median. It splits the data into a lower half and an upper half (leave the median out of both halves when n is odd).
  3. Q₁ is the median of the lower half; Q₃ is the median of the upper half.
  4. IQR = Q₃ − Q₁.

Example: 2, 4, 4, 5, 6, 7, 8, 9, 30. The median is 6. Lower half 2, 4, 4, 5 gives Q₁ = 4; upper half 7, 8, 9, 30 gives Q₃ = 8.5. IQR = 4.5.

Outliers and the 1.5 × IQR rule

Lower fence = Q₁ − 1.5 × IQR and upper fence = Q₃ + 1.5 × IQR. In the example, the fences are −2.75 and 15.25, so 30 is an outlier. Because the IQR ignores the most extreme values, it is not distorted by outliers the way the range and standard deviation are.

Why quartile methods differ

Method Used by Q₁, Q₃ for 1, 3, …, 15
Median of halves TI-83/84, most textbooks 4, 12
Inclusive Excel QUARTILE.INC, Google Sheets 4.5, 11.5
Exclusive Excel QUARTILE.EXC, Minitab 3.5, 12.5

All are correct definitions; use the one your class or software uses. The calculator shows all three.

Interquartile range practice quiz: 10 questions

Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.

Question 1 of 10
1. Q₁ = 12 and Q₃ = 20. What is the IQR?

Found a mistake? Let us know!

2. What share of the data lies between Q₁ and Q₃?

Found a mistake? Let us know!

3. Data: 1, 2, 3, 4, 5, 6, 7, 8. What is Q₁ (median of halves)?

Found a mistake? Let us know!

4. Data: 1, 2, 3, 4, 5, 6, 7, 8. What is Q₃?

Found a mistake? Let us know!

5. Q₁ = 10, Q₃ = 18. What is the upper outlier fence?

Found a mistake? Let us know!

6. Q₁ = 10, Q₃ = 18. Is −5 an outlier?

Found a mistake? Let us know!

7. Which measure is least affected by one very large value?

Found a mistake? Let us know!

8. The five-number summary is…

Found a mistake? Let us know!

9. In a box plot, the length of the box shows…

Found a mistake? Let us know!

10. Data 5, 7, 9, 11, 13 (n = 5). Q₁ by median of halves (median excluded) is…

Found a mistake? Let us know!

Frequently asked questions

How do you calculate the interquartile range?

Sort the data, find the first quartile Q₁ (median of the lower half) and the third quartile Q₃ (median of the upper half), then subtract: IQR = Q₃ − Q₁.

What does the IQR tell you?

How spread out the middle 50% of the data is. A small IQR means the central values are close together.

How do you find outliers with the IQR?

Values below Q₁ − 1.5 × IQR or above Q₃ + 1.5 × IQR are usually called outliers.

Why does Excel give a different IQR?

Excel’s QUARTILE.INC and QUARTILE.EXC interpolate between data values, while many textbooks use medians of halves. Choose the matching method in the calculator.

Is the IQR the same as the range?

No. The range is maximum minus minimum and uses the two most extreme values; the IQR uses only the middle half.

Sources

Related calculators

Browse all calculators

More statistics calculators

Browse all 354 calculators

Related to This Article

What people say about "Interquartile Range (IQR) Calculator with Box Plot"?

No one replied yet.

Leave a Reply