**Please Note: **
This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. 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: Using GEOMEAN with a Large List.

Ken wrote about a problem he was having with the GEOMEAN function. When he attempts to use the function on a large number of values (3,500 rows of data), he gets a #NUM error value returned.

The GEOMEAN function is used to return the geometric mean of a series of values. The GEOMEAN of n numbers is the n-th root of the product of the numbers. For example, if there are four values in a series (A through D), then the product of those numbers is A * B * C * D, and the GEOMEAN is the fourth root of that product.

The #NUM error would be return if any of three conditions were met: any of the values was equal to zero, any of the values was negative, or the limits of Excel were exceeded. It is likely that it is this last condition that Ken is running into, particularly if any of his 3,500 values are large.

Since GEOMEAN finds the product of the 3,500 numbers (multiplies them all by each other) and then takes the nth root, the product may easily be too large for Excel. The largest positive number in Excel is 9.99999999999999 * 10^307 (in scientific notation this is written as 9.99999999999999E+307). If the product gets larger than this number you will get a #NUM error for the function.

The solution is to use logs to do the calculation. This is easiest to understand when you look at a transformation of the GEOMEAN function:

GEOMEAN = (X1*X2*X3*...*Xn)^ (1/n) ln(GEOMEAN) = ln((X1*X2*X3*...*Xn)^ (1/n)) ln(GEOMEAN) = (1/n) * ln(X1*X2*X3*...*Xn) ln(GEOMEAN) = (1/n) * (ln(X1)+ln(X2)+ln(X3)+...+ln(Xn)) ln(GEOMEAN) = average(ln(X1)+ln(X2)+ln(X3)+...+ln(Xn)) GEOMEAN = exp(average(ln(X1)+ln(X2)+ln(X3)+...+ln(Xn)))

If you follow through the above, you see that GEOMEAN is equivalent to the exponent of the average of the logs of the values. You can calculate the desired result by using the following array formula instead of the GEOMEAN function:

=EXP(AVERAGE(LN(A1:A3500)))

This assumes that the desired values are in the range A1:A3500. Since it is an array formula, you must enter it into a cell by using **Ctrl+Shift+Enter**.

*ExcelTips* is your source for cost-effective Microsoft Excel training.
This tip (9328) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: **Using GEOMEAN with a Large List**.

**Excel Smarts for Beginners!** Featuring the friendly and trusted *For Dummies* style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out *Excel 2013 For Dummies* today!

The DSUM function is very handy when you need to calculate a sum based on data that matches criteria you specify. If you ...

Discover MoreNeed to find a median value in a series of values? It's easy with the MEDIAN function. What isn't as easy is to derive ...

Discover MoreIf you need to change the case of letters in a cell, one of the functions you can use is the PROPER function. This tip ...

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

2016-06-13 15:31:35

Candan

2016-01-06 17:55:52

Miguel R

Thanks! I used it for 3,700 rows of data!

2015-04-14 13:45:52

Randall

=EXP(AVERAGE(LN(A1:A3500)))

2014-05-23 17:15:38

Jim Adams

Thank you so much for your instructions on this, they were very helpful.

Jim

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.

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

Copyright © 2018 Sharon Parq Associates, Inc.

## Comments