Harmonic Mean
Free harmonic mean calculator for rate-based averages: n ÷ Sigma(1/x). Enter comma-separated positive numbers, view reciprocal bar chart and breakdown table.
About This Calculator
The Harmonic Mean Calculator computes the harmonic mean of any set of positive numbers using the formula HM = n / (1/x1 + 1/x2 + ... + 1/xₙ). The harmonic mean is the appropriate measure of central tendency when averaging rates or ratios, making it essential for calculating average speed, average fuel economy, and portfolio P/E ratios.
Among the three Pythagorean means (arithmetic, geometric, harmonic), the harmonic mean is always the smallest for any set of positive numbers. It is the only correct mean for averaging rates when the denominator varies. For example, if you drive 100 km at 60 km/h and 100 km at 40 km/h, the arithmetic mean gives 50 km/h, but the correct average speed is actually 48 km/h -- which is exactly what the harmonic mean computes. This is because time (the denominator) varies per trip segment.
The calculator accepts comma-separated positive numbers. Non-positive values are automatically filtered out. Results include the harmonic mean, sum of reciprocals, count of valid values, an interactive bar chart of reciprocals, and a breakdown table showing each value's reciprocal and percentage contribution to the total sum.
How to Use
Enter your positive numbers as a comma-separated list (e.g. 2, 4, 8, 16). Click "Calculate Harmonic Mean" to see the result, chart, and breakdown. The URL saves your inputs for sharing or bookmarking.
Frequently Asked Questions
What is the harmonic mean?
The harmonic mean is a measure of central tendency calculated as the number of values divided by the sum of their reciprocals. For values a1, a2, ..., aₙ, the harmonic mean = n / (1/a1 + 1/a2 + ... + 1/aₙ). It is always the smallest of the three Pythagorean means (harmonic <= geometric <= arithmetic).
How do I use the harmonic mean calculator?
Enter your positive numbers as a comma-separated list (e.g. 2, 4, 8, 16). Click Calculate Harmonic Mean to compute the result. The tool displays the harmonic mean, sum of reciprocals, count, a bar chart of reciprocals, and a breakdown table with each value's reciprocal and percentage contribution to the sum.
What are common real-world uses of the harmonic mean?
The harmonic mean is used to calculate average rates when the denominator varies. Common applications include average speed (when distances are equal but speeds differ), average fuel economy (mpg across trips of equal distance), price-to-earnings ratios in finance (P/E ratio of a portfolio), and in electrical engineering for parallel resistance calculations.
What is the difference between harmonic, geometric, and arithmetic means?
For any set of positive numbers, the three Pythagorean means satisfy: harmonic <= geometric <= arithmetic. The arithmetic mean is best for additive processes, the geometric mean for multiplicative processes, and the harmonic mean for rate-based processes. For example, if you travel 100 km at 60 km/h and 100 km at 40 km/h, the harmonic mean (48 km/h) gives the correct average speed, not the arithmetic mean (50 km/h).
Can harmonic mean handle zero or negative values?
The harmonic mean is defined only for positive numbers. Zero values are excluded from the calculation (since 1/0 is undefined), and negative values cause incorrect results. Our calculator filters out non-positive values and only computes the harmonic mean of the remaining positive numbers in the dataset.
How is harmonic mean used in finance?
In finance, the harmonic mean is used to calculate the average price-to-earnings (P/E) ratio of a stock portfolio. Since P/E ratios are rates, using the arithmetic mean overweights high P/E stocks. The harmonic mean gives the correct average P/E ratio. It is also used in dollar-cost averaging to compute the average purchase price.
Is this harmonic mean calculator free?
Yes, this harmonic mean calculator is completely free to use with no registration, downloads, or hidden charges. Share your results via URL bookmarking.
How accurate are the results?
Results are computed using standard mathematical formulas with high-precision floating point arithmetic. The harmonic mean is displayed to 4 decimal places for maximum accuracy.