 Please Note: This article is written for users of the following Microsoft Excel versions: 2007 and 2010. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Excluding Values from Averaging.

# Excluding Values from Averaging by Allen Wyatt
(last updated March 11, 2019)

You've seen it on the Olympics and in other sporting events: The average score for an athlete is determined by throwing out the highest score and the lowest score, and then averaging the rest. You may have a need to do similar types of averages. For instance, you may be a teacher and need to exclude the two lowest assignment scores before calculating an average.

To perform this type of averaging, all you need to remember is that an average is calculated by summing all the values in a range and then dividing that sum by the number of items in that range. The SUM function easily provides the sum, and the COUNT function can be used to find out the number of items in the range. How to exclude the two lowest values in the range? You can use the SMALL function.

Consider the following formula, which assumes you want to find an adjusted average of the range A10:A14:

```=(SUM(A10:A14)-SMALL(A10:A14,1)-SMALL(A10:A14,2))/(COUNT(A10:A14)-2)
```

The SMALL function is used to determine the two lowest values in the range, and these are subtracted from the overall sum of the range. The resulting value is then divided by the COUNT of values in the range. Note, as well, that the COUNT value is decreased by 2 to compensate for the fact you are ignoring the two lowest values.

Another way to calculate the same average is to use an array formula. The following one does the trick:

```=AVERAGE(IF(A10:A14>SMALL(A10:A14,2),A10:A14))
```

Since this is an array formula, you need to enter it by pressing Ctrl+Shift+Enter instead of just pressing Enter. This formula still relies on the use of the SMALL function, but it also uses the actual AVERAGE function to return a result. Since this is an array formula, it examines each of the values in the array (the range) and only considers them for use in the average if they are larger than the second smallest value in the array.

While the array formula is shorter than the longer regular formula, there is one caveat to keep in mind: The array formula will produce an undesired result if there is a two-way "tie" in the second-lowest value in the range, or a three-way tie in the lowest value. For instance, if the values being averaged are 3, 2, 10, 3, and 7, then the array formula will produce an average of 8.5. Why? Because only the values 10 and 7 are above the second-lowest value, and the average of those two is 8.5. If you use the longer formula, first presented above, then the average returned is 6.666667, which is the average of 10, 3, and 7.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10697) applies to Microsoft Excel 2007 and 2010. You can find a version of this tip for the older menu interface of Excel here: Excluding Values from Averaging.

##### Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

##### MORE FROM ALLEN

Tab stops allow you to modify the horizontal position at which text is positioned on a line. Word allows you to preface ...

Discover More

Inserting a Cross-Reference to the Last Style on a Page

It is often helpful to reference a specific heading in the header or footer of a page, and have that reference change on ...

Discover More

Pictures in AutoShapes

Filling an AutoShape with a picture of your choosing is a neat trick. Excel makes it easy to do.

Discover More Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

##### More ExcelTips (ribbon)

Averaging the Last Numbers in a Column

Need to calculate a running average for the last twelve values in a constantly changing range of values? The formula ...

Discover More

An Average that Excludes Zero Values

Excel allows you to use functions and formulas to analyze your data. One way you can analyze your data is to use the ...

Discover More

Determining a Simple Moving Average

A moving average can be a great way to analyze a series of data points that you've collected over time. Setting up a ...

Discover More
##### Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 4 - 3?

2019-04-02 12:13:02

Peter Atherton

Graham, try this array formula

=(SUM(A12:A19)-SMALL(A12:A19,1)-LARGE(A12:A19,1))/(COUNT(IF(A12:A19>0,A12:A19))-2)

2019-04-02 01:20:19

Graham

Hi Allan

This is great and thank you for always having the answers. Just a quick one...I am looking at a average but want to exclude the highest and lowest as per you formula:

=(SUM(A10:A14)-SMALL(A10:A14,1)-SMALL(A10:A14,2))/(COUNT(A10:A14)-2)

However, what if I want to exclude any/all zeros (0) from the average range?

Thanks again

Graham (South Africa)

2019-04-01 09:11:13

Graham

Hi Allan

This is great and thank you for always having the answers. Just a quick one...I am looking at a average but want to exclude the highest and lowest as per you formula:

=(SUM(A10:A14)-SMALL(A10:A14,1)-SMALL(A10:A14,2))/(COUNT(A10:A14)-2)

However, what if I want to exclude any/all zeros (0) from the average range?

Thanks again

Graham (South Africa)

2016-01-16 16:57:17

dzp1

So the array does not work for me due to the duplicate issue. Trying to calculate an average score but for every 5 scores, the lowest score is dropped from the average. I cannot figure out how to remove n lowest scores automatically. I have to manually add the small(range, 1) portion once per 5 outings and cannot determine how to get excel to remove n smallest from the range itself based on how many total there are. Any help would be appreciated!

2015-09-01 05:09:56

balthamossa2b

@Dianne

=AVERAGEIF(A1:A10, "<>0")

2015-08-31 17:14:32

Dianne

If I have 8 rows of numbers and 3 rows contain zero values - how do I get the average not including the zero's?

2015-08-31 10:14:35

Ben

Can the small and large formula also be used to exclude values for calculating the Median?

2015-08-31 00:08:05

Martin

Thanks for the COUNT tip.

Is there a way that I can count the number of rows displayed via a filter that contain numeric data?

2015-08-30 01:55:13

ziv98

=AVERAGEIF(A10:A14,">"&SMALL(A10:A14,2))
with the same remark as the array formula.

2015-08-30 01:52:35

ziv98

=AVERAGEIF(A10:A14,">"&SMALL(A10:A14,2))

##### This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.