Excel AVERAGE function with examples
Excel AVERAGE function with examples
com/office-addins-blog/excel-average-function/
The tutorial will teach you the most effective formulas to average numbers, percentages and times in Excel
and avoid errors.
In Microsoft Excel, there exist a handful of di�erent formulas for calculating average. This tutorial
focuses on the most popular one - the AVERAGE function.
AVERAGE formula
AVERAGE IF in Excel
AVERAGE(number1, [number2], …)
Where number1, number2, etc. are numeric values for which you want to get the average. They can
be supplied in the form of numeric values, arrays, cell or range references. The �rst argument is
required, subsequent ones are optional. In one formula, you can include up to 255 arguments.
1 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
3. Cells containing text strings and logical values TRUE and FALSE are ignored. If you want to include
Boolean values and text representations of numbers in the calculation, use the AVERAGEA function.
4. Boolean values typed directly in a formula are counted. For example, the formula AVERAGE(TRUE,
FALSE) returns 0.5, which is the average of 1 and 0.
5. If the speci�ed arguments do not contain a single valid numeric value, a #DIV/0! error occurs.
6. Arguments that are error values cause an AVERAGE formula to return an error. To avoid this, please
see how to average ignoring errors.
Note. When using the AVERAGE function in your Excel sheets, please do keep in mind the di�erence
between cells with zero values and blank cells - 0's are counted, but empty cells are not. This might
be especially confusing if the "Show a zero in cells that have a zero value" option is unchecked in a
given worksheet. You can �nd this option under Excel Options > Advanced > Display options for this
worksheet.
2 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
To calculate an average of certain numbers, you can type them directly in a formula. For example, to
average the numbers 1,2,3, and 4, the formula is:
=AVERAGE(1,2,3,4)
=AVERAGE(A:A)
=AVERAGE(1:1)
=AVERAGE(A1:C20)
To return a mean of non-adjacent cells, each cell reference should be supplied individually:
=AVERAGE(A1:A20, C1:D10)
And naturally, nothing prevents you from including values, cell and range references in the same
formula as your business logic requires. For example:
And here is a real-life scenario. In the below dataset, we use 3 di�erent formulas for calculating an
average - in the entire range, in each row and in each column:
3 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
For example, to calculate an average percentage in cells C2 through C11, the formula is:
=AVERAGE(C2:C11)
4 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
For instance, to �nd an average time in the below dataset, the formula is:
=AVERAGE(B3:B13)
5 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
To exclude zeros, use the AVERAGEIF or AVERAGEIFS function instead. For example:
=AVERAGEIF(B3:D3, "<>0")
For instance, to get an average of the 3 largest numbers in B3:B11, the formula is:
=AVERAGE(LARGE(B3:B11, {1,2,3}))
To calculate a mean of bottom 3, 5, 10 or n values in a range, use AVERAGE together with the SMALL
function:
For instance, to average the 3 lowest numbers in the range, the formula goes as follows:
6 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
Normally, the LARGE function determines the Nth largest value in a given array. To get the top n
values, an array constant such as {1,2,3} is used for the second argument.
In our case, LARGE returns the highest 3 values in the range, which are 94, 93 and 90. AVERAGE takes
it from there and outputs the mean.
AVERAGE(IF(criteria_range=criteria, average_range))
In Excel 2019 and lower, this only works as an array formula, meaning you need to press the
Ctrl + Shift + Enter keys to complete it correctly. In Excel 365 and 2021, a normal formula will work
nicely.
As an example, let's �nd an average Math score in the table below. For this, just use "Math" for
criteria:
=AVERAGE(IF(C3:C11="Math", B3:B11))
Or you can input the condition in some cell and reference that cell (F2 in our case):
7 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
=AVERAGE(IF(C3:C11=F2, B3:B11))))
The logical test of the IF function compares each subject in C3:C11 against the target one in F2. The
result of the comparison is an array of TRUE and FALSE values, where TRUEs represent matches:
{FALSE;FALSE;FALSE;TRUE;TRUE;FALSE;FALSE;TRUE;FALSE}
For the value_ if_true argument, we supply the range of scores (B3:B11), so if the logical test is TRUE,
the corresponding score is returned. As the value_ if_false argument is omitted, FALSE appears where
the condition is not met:
{FALSE;FALSE;FALSE;74;67;FALSE;FALSE;59;FALSE}
This array is fed to the AVERAGE function, which calculates an arithmetic mean of the numbers
ignoring the FALSE values.
For example, to average the Math scores in class A, you can use this formula:
8 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
In Excel 2019 and lower, both of the above should be array formulas, so remember to press
Ctrl + Shift + Enter to get an accurate result. In Excel 365 and 2021, a normal Enter key will work �ne
due to inbuilt support for dynamic arrays.
The same result can be achieved with the help of the nested IF statement:
In the logical test of IF, two comparison operations are performed - �rst, you check the list of subjects
in C3:C11 against the value in G2, and then you compare the classes in D3:D11 against the value in G3.
The two arrays of TRUE and FALSE values are multiplied, and the multiplication operation works like
the AND operator. In any arithmetic operation, TRUE equates to 1 and FALSE equates to 0. Multiplying
by 0 always gives zero, so the resulting array has 1 only when both conditions are TRUE. This array is
evaluated in the logical test of the IF function, which returns the scores corresponding to 1's (TRUE):
{FALSE;FALSE;FALSE;74;67;FALSE;FALSE;FALSE;FALSE}
9 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
In case you wish to round only the displayed average without changing the underlying value, make
use of the Decrease Decimal command on the ribbon or the Format Cells dialog box as explained in
How to round average in Excel.
To round the calculated value itself, combine AVERAGE with one of the Excel rounding functions.
To follow the general math rules for rounding, nest AVERAGE in the ROUND function. In the 2nd
argument (num_digits), specify the number of digits to round an average to.
For example, to round an average to the nearest integer, use this formula:
=ROUND(AVERAGE(B3:B11), 0)
To round an average to one decimal place, use 1 for the num_digits argument:
=ROUND(AVERAGE(B3:B11), 1)
To round an average to two decimal places, use 2 for the num_digits argument:
=ROUND(AVERAGE(B3:B11), 2)
And so on.
=ROUNDUP(AVERAGE(B3:B11), 1)
=ROUNDDOWN(AVERAGE(B3:B11), 1)
10 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
For example, to avoid a #DIV/0 error with average in the below data set, use this formula:
11 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
Before averaging, �lter out errors with the help of the IFERROR function:
AVERAGE(IFERROR(range,""))
In all versions except Excel 365 and 2021 where arrays are handled natively, hit the
Ctrl + Shift + Enter keys together to make it an array formula.
For example, to average the below range of cells without errors, the formula is:
=AVERAGE(IFERROR(B3:B13, ""))
AGGREGATE function
Another easy way to average ignoring errors is using the AGGREGATE function. To con�gure
AGGREGATE for this purpose, you set the function_num argument to 1 (AVERAGE function), and the
options argument to 6 (ignore error values).
For instance:
=AGGREGATE(1, 6, B3:B13)
12 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
A small green triangle in the top-left corner of the cells is a clear indication of this case:
13 of 14 2/17/2025, 8:13 AM
Firefox https://www.ablebits.com/office-addins-blog/excel-average-function/
That's how you use the AVERAGE function in Excel to �nd an arithmetic mean. I thank you for reading
and hope to see you on our blog next week!
14 of 14 2/17/2025, 8:13 AM