How to Calculate IQR (Interquartile Range) – A Simple Guide

๐Ÿง Waitโ€ฆ Whatโ€™s the Interquartile Range?

Great question!

The Interquartile Range, or IQR, is a way to measure how spread out the middle 50% of your data is. It helps you understand how โ€œtightly packedโ€ or โ€œspread outโ€ your values areโ€”without being tricked by extreme values (aka outliers).

In short:
IQR = Q3 โˆ’ Q1

Where:

  • Q1 (1st Quartile) is the median of the lower half of your data
  • Q3 (3rd Quartile) is the median of the upper half of your data

๐Ÿงฎ Step-by-Step: How to Calculate IQR

Letโ€™s walk through it together with an example!

๐Ÿ“Š Example Data Set

4, 7, 10, 15, 18, 21, 25, 29, 33

Arrange the numbers in order

(Already done โœ…)

Find the Median (Middle Value)

There are 9 numbers, so the middle one is: Median = 18
(This just helps us split the data into halves.)

Split the data into two halves

  • Lower half: 4, 7, 10, 15
  • Upper half: 21, 25, 29, 33

(Exclude the median if there’s an odd number of values.)

Find Q1 and Q3

  • Q1 = Median of lower half = (7 + 10)/2 = 8.5
  • Q3 = Median of upper half = (25 + 29)/2 = 27

Subtract to find the IQR

IQR = Q3 โˆ’ Q1  
IQR = 27 โˆ’ 8.5 = 18.5

๐ŸŽ‰ So, the IQR is 18.5!

๐Ÿ’ก Why Is IQR Useful?

  • It tells you where the โ€œmiddle chunkโ€ of your data lies.
  • It ignores outliers (super high or low numbers).
  • It’s great for comparing consistency between data sets.

โš ๏ธ Quick Tips

  • Always sort your data first!
  • If you have an even number of values, finding medians means averaging the middle two.
  • IQR is especially handy when youโ€™re looking at box plots or checking for outliers (which are usually 1.5ร—IQR above Q3 or below Q1).

๐Ÿ“ฆ Wrapping It Up

The Interquartile Range is like the heart of your dataโ€”it tells you how tightly your core values are packed. Itโ€™s a super handy tool in statistics, data science, and even school test scores.

Just remember: โžก๏ธ IQR = Q3 โˆ’ Q1
โ€ฆand youโ€™re golden!