{
  "category": "Statistical functions",
  "display_name": "GAMMA",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.GAMMA",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20131",
        "20527",
        "?"
      ],
      "larger_numeric": 26,
      "last_bit": 6171,
      "matched": 6406,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 12603,
      "unread": 0,
      "worst_ulp": 49
    },
    "detail": "Of 12,606 recorded answers (12,603 in the answer bank and 3 workbook cells), 6,197 do not match: 26 differ by more than 16 ULP, 6,171 differ by at most 16 ULP.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "differs",
    "state_label": "Known larger differences",
    "summary": "Known larger differences on 6,197 of 12,606 recorded answers",
    "workbook_corpus": {
      "cells": 3,
      "matched": 3
    }
  },
  "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/distributions.rs#L239-L239",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/special_dist_family.rs#L25-L30",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/special_dist_family.rs#L32-L34",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/special_dist_family.rs#L117-L153"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/distributions.rs#L239-L239",
      "state": "differs",
      "suite": null,
      "summary": "Known larger differences on 6,197 of 12,606 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.GAMMA.json",
  "name": "GAMMA",
  "notes": [
    {
      "basis": "2,000 of 2,000 fractions at each i from 2 to 9, from Excel's own GAMMA(1+y) (build 20527). The same formula fails at i = 10. Replayed for this note in exact rational arithmetic on 300 of those fractions: 300 of 300 at each i from 2 to 9, 61 of 300 at i = 10. Recorded GAMMA rows match 6,406 of 12,603 with stand-ins for the seed and the Stirling series, the worst by 49 units.",
      "documentation": null,
      "evidence": [
        {
          "commit": "b5d84a80a5a4640eca9ce04f232c0bc115503f34",
          "locator": null,
          "note": "research write-up: how the stored stages were read",
          "path": "content/notes/evidence/2026-11-04/gamma-EVIDENCE.md",
          "repository": "ExcelFunctionsHandbook"
        },
        {
          "commit": "1c7a4ab86b12b53d80947f06b6d381e8e5dd5f3f",
          "locator": null,
          "note": "the routes in the product, with stand-ins where the code says so; the commit message carries the row counts",
          "path": "crates/calc-func/src/ported/excel_numeric/gammaln.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "af74247e1ed54f0b535143f1305261b98d80d18e",
          "locator": null,
          "note": "rows matched per function",
          "path": "crates/calc-func/witness-status.tsv",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.GAMMA"
      ],
      "inferred": null,
      "kind": "bit-matching-detail",
      "note_id": "FN-GAMMA-001",
      "open": [
        "The seed GAMMA(1+y) on (1,2): about five stored smooth quantities, seen as lines in its noise. Cody's rational matches 33% of it. Many closed families were tested and refuted.",
        "x < 1 and negative arguments."
      ],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "GAMMA(1.6493607064491727)",
          "correct": null,
          "excel": {
            "bits": "0x3fecccf73c5e41af",
            "display": "0.900020234972592",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number",
              "value": {
                "bits": "0x3ffa63c80d581b40",
                "display": "1.6493607064491727",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading",
          "source": {
            "commit": "b5d84a80a5a4640eca9ce04f232c0bc115503f34",
            "locator": "GAMMA 3ffa63c80d581b40",
            "note": null,
            "path": "content/notes/evidence/2026-11-04/gamma-readings.tsv",
            "repository": "ExcelFunctionsHandbook"
          }
        },
        {
          "call": "GAMMA(3.6493607064491727)",
          "correct": {
            "bits": "0x400f7681c7bb23e8",
            "display": "3.93286472358567",
            "how": "mpmath gamma at 800 bits from the binary64 input, correctly rounded.",
            "kind": "number"
          },
          "excel": {
            "bits": "0x400f7681c7bb23e9",
            "display": "3.9328647235856704",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number",
              "value": {
                "bits": "0x400d31e406ac0da0",
                "display": "3.6493607064491727",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading",
          "source": {
            "commit": "b5d84a80a5a4640eca9ce04f232c0bc115503f34",
            "locator": "GAMMA 400d31e406ac0da0",
            "note": null,
            "path": "content/notes/evidence/2026-11-04/gamma-readings.tsv",
            "repository": "ExcelFunctionsHandbook"
          }
        },
        {
          "call": "GAMMA(5.649360706449173)",
          "correct": {
            "bits": "0x4050aeb312f3b058",
            "display": "66.7296798114561",
            "how": "mpmath gamma at 800 bits from the binary64 input, correctly rounded.",
            "kind": "number"
          },
          "excel": {
            "bits": "0x4050aeb312f3b057",
            "display": "66.72967981145608",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number",
              "value": {
                "bits": "0x401698f2035606d0",
                "display": "5.649360706449173",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading",
          "source": {
            "commit": "b5d84a80a5a4640eca9ce04f232c0bc115503f34",
            "locator": "GAMMA 401698f2035606d0",
            "note": null,
            "path": "content/notes/evidence/2026-11-04/gamma-readings.tsv",
            "repository": "ExcelFunctionsHandbook"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "With RN(v) meaning v rounded to 64 bits on the x87 unit and then stored to binary64, write x = i + y with GAMMA(1+y) on (1,2). For i from 2 to 9, GAMMA(x) is RN(t*GAMMA(1+y)), where t is the product (x-1)(x-2)...(1+y) taken from the top with each product RN. Each stage rounds, so the answers are not correctly rounded: at the fraction below, GAMMA(3.649...) is 1 unit high and GAMMA(5.649...) 1 unit low. The seed on (1,2) is a chain of stored products that has not been identified, and at x = 10 the route changes (FN-GAMMA-002).",
      "status": "measured",
      "title": "Below 10, GAMMA is a stored product down to a seed on (1,2)"
    },
    {
      "basis": "Noise lines on windows of consecutive doubles (Excel build 20527): stored x^2 with weight x/2, then x^4, x^8 and x^16 at the frequencies a stored square of a stored value gives, stored ln x, and the bias. This chain gives every bit on 69.5% of 59,200 answers from 36 to 170.",
      "documentation": null,
      "evidence": [
        {
          "commit": "b5d84a80a5a4640eca9ce04f232c0bc115503f34",
          "locator": null,
          "note": "research write-up: how the stored stages were read",
          "path": "content/notes/evidence/2026-11-04/gamma-EVIDENCE.md",
          "repository": "ExcelFunctionsHandbook"
        },
        {
          "commit": "1c7a4ab86b12b53d80947f06b6d381e8e5dd5f3f",
          "locator": null,
          "note": "the routes in the product, with stand-ins where the code says so; the commit message carries the row counts",
          "path": "crates/calc-func/src/ported/excel_numeric/gammaln.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "af74247e1ed54f0b535143f1305261b98d80d18e",
          "locator": null,
          "note": "rows matched per function",
          "path": "crates/calc-func/witness-status.tsv",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.GAMMA"
      ],
      "inferred": "The chain is read from the noise, and 30.5% of the answers in that range do not yet match, so at least one stored stage is missing. The series w is only seen as a line at 1/(12 m x), and below x = 30 it differs from the true series.",
      "kind": "excel-differs-from-math",
      "note_id": "FN-GAMMA-002",
      "open": [
        "The Stirling series below x = 30, and the stored stage still missing above it."
      ],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "GAMMA(10.649360706449173)",
          "correct": {
            "bits": "0x41386b3cabbb5089",
            "display": "1600316.6708269438",
            "how": "mpmath gamma at 800 bits from the binary64 input, correctly rounded.",
            "kind": "number"
          },
          "excel": {
            "bits": "0x41386b3cabbb5088",
            "display": "1600316.6708269436",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number",
              "value": {
                "bits": "0x40254c7901ab0368",
                "display": "10.649360706449173",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading",
          "source": {
            "commit": "b5d84a80a5a4640eca9ce04f232c0bc115503f34",
            "locator": "GAMMA 40254c7901ab0368",
            "note": null,
            "path": "content/notes/evidence/2026-11-04/gamma-readings.tsv",
            "repository": "ExcelFunctionsHandbook"
          }
        },
        {
          "call": "GAMMA(160.48267465838674)",
          "correct": {
            "bits": "0x7acd5c4d6f1f4f35",
            "display": "3.4109096900320908e+283",
            "how": "mpmath gamma at 800 bits from the binary64 input, correctly rounded.",
            "kind": "number"
          },
          "excel": {
            "bits": "0x7acd5c4d6f1f4edc",
            "display": "3.410909690032054e+283",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number",
              "value": {
                "bits": "0x40640f7212200c21",
                "display": "160.48267465838674",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading",
          "source": {
            "commit": "b5d84a80a5a4640eca9ce04f232c0bc115503f34",
            "locator": "GAMMA 40640f7212200c21",
            "note": null,
            "path": "content/notes/evidence/2026-11-04/gamma-readings.tsv",
            "repository": "ExcelFunctionsHandbook"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "From x = 10, GAMMA behaves as sqrt(2 pi) x^x exp(-x) / sqrt(x) w with stored stages: x^2, x^4, x^8 and so on by binary powering of floor(x/2), stored ln x, exponent and exponential for the fraction of x/2, stored exp(-x), an unstored square root, and each outer product stored. The first factor is the binary64 value of sqrt(2 pi), whose rounding gives every band a bias of +0.66 of 2^-53. The answers' noise grows with x, with a root mean square of about 0.225*x units of 2^-53 above 20, so near x = 160 an answer can sit 89 units from the correctly rounded value, as below.",
      "status": "inferred",
      "title": "From 10 up, GAMMA is a Stirling product of stored stages, and its error grows with x"
    }
  ],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n- **[GAMMALN](FUNC.GAMMALN.md) and [GAMMALN.PRECISE](FUNC.GAMMALN.PRECISE.md)** — the natural\n  logarithm of Γ, restricted to positive arguments. They exist because Γ overflows and lnΓ does\n  not, and they are the right tool for every ratio-of-gammas computation. Note a structural\n  fact recorded in the evidence: the log-gamma kernel identified and landed upstream is wired\n  **only** to those two surfaces, and deliberately does not change `GAMMA`. The three surfaces\n  share a module and do not share their numeric path.\n- **`FACT`** — the factorial for non-negative integers. `GAMMA(n+1)` and `FACT(n)` are the same\n  number mathematically; whether they are the same computation, and agree in the last bit, is\n  unestablished. `FACT` has an exact small-table implementation available to it that `GAMMA`\n  does not.\n- **`FACTDOUBLE`, `COMBIN`, `PERMUT`, `MULTINOMIAL`** — combinatorial functions expressible\n  through Γ, and generally better computed without it.\n- **`BETA.DIST` / `GAMMALN`** — the beta function B(a,b) = Γ(a)Γ(b)/Γ(a+b) is the standard\n  reason people reach for `GAMMA` and the standard place they should have reached for\n  `GAMMALN` instead, because each factor can overflow while the ratio is small.\n- **Module siblings**: `ERF`, `ERF.PRECISE`, `ERFC`, `ERFC.PRECISE`, `WEIBULL`, `WEIBULL.DIST`\n  share the implementing module. Module sharing is an implementation fact and implies nothing\n  semantic — and here it comes with an explicit statement that the kernels differ.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\n**The two classical designs.** Serious implementations of Γ come in two families. *Lanczos*\n(1964) approximates Γ(z + 1) by a shifted product of a power, an exponential, and a short\nrational series in z, with coefficients tuned to a chosen shift; it is elegant, uniform, and\neasy to get to roughly working precision. *Cody-style minimax rationals* — the SPECFUN/Algorithm\n715 lineage, and what fdlibm and most libm implementations descend from — reduce the argument\nonto a small interval by the recurrence and evaluate a minimax rational there, with separate\nhandling for the large-argument Stirling regime. The minimax approach generally wins on\nlast-bit accuracy; Lanczos wins on brevity. Boost.Math documents a Lanczos with extended\ncoefficients as a way to close much of the gap.\n\nA careful implementation therefore does **not** route through the logarithm for moderate\narguments. It uses the recurrence to move x into a small interval around the minimum, evaluates\na minimax rational there, and multiplies the recurrence factors back — all in the value domain,\nwhere no exponential amplification occurs — reserving Stirling for large x.\n\n**Reflection is the second hazard.** For x < ½ the standard route is\n\n    Γ(x)  =  π / ( sin(π x) · Γ(1 − x) )\n\nand it has three separate problems. First, sin(πx) must be evaluated with the argument reduced\nexactly, or the answer near a large-magnitude pole is dominated by the reduction error rather\nthan by anything about Γ. Second, near a pole sin(πx) is tiny and the quotient is\nill-conditioned in exactly the way a simple pole demands: the condition number is unbounded, so\nthere is a genuine limit to achievable accuracy there, not merely an implementation weakness.\nThird, the sign must be recovered separately from the magnitude, since the usual formulation\ncomputes |Γ| through logs and then reattaches the sign of sin(πx) — which is what the reference\nengine does.\n\n**The floating-point domain is small.** Roughly (−∞, 171.6] minus the poles, with the useful\npositive range ending abruptly. Most computations that reach for Γ (binomial coefficients, beta\nfunctions, distribution normalising constants) are ratios whose *value* is modest even when the\nfactors are not; those computations belong in log space from the start.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns `Number`.\n\n- **Negative non-integers** are in the domain and the values alternate in sign. Reaching them\n  requires the reflection formula, and reflection is where accuracy goes to die; see\n  **Numerical notes**.\n- **Very small positive x** has Γ(x) ≈ 1/x − γ + …, so the function diverges like a reciprocal.\n  For x below about 10⁻³⁰⁸ the reciprocal itself overflows, which is why an argument at the\n  bottom of the double range produces an overflow rather than a huge finite number.\n- **Array arguments** are lifted elementwise by the module's broadcast helper.\n\n\n\n### Errors\n\nWhether Excel agrees with any row of that table is unverified here.\n\n\n",
    "sources": "- Abramowitz & Stegun, *Handbook of Mathematical Functions*, chapter 6 (§6.1) — the integral\n  definition, recurrence, reflection, duplication, the location of the positive-axis minimum,\n  and Stirling's series.\n- C. Lanczos, \"A precision approximation of the gamma function\", *SIAM J. Numer. Anal.* B1\n  (1964); W. J. Cody, SPECFUN / ACM Algorithm 715; Boost.Math's Lanczos notes; fdlibm\n  `e_lgamma_r.c` — the implementation families discussed under **Numerical notes**.\n- Handbook evidence record `EV-MATH-0015` — the open-discrepancy status, the live sweep, and the\n  statement that the landed log-gamma kernel is not wired to this surface.\n- Handbook, [Coercion and lifting](../model/02-coercion-and-lifting.md).\n- Handbook projections `data/functions/FUNC.GAMMA.json` and `data/presence/FUNC.GAMMA.json`\n  (the `special_dist_family` module, shared with the ERF/ERFC, GAMMALN and WEIBULL surfaces).\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| 19929 | Windows, bitness not recorded, CPU not recorded | 44 |\n| 20131 | Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics | 12,312 |\n\n- XC-GAMMA-001: build 19929 versus build 20131; 1 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.\n\nAgreement on these compared inputs does not establish agreement on unmeasured inputs.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.GAMMA.json).",
    "what-it-does": "\n`GAMMA(x)` returns Euler's gamma function, the analytic continuation of the factorial.\n\nFor Re z > 0 it is the Euler integral of the second kind:\n\n    Γ(z)  =  ∫₀^∞  t^{z−1} e^{−t}  dt\n\nand everywhere else it is defined by analytic continuation through the functional equation.\n\n**The identities that matter for a spreadsheet.**\n\n    Γ(z + 1)  =  z · Γ(z)                     (recurrence — the whole function in one line)\n    Γ(n)      =  (n − 1)!                     for positive integers n\n    Γ(z)·Γ(1 − z)  =  π / sin(π z)            (reflection — how negatives are reached)\n    Γ(½)      =  √π\n    Γ(2z)     =  2^{2z−1} π^{−½} Γ(z) Γ(z + ½)   (Legendre duplication)\n\n**Domain and range on the real line.** Γ is defined for every real x except x = 0 and the\nnegative integers, where it has **simple poles**. Between consecutive poles on the negative axis\nthe function alternates sign: Γ is negative on (−1, 0), positive on (−2, −1), negative on\n(−3, −2), and so on, with |Γ| → ∞ at each pole while the local extrema between poles shrink\ntoward zero as x → −∞.\nOn the positive axis Γ is smooth, strictly positive, and **not monotone**: it falls\nfrom +∞ at 0⁺ to a single minimum near x ≈ 1.4616 (value ≈ 0.8856) and then rises without\nbound. The two exact fixed points Γ(1) = Γ(2) = 1 straddle that minimum.\n\n**Growth.** Stirling's series gives ln Γ(x) ~ (x − ½)ln x − x + ½ln(2π) + 1/(12x) − …, so Γ\ngrows faster than any exponential. In double precision Γ(x) overflows a little above x ≈ 171.6;\npast that the true value exists and is not representable. That single fact — that the *useful\ndomain* of `GAMMA` in binary64 is roughly (−∞, 171.6] minus the poles — is why `GAMMALN` exists\nas a separate function and why almost all serious use goes through the logarithm instead.\n\n**No branch cuts on the real line.** Γ is real-analytic on each interval between poles; the\nbranch-cut question belongs to the complex function, which Excel does not expose.\n\n\n\n### Arguments\n\n\n| Argument | Meaning | Default |\n|---|---|---|\n| `Number` | The value at which to evaluate Γ. Required. Documented only as \"the value for which you want to calculate gamma\". | — |\n\n"
  },
  "signature": {
    "display": "GAMMA(number)",
    "parameters": [
      {
        "description": null,
        "name": "number",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 1,
        "min": 1
      },
      "category": "Statistical functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Gamma function",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the Gamma function value",
        "microsoft_url": "https://support.microsoft.com/en-us/office/gamma-function-ce1702b1-cf55-471d-8307-f83be0fc5297"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "GAMMA"
        },
        {
          "locale": "bg-BG",
          "name": "GAMMA"
        },
        {
          "locale": "cs-CZ",
          "name": "GAMMA"
        },
        {
          "locale": "da-DK",
          "name": "GAMMA"
        },
        {
          "locale": "de-DE",
          "name": "GAMMA"
        },
        {
          "locale": "el-GR",
          "name": "GAMMA"
        },
        {
          "locale": "en-AU",
          "name": "GAMMA"
        },
        {
          "locale": "en-GB",
          "name": "GAMMA"
        },
        {
          "locale": "en-US",
          "name": "GAMMA"
        },
        {
          "locale": "es-ES",
          "name": "GAMMA"
        },
        {
          "locale": "et-EE",
          "name": "GAMMA"
        },
        {
          "locale": "fi-FI",
          "name": "GAMMA"
        },
        {
          "locale": "fr-FR",
          "name": "GAMMA*"
        },
        {
          "locale": "he-IL",
          "name": "GAMMA"
        },
        {
          "locale": "hr-HR",
          "name": "GAMMA"
        },
        {
          "locale": "hu-HU",
          "name": "GAMMA"
        },
        {
          "locale": "id-ID",
          "name": "GAMMA"
        },
        {
          "locale": "it-IT",
          "name": "GAMMA"
        },
        {
          "locale": "ja-JP",
          "name": "GAMMA"
        },
        {
          "locale": "ko-KR",
          "name": "GAMMA"
        },
        {
          "locale": "lt-LT",
          "name": "GAMMA"
        },
        {
          "locale": "lv-LV",
          "name": "GAMMA"
        },
        {
          "locale": "nb-NO",
          "name": "GAMMA"
        },
        {
          "locale": "nl-NL",
          "name": "GAMMA"
        },
        {
          "locale": "pl-PL",
          "name": "GAMMA"
        },
        {
          "locale": "pt-BR",
          "name": "GAMMA"
        },
        {
          "locale": "pt-PT",
          "name": "GAMA"
        },
        {
          "locale": "ro-RO",
          "name": "GAMMA"
        },
        {
          "locale": "ru-RU",
          "name": "ГАММА"
        },
        {
          "locale": "sk-SK",
          "name": "GAMMA"
        },
        {
          "locale": "sl-SI",
          "name": "GAMMA"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "GAMMA"
        },
        {
          "locale": "sv-SE",
          "name": "GAMMA"
        },
        {
          "locale": "th-TH",
          "name": "GAMMA"
        },
        {
          "locale": "tr-TR",
          "name": "GAMA"
        },
        {
          "locale": "uk-UA",
          "name": "GAMMA"
        },
        {
          "locale": "vi-VN",
          "name": "GAMMA"
        },
        {
          "locale": "zh-CN",
          "name": "GAMMA"
        },
        {
          "locale": "zh-HK",
          "name": "GAMMA"
        },
        {
          "locale": "zh-TW",
          "name": "GAMMA"
        }
      ],
      "signature": {
        "display": "GAMMA(number)",
        "parameters": [
          {
            "description": null,
            "name": "number",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "GAMMA",
      "version_marker": null,
      "xlcall": {
        "code": "575",
        "symbol": "xlfGamma"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/gamma-function-ce1702b1-cf55-471d-8307-f83be0fc5297"
  },
  "try_it": {
    "formula": "=GAMMA(1.6493607064491727)"
  },
  "url": "https://handbook.dnacalc.com/functions/GAMMA.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "GAMMA(1.6493607064491727) returned 0.900020234972592 (0x3fecccf73c5e41af). GAMMA(3.6493607064491727) returned 3.9328647235856704 (0x400f7681c7bb23e9). 3 further recorded controls are attached. Inputs were supplied through cells using Value2. These are controls from this environment, not a same-input comparison with another build.",
      "excel_build": "16.0 build 20527",
      "observations": [
        {
          "call": "GAMMA(1.6493607064491727)",
          "excel": {
            "bits": "0x3fecccf73c5e41af",
            "display": "0.900020234972592",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number",
              "value": {
                "bits": "0x3ffa63c80d581b40",
                "display": "1.6493607064491727",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading"
        },
        {
          "call": "GAMMA(3.6493607064491727)",
          "excel": {
            "bits": "0x400f7681c7bb23e9",
            "display": "3.9328647235856704",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number",
              "value": {
                "bits": "0x400d31e406ac0da0",
                "display": "3.6493607064491727",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading"
        },
        {
          "call": "GAMMA(5.649360706449173)",
          "excel": {
            "bits": "0x4050aeb312f3b057",
            "display": "66.72967981145608",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number",
              "value": {
                "bits": "0x401698f2035606d0",
                "display": "5.649360706449173",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading"
        },
        {
          "call": "GAMMA(10.649360706449173)",
          "excel": {
            "bits": "0x41386b3cabbb5088",
            "display": "1600316.6708269436",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number",
              "value": {
                "bits": "0x40254c7901ab0368",
                "display": "10.649360706449173",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading"
        },
        {
          "call": "GAMMA(160.48267465838674)",
          "excel": {
            "bits": "0x7acd5c4d6f1f4edc",
            "display": "3.410909690032054e+283",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number",
              "value": {
                "bits": "0x40640f7212200c21",
                "display": "160.48267465838674",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading"
        }
      ],
      "platform": "Windows; bitness and CPU not recorded in this reading",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/3345a87/content/notes/FN-GAMMA-001.json",
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/3345a87/content/notes/FN-GAMMA-002.json"
      ]
    },
    {
      "behaviour": "44 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 19929",
      "platform": "Windows, bitness not recorded, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.GAMMA.json"
      ]
    },
    {
      "behaviour": "12,312 captured inputs are indexed for this environment. Capture dates: 2026-07-11 to 2026-07-17. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20131",
      "platform": "Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.GAMMA.json"
      ]
    }
  ]
}