Here are the minutes nine friends spent on homework last night: 20, 25, 25, 30, 30, 35, 40, 45, 180. Eight values sit within 25 minutes of each other, and then 180 is more than two hours past the next one. On a dot plot your eye spots it at once. Outlier detection turns that impression into a rule, so two people looking at the same data flag the same points.
The IQR rule measures 'far' with the spread of the middle half. Here Q1=25 and Q3=42.5, so IQR=17.5 and 1.5×IQR=26.25. The fences sit at 25−26.25=−1.25 and 42.5+26.25=68.75. Only 180 lies outside. Quartiles ignore the extremes, so a wild value cannot stretch the ruler that judges it. A z-score rule is weaker here: 180 inflates the standard deviation to about 50, so its own z-score is only about 2.6.
The largest value is not automatically an outlier. In this data set 45 is the second largest and sits well inside the fences. In strongly right-skewed data such as incomes, many top values are part of a long, smooth tail, and the shape, not an error, explains them.
A flag starts an investigation. Check the source: a reading of 6 m for a student's height is a typo to fix; a 180-minute homework night may simply be true and worth reporting.
Think of it like this. An outlier rule is a smoke alarm for data. It beeps when a value is far from the rest, and then you go and look: usually burnt toast (a typo or glitch), occasionally a real fire (a genuine extreme). You never tear out the kitchen because it beeped. Unlike an alarm, you choose the sensitivity: 1.5 IQR or 3 standard deviations.
Core idea. A value counts as an outlier only relative to the spread of the rest of the data; a rule turns 'far away' into a fence, and a flag means investigate, not delete.