🔢 Harmonic Mean Calculator – Average Rates, Speeds & Ratios
The harmonic mean is the correct average to use whenever you are combining quantities expressed as rates or ratios — speeds, prices per unit, throughput values, or financial multiples. Unlike the arithmetic mean, it gives proportionally more weight to smaller values, which counteracts the distortion caused by high values that take less time (or fewer resources) to complete.
📐 Formula
For n positive values x₁, x₂, …, xₙ, the harmonic mean is:
H = n / (1/x₁ + 1/x₂ + … + 1/xₙ)For the weighted harmonic mean with weights w₁, w₂, …, wₙ:
H_w = (w₁ + w₂ + … + wₙ) / (w₁/x₁ + w₂/x₂ + … + wₙ/xₙ)🚗 Classic Example: Averaging Speeds
Suppose you drive a 100 km route: the first half at 60 km/h and the second half at 90 km/h. The arithmetic mean gives 75 km/h — but the correct average speed for equal-distance segments is the harmonic mean:
H = 2 / (1/60 + 1/90) = 2 / (0.01667 + 0.01111) ≈ 72 km/hThe difference matters: at 75 km/h you would predict a shorter total travel time than actually occurs.
📊 When to Use Each Mean
| Mean | Best for | Example |
|---|---|---|
| Arithmetic | Equal-time quantities | Test scores, temperatures |
| Geometric | Multiplicative growth | Investment returns, population growth |
| Harmonic | Equal-distance rates | Speeds, unit costs, P/E ratios |
💼 Finance and Ratios
In financial analysis, the harmonic mean is preferred for averaging price-to-earnings (P/E) ratios and other valuation multiples across a portfolio. Because a high P/E ratio corresponds to a relatively small earnings yield (the reciprocal), equal-weighting via the arithmetic mean overstates the average earnings yield. The harmonic mean corrects this by weighting each multiple by its implied yield.
⚖️ Weighted Harmonic Mean
Use the weighted mode when each value does not contribute equally. For example, if you purchase different quantities of items at different unit prices, weighting each price by the quantity purchased gives the true average cost per item. Enter your values in the first column and the corresponding weights in the second column — the tool validates that both lists have the same length.
📋 Supported Input Modes
- Simple dataset — paste or type any list of positive numbers
- Weighted — pair each value with a weight for importance-adjusted averaging
- Equal-distance speed — enter speeds for equal-length segments
- Ratio / multiple averaging — average P/E ratios or cost-per-unit figures
- Comparison mode — display harmonic, arithmetic, and geometric means side by side
⚠️ Limitations
The harmonic mean is only defined for strictly positive values. Zero values make the reciprocal undefined, and negative values produce mathematically meaningless results for rate-averaging purposes. The tool will flag any such entries before computing. If your dataset contains zeros or negatives, consider whether the harmonic mean is the appropriate measure, or pre-process your data to remove invalid entries.