We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
If this tool helped you, you can buy us a coffee ☕
Free online harmonic mean calculator. Easily calculate the harmonic mean of positive numbers for average speed, exchange rates, and financial data.
Separate numbers by commas, spaces, newlines, or semicolons. All values must be greater than 0.
Please enter a set of numbers greater than 0 to calculate the harmonic mean.

Least Common Multiple (LCM) Calculator
Quickly calculate the least common multiple (LCM) of two or more integers. Supports space-separated number list input.

Prime and Composite Number Calculator
Instantly identify prime, composite, or special numbers. Supports batch checking and mathematical property analysis.

Circle Area Calculator
Quickly calculate the area of a circle by entering the radius, diameter, or circumference. Supports custom units and precision settings.
When do we use the harmonic mean? The most common scenario is calculating average speed. Suppose you cycle to a destination at 20 km/h and return at 30 km/h, and both distances are equal. The arithmetic mean gives 25 km/h, but your actual average speed is 24 km/h (because the time spent on each leg differs). The harmonic mean correctly calculates this as 24 km/h, which is more accurate.
Another scenario is the average exchange rate. If you buy USD with a foreign currency multiple times using the exact same amount of local currency each time, you use the harmonic mean to find the overall average exchange rate.
It is also used for average return on investment (ROI). If you invest the same principal amount every year but the yield varies, the harmonic mean accurately reflects your total yield.
The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of a given set of positive numbers. Simply put, it is "the reciprocal of the average of the reciprocals." It is commonly used to handle data with the same units but different proportional relationships, especially when the data consists of "ratios" or "rates," such as speed, unit price, or interest rates. Its value is always less than or equal to the arithmetic mean, and it is highly sensitive to extremely small values (smaller values pull the overall average down significantly).
The formula is simple:
Harmonic Mean = n / (1/x₁ + 1/x₂ + ... + 1/xₙ)
Where n is the number of values, and x₁, x₂...xₙ are the positive numbers. Why calculate it this way? Because when the "total amount" corresponding to each data point is the same (e.g., the same distance or the same amount of money), we need to average their reciprocals. Mathematical intuition: Each value represents "efficiency" (e.g., speed = distance/time). Total efficiency equals total distance divided by total time. Taking the reciprocal of efficiency and averaging it gives the average time, and taking the reciprocal of that result gives the average efficiency.
1. Open our harmonic mean calculator, and you will see the "Data Input" area.
2. Enter a positive number (e.g., 20) in the first input box, then click "Add" next to it or press Enter to add the next one.
3. Enter all your positive numbers sequentially (e.g., 20, 30, 40). The tool will display a list of the added numbers.
4. If you need to remove a number, click the "×" button next to it.
5. Once finished, the tool automatically calculates the harmonic mean and displays it in the results area. It may also show the arithmetic mean and geometric mean for comparison.
6. You can also click "Clear" to start over.
Example: On a cycling trip, your outbound speed is 30 km/h, and your return speed is 40 km/h over the exact same distance. Find the average speed.
Using this tool:
- Add the numbers 30 and 40.
- The calculator automatically computes: Harmonic Mean = 2 / (1/30 + 1/40) = 2 / (0.03333 + 0.025) = 2 / 0.05833 ≈ 34.29 km/h.
- Compare with the arithmetic mean: (30+40)/2 = 35 km/h.
The correct result is 34.29 km/h because the outbound trip takes longer (slower speed), pulling the average speed closer to the lower value.
Interpretation: If you use the arithmetic mean of 35 km/h, you overestimate your speed by 0.7 km/h, which makes a significant difference over long distances.
Comparison 1 (Including a small value): Data: 10, 100, 1000.
Harmonic Mean = 3 / (0.1 + 0.01 + 0.001) = 3 / 0.111 ≈ 27.03.
Arithmetic Mean = 370, Geometric Mean ≈ 100. As you can see, the harmonic mean is very close to the minimum value of 10, demonstrating its extreme sensitivity to exceptionally small values.
Comparison 2 (Two equal values): Data: 50, 50.
Harmonic Mean = 2 / (0.02 + 0.02) = 50, which is identical to the arithmetic and geometric means. When all values are equal, all three means are equal.
Q1: Is the harmonic mean always smaller than the arithmetic mean?
Yes, for any set of positive numbers (that are not all equal), Harmonic Mean < Geometric Mean < Arithmetic Mean. This is a mathematical theorem.
Q2: Can the harmonic mean be used for negative numbers?
No, negative numbers disrupt the signs of the reciprocals, making the result lose its conventional meaning. This tool only accepts positive numbers.
Q3: If I only have two numbers, is there a big difference between the harmonic and arithmetic means?
The difference is significant when the two numbers vary greatly. For example, with 10 and 100, the harmonic mean is 18.18, while the arithmetic mean is 55. If the numbers are close, the difference is minimal.
Q4: How many numbers can I add to the tool?
There is currently no hard limit, but we recommend keeping it under 100, as too many entries may affect performance.
Q5: What are the applications of the harmonic mean in finance?
It is used to calculate the average cost of investments made with equal amounts of money (dollar-cost averaging) or the average return rate for equal risk exposures.
Q6: Are the results identical to Excel's HARMEAN function?
Yes, this tool uses the exact same algorithm (n / sum(1/x)), so the results will match.
This tool is only applicable to sets of positive numbers and cannot be used for datasets containing zeros or negative numbers. For averaging rates with "different total amounts" (e.g., average speed over varying distances), please use the weighted harmonic mean or directly calculate total distance / total time. The harmonic mean is highly sensitive to extremely small values, so ensure there are no data entry errors. The calculation precision of this tool is based on JavaScript floating-point arithmetic, which may introduce minor errors with extremely large or small values. If you are processing rigorous scientific data, we recommend cross-verifying with professional statistical software (such as R or Python).