Search for a tool
Harmonic Mean

Tool for calculating a harmonic mean from a series or list of integers or real numbers. The harmonic mean is for example used for average speeds.

Results

Harmonic Mean -

Tag(s) : Statistics

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 'Harmonic Mean' tool for free! Thank you!

Harmonic Mean

Harmonic Mean Calculator


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

Answers to Questions (FAQ)

How to compute an harmonic mean? (Definition)

With a list $ X $ of n values/numbers $ \{x_1, x_2, \dots, x_n \} $. The harmonic mean is defined by the ratio/division of $ n $ by the sum of the inverse of the values/numbers:

$$ \bar{x}_{harm} = \frac{n}{\sum_{i=1}^n \frac{1}{x_i}} $$

How to compute an harmonic mean?

To compute a harmonic mean of a list of values, count the total number $ n $ of values in the list and calculate the sum $ S $ of the inverse values.

Example: A car drove a distance $ d $ at 30km/h half the distance then to 90km/h. The average speed of the car can be defined with its harmonic mean speed by the calculation $ n/S $ with $ n = 2 $ and $ S = 1/30 + 1/90 = 0.0444... $ so $ \bar{M}_{harm} = 2/(1/30+1/90) = 45 $ km/h.
Indeed, taking the distance $ d = 15km $, the car will have traveled $ d/2 $ at 30km/h in 15 minutes and $ d/2 $ at 90km/h in 5 minutes, so a total distance of 15km in 20 minutes or 45km/h on average.

When to use an harmonic mean?

The harmonic mean is used when the compared elements have inverse proportionality ratios.

Example: The price per square meter of a house is higher if the total area is small.

Example: Travel time is shorter when the speed is high.

Example: On an electronic circuit, the calculation of two resistors in parallel corresponds to the harmonic mean of the 2 resistors' values.

What is the harmonic series? (Definition)

The harmonic series is the sequence of inverses of non-zero natural numbers denoted $ H_n $

$$ H_n = 1 + \frac12 + \frac13 + \frac14 + \cdots + \frac1n = \sum_{k=1}^n \frac1k $$

Source code

dCode retains ownership of the "Harmonic Mean" source code. Any algorithm for the "Harmonic Mean" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Harmonic 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 "Harmonic 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 "Harmonic 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/harmonic-mean
In a scientific article or book, the recommended bibliographic citation is: Harmonic Mean on dCode.fr [online website], retrieved on 2025-04-16, https://www.dcode.fr/harmonic-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 'Harmonic Mean' tool for free! Thank you!


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