AbraCalc

Interquartile Range (IQR) Calculator

Calculate the interquartile range from the first and third quartiles (Q1 and Q3). IQR measures the middle 50% spread of data and is robust to outliers, used in box plots and outlier detection.

Embed this tool on your site

How to use this tool

  1. Enter first quartile (q1) and third quartile (q3) in the fields above.
  2. Results update instantly as you type โ€” or click Calculate.
  3. Read your interquartile range (iqr) and the full breakdown beneath it.

Formula

IQR = Q3 - Q1; Fences: Q1 - 1.5*IQR and Q3 + 1.5*IQR

How it works

Subtract Q1 from Q3 to obtain the IQR. Tukey fences at Q1-1.5*IQR and Q3+1.5*IQR identify potential outliers. Q3 must be greater than or equal to Q1.

Worked example

Exam score distribution

  1. Q1 = 25, Q3 = 75
  2. IQR = 75 - 25 = 50
  3. Lower fence = 25 - 75 = -50 (no practical lower outliers)
  4. Upper fence = 75 + 75 = 150

Common mistakes to avoid

  • Confusing Q1 and Q3 with the 1st and 3rd data values in a sorted list โ€” Q1 is the 25th percentile and Q3 is the 75th percentile, computed from the distribution, not simply the first and third data points.
  • Subtracting Q3 from Q1 instead of Q1 from Q3 โ€” IQR = Q3 - Q1 and must be positive.
  • Using IQR with the wrong outlier fence formula โ€” some sources use 1.5*IQR, others 3*IQR (for extreme outliers); mixing them changes which points are flagged.

Key terms

Frequently asked questions

How are outliers defined using IQR?
A common rule: values below Q1 - 1.5*IQR or above Q3 + 1.5*IQR are flagged as outliers (Tukey fences). Values beyond Q1 - 3*IQR or Q3 + 3*IQR are sometimes called extreme outliers.
Why is IQR preferred over range for measuring spread?
IQR measures the spread of the middle 50% of data, making it resistant to extreme values. A single outlier can inflate the range enormously while leaving the IQR unchanged.
How is IQR used in box plots?
In a standard box plot, the box extends from Q1 to Q3 (its length is the IQR). The median is drawn inside the box. Whiskers extend to the furthest data points within 1.5*IQR of the quartiles; points beyond are plotted individually as outliers.