How To Calculate Average (Mean) in Excel - Average, Averageif, Averageifs Formula Examples
How To Calculate Average (Mean) in Excel - Average, Averageif, Averageifs Formula Examples
How To Calculate Average (Mean) in Excel - Average, Averageif, Averageifs Formula Examples
com/office-addins-blog/2015/08/28/excel-average-averageif/
Aug
28
How to calculate average (mean) in Excel -
AVERAGE, AVERAGEIF, AVERAGEIFS formula
examples
The tutorial shows how to calculate mean in Excel for different data types by using AVERAGE or
AVERAGEA formulas. You will also learn how to use the AVERAGEIF and AVERAGEIFS functions
to average cells that meet certain criteria.
In plain English, calculating the average for a set of values if finding out the most common value in
the set. For example, if a few athletes have run a 100m sprint, you may want to know the average
result - i.e. how much time most sprinters are expected to take to complete the race.
In mathematics, average is called the arithmetic mean, or simply the mean, and it is calculated by
adding a group of numbers together and then dividing by the count of those numbers.
In the above example, if the first athlete covered the distance in 10.5 seconds, the second needed
10.7 seconds, and the third took 11.2 seconds, the average time would be 10.8 seconds:
=(10.5+10.7+11.2)/3.
To calculate average in Excel, you won't need to write such mathematical expressions, powerful
Excel Average functions will do the work behind the scene. Further on in this tutorial, we will discuss
the syntax of each function and illustrate it with examples of uses.
AVERAGE(number1, [number2], …)
Number1, number2, … are numeric values for which you want to find the average. The first
argument is required, subsequent ones are optional, and up to 255 arguments can be included in a
single formula. The parameters can be supplied as numbers, cell references, or ranges.
Using the AVERAGE function in Excel - formula examples
AVERAGE is one of the most straightforward and easy-to-use Excel functions, and the following
examples prove this.
To compute an average of numbers in a given range, specify that range in your Average formula:
=AVERAGE(A1:C20)
To return an average of non-adjacent cells, you supply each cell individually, e.g.
=AVERAGE(A1, C1, D1)
And naturally, nothing prevents you from including values, cells references and ranges in the same
formula, as your business logic requires. For example, the following average formula calculates the
average of 2 ranges and 1 individual cell:
Tip. If you want to round the returned number to the nearest integer, use one of the Excel rounding
functions, for example: =ROUND(AVERAGE(B3:B5, B7:B9, B11),0)
Apart from numbers, you can use the Excel AVERAGE function to calculate an average of other
numeric values such as percentages and times, as demonstrated in the following examples.
Example 2. Calculating average percentage in Excel
If you have a column of percentages in your sheet, how do you get an average percent rate? By
using a normal Excel formula for average :)
Note. Please pay attention that the Excel AVERAGE function includes zero values when calculating
an average. If you'd rather exclude zeros, use AVERAGEIF instead, as demonstrated in the
following example.
AVERAGEA(value1, [value2], …)
Value1, value2, … are values, arrays, cell references or ranges that you want to average. The first
argument is required, others (up to 255) are optional.
The following screenshot demonstrates two formulas for average in Excel and different results they
return:
So, if you do not want to include the Boolean values and text strings in your calculations, use the
Excel AVERAGE function rather than AVERAGEA.
Excel AVERAGEIF function
The AVERAGEIF function in Excel calculates the average (arithmetic mean) of all the cells that meet
a specified criteria.
The AVERAGEIFS function has the following arguments, the first 2 are required, the last one is
optional:
The AVERAGEIF function is available in Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010
and 2007.
Instead of entering the condition directly in a formula, you can type it in a separate cell and refer to
that cell in your formula:
=AVERAGEIF(A2:A8, E1, B2:B8)
Tip. To round the returned value to a certain number of decimal places, either use one of the Excel
round functions to round off the actual value stored in the cell, or the Format Cells dialog to change
only the display formatting.
For example, to round the average returned by the above formula to 2 decimal places, you can wrap
it in the ROUND function like this:
Alternatively, you can select the cell with the formula (E1 in this example), press Ctrl + 1 to open
the Format Cellsdialog, switch to either the Number or Currency tab and select the number of
decimal places you want to display. Please remember, in this case the actual value stored in a cell
won't be changed, and the exact non-rounded value will be used in all calculations if you refer to that
cell in other formulas.
In the previous example, suppose you have 3 different sorts of banana and you want to find their
average. The following formula will work a treat:
If your keyword are likely to be preceded and/or followed by some other characters, add an asterisk
both in front of the word and after it, like =AVERAGEIF(A2:A8, "*banana*", B2:B8).
The correct way to enter such a criteria is to enclose the logical operator and the number in double
quote. So, your formula for average in Excel would be as follows:
=AVERAGEIF(A2:A7, ">10")
Another common task is averaging numbers that are not equal to zero. For this, you would need
the "not equal to" operator in the criteria argument of your AVERAGEIF formula:
=AVERAGEIF(A2:A7, "<>0")
As you may have noticed, we do not use the third argument [average_range] in either of the above
formulas since we want to find an average in the initial range.
Average if blank
To include blank cells that contain absolutely nothing (no formula, no zero length string),
enter "=" in the criteria argument.
For example, the following formula calculates an average of cells C2:C8 if a cell in column B in the
same row is absolutely empty:
To average values corresponding to visually blank cells including those that contain empty strings
returned by other functions (for example, cells with a formula like =""), use "" in criteria. For
example:
For instance, the following AVERAGEIF formula calculates an average of cells C2:C8 if a cell in
column B in the same row is not blank:
=AVERAGEIF(B2:B8, "<>", C2:C8)
In case a cell reference is an exact match criteria, simply type it in the criteria argument like we did
in Example 1:
If you use a logical expression with a cell reference or another function in criteria, then you have
to enclose the logical operator in "double quotes" and add ampersand (&) to concatenate a cell
reference or function.
For example, to calculate average sales (C2:C8) that are greater than the value in E4, use the
following formula:
=AVERAGEIF(C2:C8, ">"&E4)
With dates in B2:B8, the below formula returns the average of sales (C2:C8) that we made up to the
current date:
The AVERAGEIFS function is available in Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010
and 2007.
Average_range is B2:B8 (cells that you want to average if both conditions are met);
Criteria_range1 is A2:A8 (Items column) and criteria1 is "banana";
Criteria_range2 is B2:B8 (Sales column) and criteria2 is ">100".
As you see, only two cells (B3 and B5) meet both conditions, and therefore only these cells are
averaged.
In criteria1, you enter a date preceded with a comparison operator. In criteria 2, you type "<>" that
tells the formula to include only non-empty cells within citeria_range2 (column C in this example).
Tip. When you use a number or date in conjunction with a logical operator in AVERAGEIFS' criteria,
you enclose this combination in double quotes like "<8/21/2015".
AVERAGEIF and AVERAGEIFS functions - things to
remember!
Excel AVERAGEIF and AVERAGEIFS functions have much in common, in particular:
In the average_range argument, empty cells, Boolean values of TRUE/FALSE and text
values are ignored.
In the criteria / criteria_range argument, empty cells are treated as zero values (0).
If average_range contains only blank cells or text values, both functions return the #DIV0!
error.
If not a single cell meets the criteria (all of the criteria in case of AVERAGEIFS), the #DIV0!
error is also returned.
AVERAGEIF specificities
Average_range does not necessarily have to be of the same size as range. However, the
actual cells to be averaged are determined by the size of the range argument. In other words, the
upper left cell in average_range is treated as the beginning cell, and includes as many columns and
rows as contained in the range argument.
AVERAGEIFS specificities