How to Know If There Are Outliers in a Data Set

You can identify outliers in a data set using a few reliable methods, ranging from simple visual checks to precise mathematical formulas. The most common approach uses the interquartile range (IQR): any value falling more than 1.5 times the IQR below the first quartile or above the third quartile is flagged as an outlier. Other methods use standard deviations or statistical tests, depending on your data size and goals.

The IQR Method: Most Widely Used

The interquartile range method works by measuring how spread out the middle 50% of your data is, then using that spread to set boundaries. Here’s how to do it step by step:

  • Sort your data from smallest to largest.
  • Find Q1 and Q3. Q1 is the median of the lower half of your data. Q3 is the median of the upper half.
  • Calculate the IQR. Subtract Q1 from Q3.
  • Build your fences. Multiply the IQR by 1.5. Subtract that number from Q1 to get the lower fence. Add it to Q3 to get the upper fence.
  • Flag the outliers. Any data point below the lower fence or above the upper fence is an outlier.

For example, if Q1 is 80 and Q3 is 90, the IQR is 10. Multiply 10 by 1.5 to get 15. Your lower fence is 65 and your upper fence is 105. Any value below 65 or above 105 is an outlier.

John Tukey, who developed this approach, actually distinguished between two levels of unusual values. Points beyond the 1.5 × IQR fences (the “inner fences”) are considered moderate outliers, which he called “outside” values. Points beyond 3 × IQR from the quartiles (the “outer fences”) are extreme outliers, which he labeled “far out.” If a value crosses that outer fence, it deserves serious scrutiny.

The Z-Score Method

If your data follows a roughly bell-shaped (normal) distribution, you can use the z-score to spot outliers. A z-score tells you how many standard deviations a data point sits from the mean. You calculate it by subtracting the mean from the value, then dividing by the standard deviation.

Any value with a z-score above 3 or below -3 is typically considered an outlier. In a normal distribution, about 99.7% of data falls within three standard deviations of the mean, so anything beyond that range is genuinely rare. The NIH uses this same threshold of plus or minus three standard deviations as its working definition of an outlier.

One important caveat: the mean and standard deviation are themselves pulled toward extreme values. If you have a massive outlier in your data, it inflates the standard deviation and shifts the mean, which can actually mask the outlier by making its z-score look less extreme than it really is. The IQR method doesn’t have this problem because quartiles are resistant to extreme values.

Spotting Outliers Visually

Before running any calculations, a quick graph can reveal obvious outliers. Box plots are the most direct visual tool for this purpose. The box shows Q1 to Q3, and the “whiskers” extend to the most extreme non-outlier values. Any points plotted individually beyond the whiskers are outliers, following the same 1.5 × IQR rule built into the plot. The CDC notes that these individual dots outside the whiskers make outliers immediately visible, no math required.

Histograms help too. Look for isolated bars separated by gaps from the main cluster of data. If most of your values form a shape in the center and one or two bars sit far off to one side with empty space between them, those isolated values are likely outliers. Scatter plots serve a similar role when you’re looking at two variables together: points that sit far away from the general cloud or trend line stand out visually.

Visual methods are a great first pass, but they’re subjective. They tell you something looks unusual without giving you a precise cutoff. Use them to guide your investigation, then confirm with a numerical method.

Statistical Tests for Small Data Sets

When your data set is small (roughly 3 to 10 values), formal statistical tests can determine whether a suspected outlier is genuinely inconsistent with the rest of your data or just normal variation.

Dixon’s Q test compares the gap between the suspected outlier and its nearest neighbor to the total range of the data set. A large gap relative to the range suggests the value doesn’t belong. This test works well for a single suspected outlier in small samples, though extended versions exist for checking multiple outliers.

Grubbs’ test is now recommended over Dixon’s Q test by the International Standards Organization (ISO). It works similarly but compares the suspected outlier’s distance from the mean to the overall spread. The ISO guidelines suggest using a strict significance level of 0.01 as the minimum threshold for actually rejecting a suspected outlier, and flagging values at the 0.05 level as “stragglers” that deserve caution but not automatic removal.

Both tests assume your underlying data is normally distributed. If your data is skewed or follows a different pattern, these tests can give misleading results.

Outliers in Regression and Multi-Variable Data

When you’re working with a regression model (predicting one variable from others), outliers take on a different meaning. A point might not look unusual on its own but could be dragging your entire trend line in the wrong direction. These are called influential points.

Cook’s distance is the standard tool for finding them. It measures how much your regression results would change if you removed a single data point. A Cook’s distance greater than 0.5 signals that the point is worth investigating. A value greater than 1 means the point is quite likely influencing your results in a meaningful way. A practical shortcut many analysts use: if one point’s Cook’s distance visually jumps out from all the others, it’s almost certainly influential regardless of the exact number.

For data with many variables measured simultaneously, you need a method that accounts for how those variables relate to each other. The Mahalanobis distance does this by measuring how far a data point sits from the center of all your variables at once, adjusting for correlations between them. However, the standard version of this measure uses the mean and covariance of your sample, which are themselves sensitive to outliers. A robust variant that downweights suspicious points before calculating the distance performs better in practice.

What To Do Once You Find Outliers

Detecting an outlier is only the first step. The harder question is what to do about it, and the answer depends entirely on why it’s there.

Some outliers are errors: a typo during data entry, a sensor malfunction, a measurement taken under the wrong conditions. These should be corrected if possible or removed if not. Other outliers are real but fall outside a known physiological or physical range. In biomedical research, for instance, a value that’s impossible given human biology can be dropped with a clear justification.

But many outliers are genuine, surprising observations. Removing them just because they’re unusual can distort your results and hide real patterns. If you can’t identify a concrete reason why the value is wrong, consider keeping it and using methods that are less sensitive to extreme values.

Two common approaches let you reduce the impact of outliers without deleting data entirely. Trimming removes a fixed number of the smallest and largest values from both ends of your data before calculating statistics like the mean. Winsorizing takes a gentler approach: instead of deleting those extreme values, it replaces them with the next closest non-extreme value. Both reduce the pull of outliers while preserving your sample size.

Whatever you decide, document it. Record which values you flagged, what method you used to identify them, and why you chose to keep, remove, or adjust them. Transparency about outlier handling is one of the clearest signals of trustworthy analysis.