How to Find Quartiles, the IQR and Outliers (and Why Answers Differ)

Find Q1, Q3 and the interquartile range by hand, apply the 1.5 × IQR outlier rule, and see why textbooks, calculators and Excel can give different quartiles.

Updated September 29, 2026 7 min read

Use the free Mean, Median, Mode CalculatorMean, median, mode, range, quartiles, IQR and outliers with worked steps

The mean, median and mode tell you where the middle of a data set is. They say nothing about how the values are spread, or whether one strange value is pulling everything off course. Quartiles and the interquartile range (IQR) answer those questions, and they are the basis of the most widely taught test for outliers.

This guide shows how to find quartiles by hand for odd and even sized data sets, how to use the IQR to flag outliers, how to read a five-number summary, and why your textbook, a graphing calculator and a spreadsheet can all return slightly different quartiles for the same numbers. If you want a refresher on choosing between mean, median and mode first, see Mean, Median, Mode and Standard Deviation: When to Use Each.

What quartiles are

Quartiles cut a sorted data set into four parts with roughly the same number of values in each:

  • Q1 (lower quartile): about 25% of values are below it.
  • Q2: the median, with 50% below.
  • Q3 (upper quartile): about 75% of values are below it.

The interquartile range is IQR = Q3 − Q1. It measures the spread of the middle half of the data, which makes it far less sensitive to extreme values than the range (max − min) or even the standard deviation.

Worked example with an odd number of values

A support team logs the number of tickets per day for 11 days:

7, 3, 9, 3, 12, 5, 8, 3, 10, 41, 6

Step 1: sort. 3, 3, 3, 5, 6, 7, 8, 9, 10, 12, 41

Step 2: the median. With n = 11 (odd), the median is in position (n + 1) ÷ 2 = 6, which is 7.

Step 3: split into halves. Leave the median out. The lower half is 3, 3, 3, 5, 6 and the upper half is 8, 9, 10, 12, 41.

Step 4: quartiles. Q1 is the median of the lower half, 3. Q3 is the median of the upper half, 10.

Step 5: IQR. 10 − 3 = 7.

For comparison, the mean is 107 ÷ 11 ≈ 9.73, well above the median, and the mode is 3. That gap between mean and median is the first hint that something is dragging the average upwards.

The 1.5 × IQR rule for outliers

The standard rule, popularised by the statistician John Tukey for box plots, builds two "fences":

lower fence = Q1 − 1.5 × IQR
upper fence = Q3 + 1.5 × IQR

Anything outside the fences is flagged as a potential outlier. In the example:

  • Lower fence: 3 − 1.5 × 7 = −7.5
  • Upper fence: 10 + 1.5 × 7 = 20.5

The value 41 is above 20.5, so it is an outlier. No values are below −7.5. Some texts also use 3 × IQR fences to mark "extreme" outliers. Here that wider upper fence is 10 + 3 × 7 = 31, and 41 is beyond it too.

An outlier is a flag, not a verdict. The 41 might be a data-entry error, or it might be the day a product outage caused a flood of tickets. Check the record before you delete anything; if it is genuine, report it rather than hide it.

Worked example with an even number of values

Eight delivery times, in minutes, already sorted:

11, 12, 13, 14, 15, 16, 18, 22

With n = 8 (even), the median is the average of positions 4 and 5: (14 + 15) ÷ 2 = 14.5. The data split cleanly into two halves of four:

  • Lower half 11, 12, 13, 14 gives Q1 = (12 + 13) ÷ 2 = 12.5
  • Upper half 15, 16, 18, 22 gives Q3 = (16 + 18) ÷ 2 = 17
  • IQR = 4.5, fences 5.75 and 23.75, so there are no outliers.

The five-number summary

Minimum, Q1, median, Q3 and maximum together are called the five-number summary. For the ticket data it is 3, 3, 7, 10, 41. Read it like this:

  • Q1 equal to the minimum means at least a quarter of days had the lowest count.
  • The median sitting closer to Q1 than to Q3, plus a maximum far beyond Q3, signals a right-skewed data set with a long upper tail.

A box plot is just this summary drawn: a box from Q1 to Q3, a line at the median, and whiskers out to the most extreme values inside the fences, with outliers drawn as separate points.

Why different tools give different quartiles

There is no single agreed definition of a quartile for small data sets, and at least nine methods appear in statistical software. The two you are most likely to meet are:

Method How it works Used by
Median of halves Median of the lower and upper halves, excluding the overall median when n is odd Most school courses, TI-84 style calculators
Linear interpolation Position (n − 1) × p counting from 0, interpolating between neighbours Excel QUARTILE.INC, Google Sheets QUARTILE, R's default

For the ticket data, interpolation puts Q1 at position 2.5, halfway between 3 and 5, so Q1 = 4. Q3 sits at position 7.5, halfway between 9 and 10, so Q3 = 9.5. The IQR becomes 5.5 instead of 7 and the upper fence drops to 17.75. The outlier conclusion does not change here, but for a borderline value it can. Excel also offers QUARTILE.EXC, which uses yet another position rule.

The practical rule: use the method your course, report or colleague uses, and say which one it was. With large data sets the methods converge and the difference stops mattering.

Finding quartiles with the calculator

The Mean, Median, Mode Calculator computes all of this at once.

  1. Paste or type your numbers into Data set. Commas, spaces or new lines all work, and anything non-numeric is ignored with a warning so you can spot typos.
  2. Choose the Quartile method: Median of halves (school / TI-84) or Interpolation (Excel QUARTILE.INC).
  3. Read the mean at the top, then the median, mode, range, Q1 / Q3, IQR and the list of outliers under the 1.5 × IQR rule.
  4. Open Show steps for every measure to see the sorted list, the median position, how the halves were split and the fence calculations.
  5. Check the Sorted data strip below the result: the median position is highlighted, the mode is tinted and outliers are shown in red.

Switching the quartile method is a quick way to see whether a borderline outlier depends on the definition you chose.

Other ways to do it

  • Spreadsheets: =QUARTILE.INC(A1:A11, 1) and =QUARTILE.INC(A1:A11, 3) give interpolated quartiles; build the fences with ordinary formulas. Spreadsheets are the better choice for thousands of rows or data you update often.
  • Graphing calculators: the one-variable statistics function usually reports Q1 and Q3 using the median-of-halves method.
  • By hand: perfectly practical up to 20 or 30 values, and the best way to learn what the numbers mean.

For spread measured around the mean rather than the median, the Standard Deviation Calculator is the natural next step, and the Z-Score Calculator offers an alternative outlier check for roughly bell-shaped data.

Common mistakes

  • Not sorting first. Quartiles of unsorted data are meaningless.
  • Including the median in both halves when n is odd, then comparing with an answer key that excludes it (or vice versa).
  • Deleting outliers automatically. The rule identifies values worth investigating; it does not prove they are wrong.
  • Using the range to compare spread when one extreme value dominates it. The IQR is the robust choice.

Frequently asked questions

What does the interquartile range tell you?

It is the width of the middle 50% of your data. A small IQR means typical values are tightly grouped; a large one means they vary widely, regardless of a few extremes.

Is the median the same as Q2?

Yes. The second quartile is the median by definition, so every quartile method agrees on it.

Why is 1.5 used in the outlier rule?

It is a convention chosen as a practical balance: for normally distributed data it flags only about 0.7% of values, so anything outside the fences is genuinely unusual. It is a rule of thumb, not a law.

Can a data set have no outliers?

Yes. If every value lies between Q1 − 1.5 × IQR and Q3 + 1.5 × IQR, the rule flags nothing, as in the delivery-time example.

Why doesn't my calculator's Q1 match Excel?

They use different quartile definitions. Most school calculators take the median of each half, while Excel's QUARTILE.INC interpolates between values, so small data sets can give different Q1 and Q3.

Try it now: Mean, Median, Mode Calculator

Loading tool…