{
  "category": "Statistical functions",
  "display_name": "GEOMEAN",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.GEOMEAN",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430",
        "20527"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1225,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 1225,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 1,225 in the answer bank and 752 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,977 recorded answers",
    "workbook_corpus": {
      "cells": 752,
      "matched": 752
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/statistics.rs#L214-L237"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/statistics::all",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric/x87::mul"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/statistics.rs#L214-L237",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,977 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.GEOMEAN.json",
  "name": "GEOMEAN",
  "notes": [
    {
      "basis": "Two rows read directly from the landed regenerated W111 capture files. Both record Excel build 20430, Windows 64-bit, Compatibility Version 2 and exact-double bulk Value2 inputs, on 29 September 2026. The calls are to different functions in the same recorded environment class; this is not a comparison between builds and no fresh Excel calls were made.",
      "documentation": null,
      "evidence": [
        {
          "commit": "4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2",
          "locator": "w111broad-20260929-GEOMEAN-00003",
          "note": "Recorded GEOMEAN(1,2) answer and capture provenance.",
          "path": "cache/w111-broad-regenerated-20260929/answers-geomean.json.gz",
          "repository": "CalcFunc-Evidence"
        },
        {
          "commit": "4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2",
          "locator": "w111broad-20260929-SQRT-00014",
          "note": "Recorded SQRT(2) answer and capture provenance.",
          "path": "cache/w111-broad-regenerated-20260929/answers-sqrt.json.gz",
          "repository": "CalcFunc-Evidence"
        },
        {
          "commit": "da3ecc4fb19a3a5529708c311d0e8f05688ac165",
          "locator": "excel_root_x87",
          "note": "Current normalized LN, reciprocal and EXP root reconstruction.",
          "path": "crates/calc-func/src/ported/excel_numeric/x87_chains.rs",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.GEOMEAN",
        "FUNC.SQRT"
      ],
      "inferred": null,
      "kind": "excel-differs-from-math",
      "note_id": "FN-GEOMEAN-001",
      "open": [
        "Whether other inputs or environments retain the same difference; the two rows do not certify whole-function agreement or identify private Excel code."
      ],
      "recorded_on": "2026-11-06",
      "repros": [
        {
          "call": "GEOMEAN(1,2)",
          "correct": {
            "bits": "0x3ff6a09e667f3bcd",
            "display": "1.4142135623730951",
            "how": "Exact rational comparison: 2 lies strictly between the squares of the lower and upper binary64 midpoints around 0x3ff6a09e667f3bcd. Therefore that value is the nearest binary64 square root of 2.",
            "kind": "number"
          },
          "excel": {
            "bits": "0x3ff6a09e667f3bcc",
            "display": "1.414213562373095",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number1",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            },
            {
              "name": "number2",
              "value": {
                "bits": "0x4000000000000000",
                "display": "2",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20430, Windows 64-bit (NT 10.00), Workbook Compatibility Version 2; CPU not recorded. Captured 29 September 2026.",
          "source": {
            "commit": "4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2",
            "locator": "w111broad-20260929-GEOMEAN-00003",
            "note": "Capture provenance records exact-double bulk Value2 cell input.",
            "path": "cache/w111-broad-regenerated-20260929/answers-geomean.json.gz",
            "repository": "CalcFunc-Evidence"
          }
        },
        {
          "call": "SQRT(2)",
          "correct": null,
          "excel": {
            "bits": "0x3ff6a09e667f3bcd",
            "display": "1.4142135623730951",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number",
              "value": {
                "bits": "0x4000000000000000",
                "display": "2",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20430, Windows 64-bit (NT 10.00), Workbook Compatibility Version 2; CPU not recorded. Captured 29 September 2026.",
          "source": {
            "commit": "4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2",
            "locator": "w111broad-20260929-SQRT-00014",
            "note": "Capture provenance records exact-double bulk Value2 cell input.",
            "path": "cache/w111-broad-regenerated-20260929/answers-sqrt.json.gz",
            "repository": "CalcFunc-Evidence"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "In two retained build 20430 controls, GEOMEAN(1,2) returned 1.414213562373095 (0x3ff6a09e667f3bcc), while SQRT(2) returned 1.4142135623730951 (0x3ff6a09e667f3bcd). Both functions mathematically return the positive square root of two; the SQRT result is the nearest binary64 value. A fifteen-significant-digit display hides the difference.",
      "status": "measured",
      "title": "GEOMEAN(1,2) and SQRT(2) return adjacent values in retained build 20430 controls"
    }
  ],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[AVERAGE](FUNC.AVERAGE.md) suits additive quantities; [HARMEAN](FUNC.HARMEAN.md) suits rates over equal-sized portions. A scaled or logarithmic product is useful for a mathematical implementation if its different rounding history is acceptable.\n\n\n\n\n",
    "how-to-implement": "\n1. Collect the admitted numeric values. Reject an empty collection or any nonpositive admitted value with `#NUM!` before indexing the first value or taking logarithms. The current code returns the common positive input immediately when all admitted values are equal; a singleton is also an identity.\n2. Fold the product in input order, storing **each** multiplication with `R(op)` from the [variance recipe](FUNC.VAR.S.md#how-to-implement). Continue with positive normal product `P` and count `n`. If the product is zero, subnormal or nonfinite, stop this normalized recipe: the current sum-of-logs fallback is a separately unresolved candidate.\n3. Extract the integer binary exponent `e=floor(log2(P))` from the encoded exponent. Compute the integer `q=trunc(e/n)`, toward zero. Scale by an exact power of two: `M=P*2^(-q*n)`. Do not use floor for negative exponent division.\n4. Store the measured public `LN(M)` result. Separately compute and store `R(1/n)`, then store `R(LN(M)*reciprocal)`. A direct `LN(M)/n` removes an observed rounding stage.\n5. Call the measured public EXP on that stored argument, store its result, and scale by `2^q`.\n\nWorked identity reduction: `2*8=16`, `e=4`, `n=2`, `q=2`, `M=1`; LN gives zero, EXP gives one and scaling returns four. A nontrivial reduction, `2*4=8`, uses `e=3`, `q=1`, `M=2`; stored LN times the stored half is about `0.34657359027997265`, EXP is about `1.414213562373095`, then scaling gives about `2.82842712474619`.\n\nThe normalized composition and product stores are isolated on the cited scalar controls. LN/EXP depend on their measured instruction models; substituting a language’s libm is a numerical alternative with different possible last bits. Private root internals, global branch boundaries and the overflow/underflow product fallback remain open. The code’s sum-of-logs fallback is an explicit candidate, not an Excel identification.\n\n\n",
    "quirks": "\nAn admitted zero or negative value gives `#NUM!`. References ignore text, logical values and blanks; direct logical values and numeric text can be admitted. A product may overflow or underflow even when its geometric mean is representable. The current fallback for that case is not an identified Excel route.\n\n\n",
    "sources": "\n- [Microsoft: GEOMEAN function](https://support.microsoft.com/en-us/excel/functions/geomean-function), opened 6 November 2026; syntax, documented argument rules and errors.\n- [DnaCalc implementation](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/ported/excel_numeric/x87_chains.rs); implementation steps and the limits identified in the text.\n- [Product and fallback](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/catalogue/statistics.rs).\n- [Numerical fingerprint scope](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/docs/generated/numeric-fingerprints.md).\n- [FN-GEOMEAN-001](../notes/FN-GEOMEAN-001.json): two retained build 20430 controls, with a rational check of the nearest square root.\n\n",
    "try-it": "\n`=GEOMEAN(2,8)` returns `4`. Both observations can be replaced by four without changing their product. `=GEOMEAN(1.1,0.9)` is about `0.9949874371`, showing that equal percentage gains and losses do not cancel multiplicatively.\n\nThe retained build 20430 controls give `GEOMEAN(1,2)=1.414213562373095` and `SQRT(2)=1.4142135623730951`, adjacent binary64 values. [FN-GEOMEAN-001](../notes/FN-GEOMEAN-001.json) retains the exact cell inputs and both answers. Their mathematical values agree, but the recorded calculation routes do not publish the same bits.\n\n\n",
    "version-differences": "The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.\n\n| Excel 16.0 build | Platform and CPU | Captured inputs |\n|---|---|---:|\n| 20430 | Windows, 64-bit, CPU not recorded | 1,212 |\n\nThe record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.GEOMEAN.json).\n\nRetained controls from the indexed captures:\n\n| Build and recorded CPU | Captured call or arguments | Excel result |\n|---|---|---|\n| 20430, CPU not recorded | [`GEOMEAN(1,2)`](https://github.com/DnaCalc/CalcFunc-Evidence/blob/4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2/cache/w111-broad-regenerated-20260929/answers-geomean.json.gz) | `1.414213562373095` (`0x3ff6a09e667f3bcc`) |\n\nThese are earlier recorded answers, not new Excel runs or an additional cross-build comparison. The function JSON retains each source locator, exact argument bits where available, and input-route status. Call notation does not imply that captured binary64 values were entered as decimal formula literals.",
    "what-it-does": "\n`GEOMEAN(number1, [number2], ...)` computes the geometric mean of positive numbers: the nth root of their product. For growth rates, supply growth factors such as `1.05`, then subtract one from the result if a rate is wanted.\n\n\n"
  },
  "signature": {
    "display": "GEOMEAN(number1, [number2], ...)",
    "parameters": [
      {
        "description": null,
        "name": "number1",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "number2",
        "optional": true,
        "repeats": true
      }
    ],
    "trailing_repeats": true
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 255,
        "min": 1
      },
      "category": "Statistical functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "AggregateDirectAndRangeDualPolicy",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "NumsToNum",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Geometric mean: the n-th root of the product of n positive values",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the geometric mean",
        "microsoft_url": "https://support.microsoft.com/en-us/office/geomean-function-db1ac48d-25a5-40a0-ab83-0b38980e40d5"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "GEOMEAN"
        },
        {
          "locale": "bg-BG",
          "name": "GEOMEAN"
        },
        {
          "locale": "cs-CZ",
          "name": "GEOMEAN"
        },
        {
          "locale": "da-DK",
          "name": "GEOMIDDELVÆRDI"
        },
        {
          "locale": "de-DE",
          "name": "GEOMEAN"
        },
        {
          "locale": "el-GR",
          "name": "GEOMEAN"
        },
        {
          "locale": "en-AU",
          "name": "GEOMEAN"
        },
        {
          "locale": "en-GB",
          "name": "GEOMEAN"
        },
        {
          "locale": "en-US",
          "name": "GEOMEAN"
        },
        {
          "locale": "es-ES",
          "name": "MEDIA.GEOM"
        },
        {
          "locale": "et-EE",
          "name": "GEOMEAN"
        },
        {
          "locale": "fi-FI",
          "name": "KESKIARVO.GEOM"
        },
        {
          "locale": "fr-FR",
          "name": "MOYENNE.GEOMETRIQUE*"
        },
        {
          "locale": "he-IL",
          "name": "GEOMEAN"
        },
        {
          "locale": "hr-HR",
          "name": "GEOMEAN"
        },
        {
          "locale": "hu-HU",
          "name": "MÉRTANI.KÖZÉP"
        },
        {
          "locale": "id-ID",
          "name": "GEOMEAN"
        },
        {
          "locale": "it-IT",
          "name": "GEOMEAN"
        },
        {
          "locale": "ja-JP",
          "name": "GEOMEAN"
        },
        {
          "locale": "ko-KR",
          "name": "GEOMEAN"
        },
        {
          "locale": "lt-LT",
          "name": "GEOMEAN"
        },
        {
          "locale": "lv-LV",
          "name": "GEOMEAN"
        },
        {
          "locale": "nb-NO",
          "name": "GEOMEAN"
        },
        {
          "locale": "nl-NL",
          "name": "MEETK.GEM"
        },
        {
          "locale": "pl-PL",
          "name": "ŚREDNIA.GEOMETRYCZNA"
        },
        {
          "locale": "pt-BR",
          "name": "GEOMEAN"
        },
        {
          "locale": "pt-PT",
          "name": "MÉDIA.GEOMÉTRICA"
        },
        {
          "locale": "ro-RO",
          "name": "GEOMEAN"
        },
        {
          "locale": "ru-RU",
          "name": "СРГЕОМ"
        },
        {
          "locale": "sk-SK",
          "name": "GEOMEAN"
        },
        {
          "locale": "sl-SI",
          "name": "GEOMEAN"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "GEOMEAN"
        },
        {
          "locale": "sv-SE",
          "name": "GEOMEDEL"
        },
        {
          "locale": "th-TH",
          "name": "GEOMEAN"
        },
        {
          "locale": "tr-TR",
          "name": "GEOORT Denklemi"
        },
        {
          "locale": "uk-UA",
          "name": "GEOMEAN"
        },
        {
          "locale": "vi-VN",
          "name": "GEOMEAN"
        },
        {
          "locale": "zh-CN",
          "name": "GEOMEAN"
        },
        {
          "locale": "zh-HK",
          "name": "GEOMEAN"
        },
        {
          "locale": "zh-TW",
          "name": "GEOMEAN"
        }
      ],
      "signature": {
        "display": "GEOMEAN(number1, [number2], ...)",
        "parameters": [
          {
            "description": null,
            "name": "number1",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "number2",
            "optional": true,
            "repeats": true
          }
        ],
        "trailing_repeats": true
      },
      "surface_name": "GEOMEAN",
      "version_marker": null,
      "xlcall": {
        "code": "319",
        "symbol": "xlfGeomean"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/geomean-function-db1ac48d-25a5-40a0-ab83-0b38980e40d5"
  },
  "try_it": {
    "formula": "=GEOMEAN(2,8)"
  },
  "url": "https://handbook.dnacalc.com/functions/GEOMEAN.html",
  "variants": [
    {
      "code": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/statistics.rs#L214-L237",
      "difference": "GEOMEAN(1,2) returned 0x3ff6a09e667f3bcc where SQRT(2) returned 0x3ff6a09e667f3bcd, adjacent values, in one build. No second build or CPU has been compared on the same inputs.",
      "error_bound": null,
      "evidence": [
        {
          "commit": "4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2",
          "locator": "w111broad-20260929-GEOMEAN-00003",
          "note": "FN-GEOMEAN-001",
          "path": "cache/w111-broad-regenerated-20260929/answers-geomean.json.gz",
          "repository": "CalcFunc-Evidence"
        }
      ],
      "key": {
        "cpu": "CPU not recorded (Windows, 64-bit)",
        "excel_build_range": "16.0 build 20430"
      },
      "kind": "environment",
      "name": "GEOMEAN root control, Excel 16.0 build 20430",
      "onecalc_udf": null,
      "state": "matches",
      "state_summary": "Matches every recorded GEOMEAN answer; the root is a reconstruction of stored stages."
    }
  ],
  "versions": [
    {
      "behaviour": "1,212 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build. Retained control GEOMEAN(1,2) returned 1.414213562373095 (0x3ff6a09e667f3bcc). The capture specifies exact-double bulk Value2 cell input.",
      "excel_build": "16.0 build 20430",
      "observations": [
        {
          "call": "GEOMEAN(1,2)",
          "excel": {
            "bits": "0x3ff6a09e667f3bcc",
            "display": "1.414213562373095",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "argument1",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            },
            {
              "name": "argument2",
              "value": {
                "bits": "0x4000000000000000",
                "display": "2",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20430, Windows, 64-bit, CPU not recorded.",
          "source": {
            "commit": "4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2",
            "locator": "w111broad-20260929-GEOMEAN-00003",
            "path": "cache/w111-broad-regenerated-20260929/answers-geomean.json.gz",
            "repository": "CalcFunc-Evidence"
          }
        }
      ],
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.GEOMEAN.json",
        "https://github.com/DnaCalc/CalcFunc-Evidence/blob/4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2/cache/w111-broad-regenerated-20260929/answers-geomean.json.gz"
      ]
    }
  ]
}