Search for a tool
Geometric Mean

Tool to compute a geometric mean: an estimate of the tendency of the data in a list, it has the advantage of being less sensitive to high values.

Results

Geometric Mean -

Tag(s) : Statistics, Data Processing

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Geometric Mean' tool for free! Thank you!

Geometric Mean

Geometric Mean Calculator

Loading...
(if this message do not disappear, try to refresh this page)
See also: Arithmetic Mean

Weighted Geometric Mean Calculator

Answers to Questions (FAQ)

What is a geometric mean? (Definition)

For a list of $ n $ values $ X = \{x_1, x_2, \dots, x_n\} $, the geometric mean is defined by the nth root ( $ \sqrt[n]{\dots} $ ) of the product of the values.

$$ \bar{x}_{geom} = \sqrt[n]{\prod_{i=1}^n{x_i}} $$

How to compute a geometric mean?

From a list of $ n $ values whose product (the multiplication of all the values) is $ p $, calculate the nth root of $ p $ that is $ \sqrt[n]{p} $.

Example: The list of $ 3 $ numbers $ \{ 1, 10, 100 \} $ has for geometric mean $ \sqrt[3]{1 \times 10 \times 100} = 10 $, whereas it has for arithmetic mean $ 55.5 $.

To get a geometric representation, the geometric mean of the sides of a rectangle has a value $ c $ which could be the length of one side of a square of area identical to the original rectangle.

Example: A rectangle of $ 6 \times 10 $ has an area of $ 60 $. The geometric mean of $ 6 $ and $ 10 $ is $ \approx 7.746 $. And a square of side length $ 7.746 $ has an area of $ \approx 60 $.

When the values are assigned coefficients, it is called a weighted geometric mean.

How to program/code a geometric mean function?

Using the mathematical formula: //Python
import numpy as np
def geometric_mean(iterable):
a = np.array(iterable)
return a.prod()**(1.0/len(a))
or to avoid a potential number overflow://Python
import numpy as np
def geometric_mean(iterable):
a = np.log(iterable)
return np.exp(a.sum()/len(a))

Source code

dCode retains ownership of the "Geometric Mean" source code. Any algorithm for the "Geometric Mean" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Geometric Mean" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Geometric Mean" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Geometric Mean" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source. Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link: https://www.dcode.fr/geometric-mean
In a scientific article or book, the recommended bibliographic citation is: Geometric Mean on dCode.fr [online website], retrieved on 2025-04-16, https://www.dcode.fr/geometric-mean

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Geometric Mean' tool for free! Thank you!


https://www.dcode.fr/geometric-mean
© 2025 dCode — The ultimate collection of tools for games, math, and puzzles.
 
Feedback