Harmonic Mean Calculator

Calculate the harmonic mean of a set of positive numbers.

Calculator

Enter Your Numbers

Enter positive numbers separated by commas (e.g., 1, 2, 3, 4, 5)

Comprehensive Guide

Comprehensive Guide to Harmonic Mean

What is the Harmonic Mean?

The harmonic mean is one of the three Pythagorean means, alongside the arithmetic mean and the geometric mean. It's defined as the reciprocal of the arithmetic mean of the reciprocals of a set of positive numbers.

While the arithmetic mean gives equal weight to each value, the harmonic mean gives equal weight to each unit of value. This makes it particularly useful for averaging rates and ratios.

Mathematical Definition

For a set of positive numbers x₁, x₂, ..., xₙ, the harmonic mean (HM) is calculated as:

Formula:
HM = n / (1/x₁ + 1/x₂ + ... + 1/xₙ)

Special Case: Harmonic Mean of Two Numbers

For just two numbers a and b, the harmonic mean can be simplified to:

HM = 2ab / (a + b)

Relationship with Other Means

For a given set of positive numbers (with at least one pair of unequal values), the three Pythagorean means always follow this inequality:

Harmonic Mean ≤ Geometric Mean ≤ Arithmetic Mean

For two positive numbers, these means are related by:

(Geometric Mean)² = Harmonic Mean × Arithmetic Mean

Properties of Harmonic Mean

  • The harmonic mean is always less than or equal to the geometric mean
  • The harmonic mean is heavily influenced by small values in the data set
  • All values must be positive (non-zero) for the harmonic mean to be calculated
  • If all values are equal, then the harmonic mean equals the arithmetic mean and geometric mean
  • The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals

Applications of Harmonic Mean

The harmonic mean has numerous practical applications across various fields:

  1. Average Speed Calculation: When traveling the same distance at different speeds, the average speed is the harmonic mean of those speeds.
  2. Electrical Engineering: Calculating the equivalent resistance of resistors connected in parallel.
  3. Physics: Determining average densities and other physical properties.
  4. Finance: Calculating average multiples such as the Price-Earnings (P/E) ratio.
  5. Machine Learning: Computing the F1 score (harmonic mean of precision and recall) in classification problems.
  6. Hydrology: Averaging hydraulic conductivity values for flow perpendicular to layers.

Historical Context

The concept of harmonic mean dates back to ancient mathematics. The term "harmonic" comes from the field of music, where the harmonic mean was used to describe musical intervals. The Pythagoreans discovered that if a string is divided in the ratio a:b, the note produced is a harmonic mean of the notes produced by strings of lengths a and b.

Harmonic Numbers

A related concept is the harmonic number, denoted as H(n), which is the sum of the reciprocals of the first n natural numbers:

H(n) = 1 + 1/2 + 1/3 + ... + 1/n

The harmonic number is related to the harmonic mean of the first n positive integers:

H(n) × HM(n) = n

This relationship shows that the harmonic mean of the first n positive integers is n divided by the nth harmonic number.

Concept

Harmonic Mean Formula

The harmonic mean is calculated as the reciprocal of the arithmetic mean of the reciprocals of the numbers. It's particularly useful for calculating average rates, especially when dealing with rates of change.

Formula:
Harmonic Mean = n / (1/x₁ + 1/x₂ + ... + 1/xₙ)
Steps

How to Calculate Harmonic Mean

To calculate the harmonic mean, follow these steps:

  1. 1
    Take the reciprocal of each number (1/x)
  2. 2
    Find the arithmetic mean of these reciprocals
  3. 3
    Take the reciprocal of the result

For example, to find the harmonic mean of 2, 4, 8:

Example Calculation:
Harmonic Mean = 3 / (1/2 + 1/4 + 1/8) = 3 / (0.5 + 0.25 + 0.125) = 3 / 0.875 = 3.43
Examples

Harmonic Mean - Practical Examples

Example 1 Average Speed

A car travels 60 km at 60 km/h and returns at 40 km/h. What is the average speed for the round trip?

Harmonic Mean = 2 / (1/60 + 1/40) = 2 / (0.0167 + 0.025) = 48 km/h

Example 2 Parallel Resistors

Two resistors of 4 ohms and 6 ohms are connected in parallel. What is the equivalent resistance?

Harmonic Mean = 2 / (1/4 + 1/6) = 2 / (0.25 + 0.167) = 2.4 ohms

Example 3 Work Rate

Three workers can complete a task in 2, 3, and 6 hours respectively. What is their average work rate?

Harmonic Mean = 3 / (1/2 + 1/3 + 1/6) = 3 / (0.5 + 0.333 + 0.167) = 3 hours

Tools

Mathematics Calculators

Need other tools?

Can't find the calculator you need? Contact us to suggest other mathematical calculators.