Contact

HARMEAN Function in Calligra Sheets: Harmonic Average and Rate Examples

Statistical Intermediate Calligra Sheets

Understand HARMEAN in Calligra Sheets with numeric range examples, equal-distance average-speed calculations, manual checks and error limits.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: HARMEAN computes the harmonic mean: divide the count of positive observations by the sum of their reciprocals. For two equal-distance speeds of 40 and 60 km/h, =HARMEAN(40;60) has the independently calculated expected result 48 km/h, not the arithmetic 50. [K1, K3, I1]

Validation (2026-10-13): Pinned target is Calligra Sheets 26.08.2. The official handbook, 26.08.2 registration and C++ implementation were inspected; numbers below were independently calculated. No formula was executed in Calligra Sheets, and no screenshots or actual application errors were observed. [K1, K2, K3]

Availability and version history

  • Introduced: Documented by 26.08.2; original introduction not established.
  • Availability: Supported in Calligra Sheets 26.08.2, based on the function-specific registration.
  • Scope: The official application listing provides Linux installation; other packaged builds are unverified here.
  • Checked: October 14, 2026. Documentation/source check; no new native test in Calligra Sheets 26.08.2.

Exact syntax and arguments

=HARMEAN(value1; [value2]; ...)
=HARMEAN(A2:A5)
  • value1 (required): one numeric observation or a cell/range reference containing the observations. KDE labels its documented parameters as floating-point doubles. [K1]
  • value2, … (optional): further numeric observations, cell references or ranges. The source sets setParamCount(1, -1) and setAcceptArray() for this function: one or more arguments and an array/range accepted. There is no optional weighting flag or alternate calculation mode in that registration. [K2]
  • Return: a numeric harmonic mean when supported inputs allow evaluation. The mathematical mean for n nonzero values is n / (1/x1 + ... + 1/xn). The source explicitly computes count, then accumulates 1/value using the awSumInv callback, then divides count by that sum. [K3]
  • Separator and locale: this guide follows the English KDE handbook’s semicolon separator and a dot for decimal constants. Your installed regional settings can differ. References use colon notation, as in A2:A5. [K1]
  • Defaults/aliases: no separate optional parameter is defined. The pinned catalogue has no registered HARMEAN alias in the inspected registration. [K2]

For positive observations the harmonic mean is at most the geometric mean and arithmetic mean. Compared with AVERAGE, it is influenced more strongly by smaller values. It is not a blanket substitute for weighted averages. [I1, M1]

Set up one reproducible worksheet

  1. Create a blank worksheet in Calligra Sheets and verify that HARMEAN is available in your installed function list. Release source registration alone does not validate an installed build. [K2]
  2. Fill the cells below with numbers. The speed examples refer to equal distances; do not interpret them as an average for equal travel times.
  3. For B2, enter =1/A2 and fill down to B5. This helper column provides an independent reciprocal check.
  4. Enter the formulas shown in E2:E12. Format fractional results to at least six decimals and compare with the independent expectations.
Cell Value Cell Value Cell Value
A1 Measurement B1 Reciprocal D1 Speed (km/h)
A2 4 B2 =1/A2 → 0.25 D2 40
A3 8 B3 =1/A3 → 0.125 D3 60
A4 16 B4 =1/A4 → 0.0625 D4 (empty)
A5 32 B5 =1/A5 → 0.03125 D5 (empty)
Enter in Formula Expected result, independently calculated Explanation
E2 =HARMEAN(A2:A5) 8.533333333333 Four measurements.
E3 =HARMEAN(4;8;16;32) 8.533333333333 Explicit inputs check the range form.
E4 =COUNT(A2:A5)/SUM(B2:B5) 8.533333333333 Independent reciprocal-column calculation.
E5 =HARMEAN(3;6;12;24) 6.4 A second four-term dataset.
E6 =HARMEAN(5) 5 One positive value remains unchanged.
E7 =HARMEAN(10;10) 10 Equal inputs have an equal harmonic mean.
E8 =HARMEAN(21;33;54;23) 28.587997907481 Reproduces KDE’s rounded official example, 28.588.
E9 =HARMEAN(D2:D3) 48 Equal-distance average speed.
E10 =2/(1/D2+1/D3) 48 Explicit reciprocal check.
E11 =AVERAGE(D2:D3) 50 Equal-time arithmetic mean; wrong for these equal-distance travel segments.
E12 =HARMEAN(1;2;4) 1.714285714286 Sum of reciprocals is 1.75.

Arithmetic audit: for the first dataset, 1/4 + 1/8 + 1/16 + 1/32 = 0.46875 and 4/0.46875 = 8.533333333333. For KDE’s published sample 21;33;54;23, independent reciprocal arithmetic gives 28.587997907481 before rounding to 28.588. [I1, K1]

Advanced application: why equal-distance speed needs a harmonic mean

Consider two road sections of 10 km each. The first is traveled at 40 km/h and the second at 60 km/h. Their travel times are 10/40 = 0.25 hours and 10/60 = 0.1666666667 hours. Total distance is 20 km and total time is 0.4166666667 hours. Therefore overall average speed is 48 km/h. HARMEAN(40;60) gives the same number because the two sections have equal distance. [I1]

If the sections have unequal distances, an unweighted HARMEAN(speed1;speed2) is generally not the correct trip average. Instead, create a distance column and compute =SUM(distance_range)/SUM(time_range), with each travel time calculated as distance/speed. This avoids applying an equal-distance formula to a different model. [I1]

Second application: comparing average rates. For a series of positive rates measured against equal fixed quantities, low rates dominate the total time/cost per unit. Use HARMEAN only when the weighting structure genuinely matches equal quantities; when measurements represent time-weighted or volume-weighted data, derive the total numerator and denominator directly. [I1]

Errors, restrictions and troubleshooting

Situation Diagnosis and next step Evidence type
Formula is displayed as text Start with = and ensure the destination cell is not forced to text format. General spreadsheet diagnostic; not native-tested.
Function not recognized Check the installed version/module against the KDE 26.08.2 registration; the official source contains HARMEAN. Source presence only. [K2]
Formula parse error KDE’s English examples use ;. Verify your installed input language and decimal mark. Handbook, not native locale testing. [K1]
No numeric observations The pinned function explicitly returns internal errorDIV0 when count == 0. Do not claim the displayed cell message without native execution. Source-inferred. [K3]
A zero-valued observation awSumInv performs 1/value for each selected value; zero introduces division by zero. The exact visible Calligra error text and conversion path were not tested. Source-inferred; native test required. [K3]
Positive and negative values mixed The C++ wrapper contains no explicit positive-only gate; reciprocal sums can also cancel. Do not assert Excel’s #NUM! result in Calligra. Source discrepancy pending native testing. [K3, M1]
Blank cells, booleans, text, and text-formatted numbers The helpers’ conversion/counting semantics must be tested in a real Calligra package. Avoid mixing types in the instructional examples. Not verified in this run. [K3]
Unexpected round numbers Increase displayed decimal places; spreadsheet cell formatting can mask fractional precision. Independent numerical check. [I1]
An average of speeds looks too low Confirm whether segments represent equal distances, not equal times. Applied-math model check. [I1]

Native-validation queue: test HARMEAN(0;8), HARMEAN(-2;8), HARMEAN(1;-1) (reciprocal cancellation), an all-empty reference, a text value within a reference, direct Boolean inputs, mixed-locale formulas, and error propagation. None of these edge-case outputs is claimed as an observed application result. [K3]

Spreadsheet compatibility and software version

  • Calligra 26.08.2 (released by KDE on 2026-10-08): registered with a minimum of one argument and range support. The KDE handbook’s HARMEAN(21;33;54;23) gives a rounded 28.588, consistent with independent arithmetic. [K1, K2, K4, I1]
  • Microsoft Excel: the same function name is documented with comma-based US syntax, at most 255 arguments and a documented #NUM! result for any observation ≤0. These are Excel facts and must not be presented as verified Calligra error behavior. [M1]
  • Platforms: Calligra’s official downloads page describes Linux packages and Flatpak, with Windows support in progress as checked 2026-10-13. No native Calligra runtime was used on any platform. [K5]
  • Locale/edition: the KDE English reference chapter’s revision is 2013-03-11; the source proof is specifically pinned to 26.08.2. A packaged distribution may ship a different version, translations or modules. [K1, K2]

Evidence ledger (claim-level; checked 2026-10-13)