HARMEAN Function (OpenOffice Calc)
Calculate harmonic means in Apache OpenOffice, using equal-distance rate examples, reciprocal checks and strictly positive input rules.
Verification status: Eight reference formulas and 4 boundary cases were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, using XLSX import and GUI hard recalculation. Other explanatory calculations are independent references. How formula examples are checked
Quick answer: =HARMEAN(1;4;16) has reference value 2.285714285714.
Availability and version history
- Introduced: First release not established; documented by OpenOffice.org 3.3.
- Supported in: Apache OpenOffice 4.1.16; this is a verified release, not a final supported version.
- Scope: Desktop Calc, English function names and semicolon-separated formulas. Locale and file-format mappings may differ.
- Checked: October 14, 2026. Eight reference formulas and the listed boundary cases were recalculated in 4.1.16 on Linux x86-64, Build 9816, using XLSX import. Source and independent mathematics were also checked.
What HARMEAN returns
HARMEAN returns n divided by the sum of the reciprocals of n collected positive observations. It is useful when the quantity being averaged appears in a denominator, provided the observations have the appropriate equal weighting. Release implementation.
Syntax and arguments
=HARMEAN(Number1 [; Number2; ā¦])
Supply one or more positive numeric arguments or ranges. The evaluator rejects zero and negative numeric inputs. Referenced empty or text cells are skipped by the numeric range path. A direct text argument is a separate case; rely on the documented or observed form rather than assuming every argument is collected identically.
Reproducible examples
These eight formulas were recalculated in the stated 4.1.16 build using XLSX import. Saved numeric results agree with independent high-precision calculations; values below are rounded to twelve decimal places. The comparison concerns stored values, not a claim that every display format prints the same digits.
For the range formulas, enter these values in the indicated columns and rows. Keep labels outside the calculation ranges.
| Row | A | C |
|---|---|---|
| 4 | 1 | 10 |
| 5 | 2 | 20 |
| 6 | 3 | 30 |
| 7 | 4 | 40 |
| 8 | 5 | 50 |
| 9 | 6 | 60 |
| 10 | 7 | 70 |
| 11 | 8 | 80 |
| 12 | 9 | 90 |
| 13 | 10 | 100 |
| Formula | Reference / native agreement |
|---|---|
=HARMEAN(2;8) |
3.2 |
=HARMEAN(1;4;16) |
2.285714285714 |
=HARMEAN(1.1;0.9) |
0.99 |
=HARMEAN(2;4;8) |
3.428571428571 |
=HARMEAN(5) |
5 |
=HARMEAN(60;90) |
72 |
=HARMEAN(A4:A13) |
3.414171521474 |
=HARMEAN(C4:C13) |
34.141715214741 |
Practical worksheet
A vehicle travels the same distance at 60 and 90 distance-units per hour. =HARMEAN(60;90) gives 72. For two distances of 180, the total distance is 360 and total time is 3+2=5 hours, so the overall rate is 360/5=72.
If the vehicle instead travels for equal times at those speeds, the overall rate is the arithmetic mean 75. The correct mean depends on what is held equal. A function name alone cannot decide how the observations should be weighted.
Advanced interpretation and checks
For 2 and 8, the harmonic mean is 2/(1/2+1/8)=3.2. For 2, 4 and 8 it is 24/7, approximately 3.428571428571. These reciprocal calculations provide independent checks of the printed examples.
Multiplying all inputs by the same positive constant multiplies the harmonic mean by that constant. The uniform A column and ten-times-larger C column demonstrate this property. The harmonic mean is at most the geometric and arithmetic means for positive observations, with equality when all values are equal.
For unequal distances dā and dā and positive rates vā and vā, the combined rate is (dā+dā)/(dā/vā+dā/vā). HARMEAN(vā;vā) does not incorporate unequal distances automatically. Keep the weights alongside the rates in the worksheet.
Boundaries and troubleshooting
A zero rate makes an ordinary reciprocal calculation undefined and is rejected rather than ignored. A missing cell can be skipped by range collection, which is a different condition from a recorded zero. Preserve that distinction when importing measurements.
Small positive observations can strongly influence the harmonic mean through their large reciprocals. Extreme values can also encounter floating-point limits. The examples establish the listed calculations, not universal accuracy for every scale or observation count.
The following boundary formulas were recalculated in the same named method. H5 and H6 are deliberately empty cells where referenced. An error display remains an error even if the underlying ODS numeric attribute stores zero.
| Formula | Native result or error |
|---|---|
=HARMEAN(0;4) |
Err:502 |
=HARMEAN(-1;4) |
Err:502 |
=HARMEAN(H5;4) |
4 |
=HARMEAN("abc";4) |
Err:504 |
Related functions
Official evidence and checking scope
The retained input and saved ODS preserve the tested formula identities. A stale SUM cache changed from 999999 to 3, and an uncached SUM returned 7 after hard recalculation. Native evidence is limited to the eight reference formulas and listed boundary cases in this exact release and method. Composite explanatory examples are independent calculations unless listed among those cases; other releases, locales and extreme-parameter accuracy were not established.