Identifying Outliers

Learn what an outlier is, how to find it with the 1.5 × IQR rule, and how it changes the mean, median and range.

Intermediate25 minLesson

Definition

An outlier is a data value that lies unusually far from the rest of the data. It is much smaller or much larger than the other values.

The 1.5 × IQR rule

To decide in a fair way whether a value is an outlier, we build two fences from the quartiles:
Lower fence=Q1−1.5×IQR\text{Lower fence} = Q_1 - 1.5 \times \text{IQR}
Upper fence=Q3+1.5×IQR\text{Upper fence} = Q_3 + 1.5 \times \text{IQR}
where IQR=Q3−Q1\text{IQR} = Q_3 - Q_1. Any value below the lower fence or above the upper fence is an outlier. A value exactly on a fence is not an outlier.

How to find outliers

  1. 1.Order the data and find Q1Q_1 and Q3Q_3 (medians of the lower and upper half, as in Range and Interquartile Range)
  2. 2.Calculate IQR=Q3−Q1\text{IQR} = Q_3 - Q_1
  3. 3.Multiply: 1.5×IQR1.5 \times \text{IQR}
  4. 4.Lower fence =Q1−1.5×IQR= Q_1 - 1.5 \times \text{IQR}, upper fence =Q3+1.5×IQR= Q_3 + 1.5 \times \text{IQR}
  5. 5.Every value outside the fences is an outlier

Outliers in a box plot

In a box plot, outliers are drawn as separate dots. The whiskers stop at the smallest and largest values that are not outliers.

Why outliers matter

An outlier pulls the mean and stretches the range, but it barely moves the median or the IQR. That is why the median and IQR are called resistant measures.
Other methods exist too: with the standard deviation, a value more than 2 or 3 standard deviations from the mean is often called unusual (see Standard Deviation).

Try it now

What is an outlier?

Worked Examples

A data set has Q1=20Q_1 = 20 and Q3=30Q_3 = 30. Which of the values 22, 1818, 4444 and 5050 are outliers?
1

Find the IQR

IQR=Q3−Q1=30−20\text{IQR} = Q_3 - Q_1 = 30 - 20 → IQR=10\text{IQR} = 10
2

Multiply the IQR by 1.5

1.5×101.5 \times 10 → 1515
3

Find the lower fence

Q1−15=20−15Q_1 - 15 = 20 - 15 → Lower fence =5= 5
4

Find the upper fence

Q3+15=30+15Q_3 + 15 = 30 + 15 → Upper fence =45= 45
5

Compare each value with the fences

2<52 < 5 (outside), 1818 and 4444 are between 55 and 4545 (inside), 50>4550 > 45 (outside) → Outliers: 22 and 5050

Common Mistakes

Using Q3+IQRQ_3 + \text{IQR} instead of Q3+1.5×IQRQ_3 + 1.5 \times \text{IQR}

Why it's wrong: Forgetting the factor 1.51.5 makes the fences too close to the box, so ordinary values get marked as outliers.

Correct: Always multiply first: 1.5×IQR1.5 \times \text{IQR}, then subtract it from Q1Q_1 and add it to Q3Q_3.

Building the fences from the median, the minimum or the maximum

Why it's wrong: The rule measures distance from the box, and the box ends at Q1Q_1 and Q3Q_3.

Correct: Lower fence =Q1−1.5×IQR= Q_1 - 1.5 \times \text{IQR}, upper fence =Q3+1.5×IQR= Q_3 + 1.5 \times \text{IQR}. Never start from the median or the extremes.

Drawing the whisker all the way to the outlier

Why it's wrong: Then the outlier looks like part of the normal spread, and the box plot hides it.

Correct: The whisker ends at the largest (or smallest) value that is not an outlier. Draw each outlier as a separate dot.

Deleting every outlier automatically

Why it's wrong: An outlier can be a real and important value, like a record time or a very large order.

Correct: Remove or correct a value only when it is an error (typo, broken instrument, wrong unit). Keep real outliers and report them, or use the median and IQR.

Interactive Visual

Box Plot Builder

12Q1: 12.515Q3: 16.518
Min
12
Q1
12.5
Median
15
Q3
16.5
Max
18
IQR (Q3 - Q1):4
Range:6
Outliers:3
Sorted data:
3; 12; 13; 14; 15; 15; 16; 17; 18
n = 9

Click on parts of the box plot to learn what they represent.

Comparing box plots

As recorded (2 and 52 included)Sensor errors removed0102030405060Temperature (°C)
As recorded (2 and 52 included)Sensor errors removed
Min2121
Q12323.5
Median2626
Q32928.5
Max3030
IQR65
Range99
Outliers2; 52-

All box plots share one axis, so you can compare medians, boxes (IQR) and ranges directly. Tap a box to highlight it. Circles are outliers: more than 1.5 × IQR outside the box.

Dot Plot

Bus rides without the breakdown: 12, 14, 15, 16, 18 minutes

102030405060

Each dot is one value (5 values in total).

Mean = 15

Median = 15

Tap a column to count its dots.

Dot Plot

With the breakdown day: 12, 14, 15, 16, 18, 51 minutes

102030405060

Each dot is one value (6 values in total).

Mean = 21

Median = 15.5

Tap a column to count its dots.

Interactive Sandbox

Expression Calculator

Try these:

History

No calculations yet

Practice Problems

18 problems
Problem 1 of 18
Easy
What is an outlier?

Why It Matters

Outliers show up wherever people collect data:
  • Banks: a card payment far above your usual purchases is flagged as possible fraud
  • Factories: a bottle filled with much less juice than the others is an outlier that quality control removes from the line
  • Science: a thermometer reading of 52°C52°C on a mild day is probably a broken sensor, not a heat wave
  • Sports: a world record is a real outlier, and it is the most interesting value of all
  • Salaries: one very high salary makes the mean salary look much higher than what most people earn
Finding outliers helps you spot mistakes, notice something special, and choose the right measure (mean or median) to describe your data honestly.

Real World Applications

Spotting Card Fraud

Banks compare each new card payment with the customer's usual payments. A payment above the upper fence can trigger a security check.

Example:

A customer's payments have Q1=20Q_1 = 20 dollars and Q3=60Q_3 = 60 dollars. A payment of 450 dollars is far above the upper fence, so the bank sends a text message to confirm it.

1Try It Yourself

A customer's usual card payments have Q1=20Q_1 = 20 dollars and Q3=60Q_3 = 60 dollars. Suddenly a payment of 450 dollars appears.

What is the upper fence for this customer's payments (in dollars)?

Step 1: Write the mathematical expression

Calculate Q3+1.5×IQRQ_3 + 1.5 \times \text{IQR}:

Quality Control in a Factory

Juice bottles should all hold about the same amount. Bottles below the lower fence are taken off the line and checked.

Example:

If most bottles hold between 498 mL and 502 mL, a bottle with 480 mL is clearly underfilled and the machine may need repair.

2Try It Yourself

Fill volumes of juice bottles have Q1=498Q_1 = 498 mL and Q3=502Q_3 = 502 mL.

What is the lower fence (in mL)?

Step 1: Write the mathematical expression

Calculate Q1−1.5×IQRQ_1 - 1.5 \times \text{IQR}:

Reporting a Typical Salary

News reports often give the median salary instead of the mean, because a few very high salaries pull the mean up.

Example:

In a small company, five employees earn between 30 and 38 thousand dollars a year and the owner earns 160 thousand dollars. The owner's salary is an outlier.

3Try It Yourself

Yearly salaries in thousands of dollars: 30,32,34,36,38,16030, 32, 34, 36, 38, 160.

What is the mean salary (in thousands of dollars)?

Step 1: Write the mathematical expression

Add all six salaries and divide by 6:

Key Takeaways

  • 1An outlier is a value unusually far from the rest of the data, either very small or very large
  • 21.5 × IQR rule: lower fence =Q1−1.5×IQR= Q_1 - 1.5 \times \text{IQR}, upper fence =Q3+1.5×IQR= Q_3 + 1.5 \times \text{IQR}
  • 3Values below the lower fence or above the upper fence are outliers; a value exactly on a fence is not
  • 4In a box plot, outliers are separate dots and the whiskers stop at the last values inside the fences
  • 5Outliers pull the mean and stretch the range, while the median and IQR barely change
  • 6Correct or remove an outlier only if it is an error; keep real outliers and report them

Frequently Asked Questions

The factor 1.51.5 was chosen by the statistician John Tukey because it works well in practice: it flags values that are really unusual without marking too many ordinary values. Some books also use 3×IQR3 \times \text{IQR} for "extreme" outliers.
The factor 1.51.5 was chosen by the statistician John Tukey because it works well in practice: it flags values that are really unusual without marking too many ordinary values. Some books also use 3×IQR3 \times \text{IQR} for "extreme" outliers.
Yes to both. Many data sets have no outliers at all, and some have several, on one side or on both sides (like the temperatures 22 and 5252 in the examples).
No. The minimum and maximum are just the smallest and largest values. They are outliers only if they lie outside the fences. For example, in 60,65,70,72,75,78,80,9560, 65, 70, 72, 75, 78, 80, 95 the upper fence is 96.2596.25, so the maximum 9595 is not an outlier.
Yes. With the standard deviation you can measure how many standard deviations a value is from the mean (its z-score). Values more than 2 or 3 standard deviations away are often called unusual. The 1.5 × IQR rule is used for box plots because it does not depend on the mean, which outliers distort.

Glossary

Outlier
A data value that lies unusually far from the other values; by the 1.5 × IQR rule, a value below the lower fence or above the upper fence
Lower fence
The boundary Q1−1.5×IQRQ_1 - 1.5 \times \text{IQR}; values below it are outliers
Upper fence
The boundary Q3+1.5×IQRQ_3 + 1.5 \times \text{IQR}; values above it are outliers
1.5 × IQR rule
A method for finding outliers: build fences 1.5 IQRs below Q1Q_1 and 1.5 IQRs above Q3Q_3
Resistant measure
A statistic that changes very little when an outlier is added, such as the median and the IQR

Formula Card

Interquartile range

IQR=Q3−Q1\text{IQR} = Q_3 - Q_1

The spread of the middle 50% of the data

Lower fence

Q1−1.5×IQRQ_1 - 1.5 \times \text{IQR}

Values below the lower fence are outliers

Upper fence

Q3+1.5×IQRQ_3 + 1.5 \times \text{IQR}

Values above the upper fence are outliers

Today's challengeOne problem, three tries

More in This Topic