Math Last updated: July 2026

Harmonic Mean Calculator

Calculate the harmonic mean of any set of positive numbers. Enter values to instantly find the harmonic average, see the formula applied, and compare with arithmetic and geometric means.

How to Use the Harmonic Mean Calculator

Interactive calculator available after JavaScript loads.

Loading calculator...

Written by Calculator Archive Team

Math & Finance Experts — Verified Formulas, Peer-Reviewed Sources, Expert Analysis

Looking for a deeper explanation?

Read our comprehensive, peer-reviewed educational article in our Blog to learn the underlying math, formulas, and step-by-step examples.

Read Blog Guide ›

Mathematical Formula & Logic

Harmonic Mean = n / (1/x₁ + 1/x₂ + ... + 1/xₙ). For two values: HM = 2ab / (a + b). The harmonic mean is always ≤ geometric mean ≤ arithmetic mean for positive numbers.
Variable Glossary
n The number of values in the dataset
x₁, x₂, ..., xₙ The positive values in the dataset
1/xᵢ The reciprocal of each value
HM Harmonic mean — the reciprocal of the arithmetic mean of reciprocals

Step-by-Step Worked Calculation

Scenario: Harmonic Mean of 4 and 8

Calculate the harmonic mean of 4 and 8, and compare with arithmetic and geometric means.

1

Step 1: Identify the values: 4 and 8 (n = 2).

2

Step 2: Compute reciprocals: 1/4 = 0.25 and 1/8 = 0.125.

3

Step 3: Sum the reciprocals: 0.25 + 0.125 = 0.375.

4

Step 4: Divide n by the sum: HM = 2 / 0.375 = 5.333.

5

Step 5: Compare: HM = 5.333, GM = √(4×8) = 5.657, AM = (4+8)/2 = 6.

6

Step 6: The harmonic mean (5.333) is the smallest of the three means, as expected for unequal numbers.

How to Use the Harmonic Mean Calculator

  1. 1. Enter your set of positive numbers (comma-separated or one at a time).
  2. 2. Review the computed harmonic mean.
  3. 3. See the arithmetic mean and geometric mean for comparison.
  4. 4. Understand when harmonic mean is preferred (rates, speeds, ratios).
  5. 5. Use for problems involving rates, efficiency, or averages of reciprocals.

What Is a Harmonic Mean Calculator?

Harmonic Mean Calculator is a mathematical computation tool that helps you calculate the harmonic mean of two or more numbers. Find the harmonic average for rates, ratios, and reciprocal-based data with step-by-step explanation. It applies established mathematical principles to deliver accurate results, often showing the underlying formula and step-by-step working so you can understand the computation process.

Why This Calculation Matters

Mathematical calculations form the foundation of science, engineering, finance, and everyday problem-solving. Harmonic Mean Calculator helps you work through calculations accurately and efficiently, reducing the risk of manual arithmetic errors. Whether you are a student learning concepts, a professional verifying work, or anyone needing quick and reliable math results, this tool ensures precision and saves time.

Historical Background

Mathematics has evolved over thousands of years, from ancient Babylonian clay tablets and Egyptian papyri to Greek formal proofs by Euclid and Archimedes. The development of algebra by Persian mathematician al-Khwarizmi in the 9th century and the invention of calculus by Newton and Leibniz in the 17th century laid the groundwork for modern computation. Harmonic Mean Calculator continues this tradition by making mathematical operations accessible through digital technology.

Frequently Asked Questions

Complete indexable directory of answers (12 questions)

What is the harmonic mean?

The harmonic mean of n positive numbers is the reciprocal of the arithmetic mean of their reciprocals: HM = n / (1/x₁ + 1/x₂ + ... + 1/xₙ). It is the smallest of the three Pythagorean means (HM ≤ GM ≤ AM) for unequal positive numbers. The harmonic mean is especially useful for averaging rates.

When should I use the harmonic mean?

Use harmonic mean when: (1) Averaging rates or ratios (speed, efficiency, density), (2) Each value represents a rate with different units or denominators, (3) You need to average prices paid per unit at different quantities, (4) Comparing parallel resistances in circuits, (5) Computing average speed for equal-distance trips.

What is the difference between harmonic mean and arithmetic mean?

Arithmetic mean = sum/n. Harmonic mean = n/sum(reciprocals). AM is better for additive data, HM for rate data. For example: driving 60 mph for 100 miles then 120 mph for 100 miles: AM = 90 mph, but HM = 2/(1/60 + 1/120) = 80 mph. HM correctly accounts for the time spent at each speed.

How do I calculate the weighted harmonic mean?

Weighted harmonic mean = Σwᵢ / Σ(wᵢ/xᵢ), where wᵢ are weights. For example, if you drive 100 miles at 50 mph and 200 miles at 100 mph: WHM = (100+200) / (100/50 + 200/100) = 300 / (2+2) = 75 mph.

What is the relationship between harmonic mean and parallel resistors?

The equivalent resistance of resistors in parallel equals the harmonic mean divided by the number of resistors. For two resistors R₁ and R₂ in parallel: R_eq = (R₁ × R₂) / (R₁ + R₂) = HM(R₁, R₂) / 2.

Why is harmonic mean used for average speed?

When traveling equal distances at different speeds, the average speed is the harmonic mean of the speeds. This is because time = distance/speed, and you are averaging the times per unit distance (the reciprocals of speed). For equal distances: HM = 2ab/(a+b).

Can the harmonic mean handle zero or negative numbers?

No. The harmonic mean requires all positive numbers because it involves reciprocals. Division by zero is undefined, and negative reciprocals would produce incorrect averages. If your data contains zeros or negatives, use the arithmetic mean instead.

What is the formula for harmonic mean of two numbers?

For two numbers a and b: HM = 2ab / (a + b). This is also the formula for the equivalent resistance of two parallel resistors. It is equivalent to the reciprocal of the average of 1/a and 1/b.

How does harmonic mean relate to the other Pythagorean means?

For any set of positive numbers (not all equal): HM < GM < AM. This is the Pythagorean means inequality. Equality holds only when all values are the same. The geometric mean is the geometric mean of the harmonic and arithmetic means: GM = √(HM × AM) for two numbers.

What mathematical formula does the Harmonic Mean Calculator use?

The Harmonic Mean Calculator uses standard mathematical formulas validated against authoritative references. The specific formula is displayed in the calculator interface with a detailed explanation of each variable.

How can I verify the Harmonic Mean Calculator results manually?

Each calculator includes a step-by-step worked example showing exactly how the formula is applied. You can follow these steps with pen and paper to verify any result.

What types of inputs does the Harmonic Mean Calculator accept?

The Harmonic Mean Calculator accepts numeric inputs including integers and decimals. Invalid inputs (letters, special characters) are rejected with clear error messages.