How to Calculate Outliers in Excel (3 Easy Ways)

Outliers can distort your data and lead to inaccurate results. This article will teach you how to calculate outliers in Excel and help you deal with outliers. Whether you’re analysing website traffic, examining sales, or student test results, identifying outliers helps you enhance accuracy and clean up your data.

Key Takeaways

➤ Outliers lie far apart from the majority of data points.
➤ IQR method:

    • Quartile 1: =QUARTILE.INC(array,1)
    • Quartile 3: =QUARTILE.INC(array,3)
    • IQR: =Q3-Q1
    • Lower bound: =Q1-1.5*IQR
    • Upper bound: =Q3+1.5*IQR

how to calculate outliers in Excel using the interquartile range method

In this article, we’ll learn about outliers and three methods to calculate outliers in Excel. We’ll explore the interquartile range method, use standard deviation to determine outliers, and apply Excel charts to visualize and detect outliers.

Download Practice Workbook


What is an Outlier in Statistics?

Outliers differ significantly from the rest of the points in a dataset. They lie far outside the range of values and are caused by variations in data, errors in measurement, or unusual events.

Outliers can distort and affect data analyses, so identifying them ensures accurate results and better decision making.

Scatter chart showing outlier


1

Using Interquartile Range to Determine Outliers

In this dataset, we have the daily website visits for an e-commerce site over 15 days.

Daily website visits dataset to calculate outliers in Excel

The website traffic is unusually low on day 2, while it’s significantly high on days 6 and 14. Let’s use Excel to determine if they are outliers, and are there more of them?

Steps:

Select the output cell (F2) and use the formula to calculate the first quartile.

=QUARTILE.INC(B2:B16,1)

Note: For earlier versions of Excel you can use the QUARTILE function.

Calculating first quartile

Again use the QUARTILE.INC function to calculate the third quartile.

=QUARTILE.INC(B2:B16,3)

Calculating third quartile

Subtract the first quartile from the third quartile to get the interquartile range.

=F3-F2

Interquartile range to calculate outlier in Excel

Calculate the lower bound. Any data point below the lower bound is an outlier.

=F2-1.5*F4

Lower bound

Again, obtain the upper bound. Any data point above the upper bound is an outlier.

=F3+1.5*F4

Upper bound

Based on the lower and upper bounds, determine which observations are outliers.

=IF(OR(B2<$F$5,B2>$F$6)=TRUE,"Outlier","Not an Outlier")

Determining if observations are outliers or not

Optional

In the Home tab, go to Sort & Filter >> Click the Filter option.

Filter option

Click the drop-down arrow >> Check outlier >> OK.

Filtering out outliers

The three outliers have been filtered out from the dataset. Learn to deal with outliers in the Handling Outliers section of this blog.

Filter option showing the outliers


2

Calculating Outliers with Standard Deviation

Another way to calculate outliers in Excel is with the STDEV.S function, which gives the sample standard deviation.

Steps:

Calculate the following measures with the formulas given below:

Average:

=AVERAGE(B2:B16)

Sample standard deviation:

=STDEV.S(B2:B16)

Lower bound:

=F2-1.5*F3

Upper bound:

=F2+1.5*F3

Note: For earlier versions of Excel, use the STDEV function instead of STDEV.S. If your dataset represents the entire population, use the STDEVP or STDEV.P function.

Calculating average, standard deviation, upper and lower bounds

Find the outliers using the lower and upper bounds.

=IF(OR(B2<$F$4,B2>$F$5)=TRUE,"Outlier","Not an Outlier")

Determining which data points are outliers

You may use the Filter option to filter out the outliers as shown earlier.


3

Identifying Outliers with Excel Charts

You can visually identify outliers with box plots, histograms, and scatter plots.

Box Plot

Box plots display outliers as dots. Any point above and below the whiskers is an outlier.

Steps:

Select the data (B2:B16) >> Insert >> Statistic Chart >> Box and Whisker.

Inserting box plot

The three outliers (circled) are shown in the box plot.

Boxplot showing the outliers

Histogram

Histograms show outliers as isolated bars far apart from the rest of the bars.

Steps:

Select the data range >> Insert >> Statistic Chart >> Histogram.

Inserting histogram

Double-click the horizontal axis >> Axis Options >> Set the number of bins (6).

Histogram showing outliers

The two outliers are located to the right while the other outlier is to the left.

Scatter Plot

Scatter plots show a trend where most of the observations fall. Outliers do not fit this trend and are far apart from the other points.

Steps:

Select the data >> Insert >> Scatter or Bubble Chart >> Scatter.

Inserting scatterplot

The outliers are circled and appear far apart from the rest of the observations.

Scatterplot showing outliers


Handling Outliers

Deleting outliers: You can delete outliers or use the Filter option for large datasets. It’s advisable to keep a copy of the original data with outliers before deleting them.

Replacing outliers: You can replace outliers instead of deleting them.

    • Transformation: Use natural log, take square root, etc. to reduce distortion.
    • Truncation: Set a range and replace outliers (above or below) with a certain value within this range.

Keeping outliers: Instead of deleting or replacing outliers, you can analyze them to draw insights and their causes. For example, a sudden drop in website traffic may indicate technical issues like slow loading of the website. In contrast, a sudden rise in traffic may indicate festivities, social events, etc.


FAQ

What is the formula for calculating outliers?

Any value below the lower bound or greater than the upper bound is an outlier.

Lower bound: =Q1-1.5*IQR
Upper bound: =Q3+1.5*IQR

What is an outlier in an Excel box plot?

Any point outside (above or below) the whisker is an outlier.

How to identify outliers in an Excel scatter plot?

Any data point isolated from the majority of data points is an outlier.

How to use z-score to find outliers in Excel?

Calculate the Z score of each data point, z: =(value - mean)/standard deviation
Any data point with a Z score greater than 3 is an outlier.

How to remove outliers?

You can insert a Filter  Ctrl+Shift+L  to remove out the outliers.


Wrapping Up

In this tutorial, we’ve learned about outliers and how to calculate outliers using interquartile range and standard deviation. We’ve also learned to identify outliers visually with Excel charts. Feel free to download the practice file and let us know your preferred method.

ExcelInsider Team
We will be happy to hear your thoughts

Leave a reply

Excel Insider
Logo