HARMEAN Function

Excel 2007+

Summary

The Excel HARMEAN function calculates the harmonic mean of a dataset. The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals, making it ideal for averaging rates, ratios, and per-unit measurements where the same total denominator applies to all values.

Syntax

HARMEAN(number1, [number2], ...)

Parameters

Parameter Type Required Description
number1 Number|Range Yes Required first number, array, or cell range containing positive numbers
[number2], ... Number|Range No Optional additional numbers or ranges (1-255 total arguments)

Using the HARMEAN Function

HARMEAN excels when averaging rates or ratios where you travel/cover the same distance/time across different speeds/efficiencies. Use it for calculating average speeds, harmonic means of MPG ratings, or any scenario where traditional arithmetic averages would be misleading.

Common HARMEAN Examples

Average Speed Calculation

=HARMEAN(40,60)

Driver travels 40km/h one way, 60km/h return. HARMEAN=48km/h (correct average for same distance). Arithmetic mean of 50km/h would be wrong.

Fuel Efficiency Average

=HARMEAN(B2:B7)

Calculates true average MPG across equal-distance trips with varying fuel efficiencies.

Machine Processing Rate

=HARMEAN(A1:A10)

Average processing time per unit across machines handling same total workload.

Frequently Asked Questions

Use HARMEAN for rates/ratios with equal denominators (distance, time, workload). Use AVERAGE for simple quantity averages.

HARMEAN requires all numbers > 0. Zero or negative values cause #NUM! error since reciprocals are undefined.

Yes, HARMEAN ignores text, logical values, and empty cells in ranges automatically.

Common Errors and Solutions

#NUM! Error

Cause: Any number in dataset is zero or negative

Solution: Ensure all values are positive numbers greater than zero

#VALUE! Error

Cause: Arguments contain unconvertible text or error values

Solution: Clean data or use IFERROR wrapper

Incorrect results for rates

Cause: Using AVERAGE instead of HARMEAN for speed/ratio data

Solution: Always use HARMEAN for equal-distance/time rate averaging

Notes

  • HARMEAN < GEOMEAN < AVERAGE (mathematical relationship)
  • Include zeros in ranges (treated as data points)
  • Directly typed numbers/text are counted (unlike ranges)
  • Perfect complement to GEOMEAN and AVERAGE functions

Compatibility

Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Microsoft 365

Not available in:

Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+