Calculators
Weighted Harmonic Mean Calculator
Calculate a weighted harmonic mean from positive values and non-negative weights, privately in your browser.
Average rates using quantity weights.
The weighted harmonic mean is H = Σw / Σ(w / x). For speeds 30 and 60 over distances 1 and 2, H = 3 / (1/30 + 2/60) = 45. Use distance weights for average speed; use time weights with an arithmetic mean instead. Equal weights give the ordinary harmonic mean. Scaling every weight by the same positive factor leaves H unchanged. Values must be positive; weights must be non-negative and at least one must be positive. Zero-weight rows are ignored. Enter up to 10000 value and weight pairs, one per line, separated within each line by a comma, semicolon or space. Scientific notation is accepted; omit thousands separators and use consistent units. The result retains the values’ units and lies between the smallest and largest positive-weight values. Log-sum-exp arithmetic reduces overflow and underflow; browser floating-point results display up to 12 significant digits and negligible contributions can round away. All processing stays in your browser.
Frequently Asked Questions
Everything you need to know about this tool, how it works, and privacy.
How is the weighted harmonic mean calculated?
Divide the total weight by the sum of weight divided by value: H = Σw / Σ(w/x). Values 30 and 60 with weights 1 and 2 give 45.
Which weights should I use for average speed?
Use distances as the weights when averaging speeds. Total distance divided by total travel time gives the weighted harmonic mean. For time weights, use a weighted arithmetic mean.
Do weights need to sum to one?
No. Any non-negative relative weights work with at least one positive weight. Scaling all weights by the same positive factor preserves the result. Equal weights give the ordinary harmonic mean.
Are zero or negative inputs accepted?
Values must be strictly positive. Weights may be zero, in which case the pair is ignored, but cannot be negative. At least one weight must be positive.
How precise and private is this calculator?
Calculations run entirely in your browser using log-sum-exp arithmetic and display up to 12 significant digits. Extremely small contributions may round away. No data is uploaded.