{
  "category": "Statistical functions",
  "display_name": "LOGNORM.DIST",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.LOGNORM.DIST",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20131",
        "20430",
        "?"
      ],
      "larger_numeric": 559,
      "last_bit": 3331,
      "matched": 3919,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 7809,
      "unread": 0,
      "worst_ulp": 2216
    },
    "detail": "Of 7,815 recorded answers (7,809 in the answer bank and 6 workbook cells), 3,891 do not match: 559 differ by more than 16 ULP, 3,332 differ by at most 16 ULP.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "differs",
    "state_label": "Known larger differences",
    "summary": "Known larger differences on 3,891 of 7,815 recorded answers",
    "workbook_corpus": {
      "cells": 6,
      "last_bit": 1,
      "matched": 5,
      "worst_ulp": 1
    }
  },
  "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#L81-L84"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/distributions::nums",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_x87_add",
        "ported/excel_numeric::excel_x87_sub",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric::excel_x87_div",
        "ported/excel_numeric/x87::mul",
        "ported/excel_numeric/x87::add",
        "ported/excel_numeric/x87::sub",
        "ported/excel_numeric/x87::div",
        "ported/normal_dist_common::phi_kernel",
        "ported/normal_dist_common::stored_horner",
        "ported/normal_dist_common::erf_approx",
        "ported/normal_dist_common::erfc_upper",
        "ported/normal_log_family::flush_subnormal",
        "ported/normal_log_family::identified_std_normal_cdf",
        "ported/normal_log_family::norm_cdf",
        "ported/normal_log_family::validate_positive_sigma",
        "ported/normal_log_family::lognorm_dist_kernel",
        "ported/special_dist_family::erfc_kernel",
        "ported/special_dist_family::erfc_precise_kernel"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/distributions.rs#L81-L84",
      "state": "differs",
      "suite": null,
      "summary": "Known larger differences on 3,891 of 7,815 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.LOGNORM.DIST.json",
  "name": "LOGNORM.DIST",
  "notes": [],
  "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- **`LOGNORMDIST`** — the legacy three-argument, cumulative-only\n  spelling, retained in the Compatibility category. The documented relationship is\n  `LOGNORMDIST(x, μ, σ) = LOGNORM.DIST(x, μ, σ, TRUE)`. **That is an equality of documented\n  meaning, not a demonstrated equality of computation.** Two surfaces that document the same\n  value may be reached by different code with different rounding; proving they return the same\n  bits requires evidence, and the Handbook has none. Both of the evidence records attached to\n  this page treat `LOGNORM.DIST` and `LOGNORMDIST` as an unresolved pair for exactly this\n  reason — one of them notes that the upstream sentence carrying the only relevant figure does\n  not say which of the two spellings was probed.\n- **[LOGNORM.INV](FUNC.LOGNORM.INV.md)** — the quantile function, and the exact inverse in the\n  mathematical sense: `LOGNORM.INV(LOGNORM.DIST(x, μ, σ, TRUE), μ, σ) = x`. The round trip is\n  the natural metamorphic probe for both surfaces.\n- **[WEIBULL.DIST](FUNC.WEIBULL.DIST.md)**, **[GAMMA.DIST](FUNC.GAMMA.DIST.md)** — the other\n  right-skewed positive-support distributions readers choose between. The lognormal is the\n  one with the multiplicative central-limit justification: a product of many independent\n  positive factors tends to lognormal, as a sum tends to normal.\n- **Confused with:** the normal distribution of the data itself, and — persistently — with the\n  meaning of the `mean` argument. See above.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\n`LOGNORM.DIST` performs almost no arithmetic of its own. Its accuracy is the accuracy of two\nimported primitives, and the interesting engineering is entirely in how they are used.\n\n**The composition.** The cumulative form is `Φ(z)` with `z = (ln x − μ)/σ`. Error enters at\nthree points:\n\n1. **`ln x`** — a correctly rounded logarithm gives `z` a relative error of about one ulp in\n   the logarithm, which becomes an *absolute* error in `z` of about `|ln x|·ε/σ`. For large\n   `x` and small `σ` this is amplification: `x = 10¹⁰⁰` gives `ln x ≈ 230`, so an ulp of the\n   logarithm is around `3·10⁻¹⁴`, divided by `σ`.\n2. **The subtraction `ln x − μ`** — cancellation when `ln x ≈ μ`, i.e. near the median. The\n   relative error of `z` there is unbounded, though the *absolute* error stays small, and\n   since `Φ` is Lipschitz with constant `1/√(2π)` near zero the CDF value is still accurate in\n   absolute terms. This is the usual and acceptable trade.\n3. **`Φ(z)`** — the normal CDF, whose own accuracy is the subject of a long literature.\n\n**The upper-tail problem.** `Φ(z) → 1` and there is no way back. In double precision\n`Φ(z) = 1.0` exactly for `z ≳ 8.3`, and long before that the returned value has no significant\ndigits *in `1 − Φ(z)`*. Any calculation that needs a small exceedance probability —\nvalue-at-risk, reliability, tail pricing — must not compute `1 − LOGNORM.DIST(...)`. The\nmathematically correct route uses the complement directly, `1 − Φ(z) = Φ(−z) = ½·erfc(z/√2)`,\nwhich is accurate to full relative precision for `z` out to about 37 before `erfc` itself\nunderflows. Excel exposes no complementary lognormal CDF, so the workaround inside the\nworksheet is `LOGNORM.DIST(1/x, −μ, σ, TRUE)`, using the reflection identity: if `X` is\nlognormal `(μ, σ)` then `1/X` is lognormal `(−μ, σ)`. That identity is exact and gives back\nthe upper tail as a lower tail. It is the single most useful practical fact on this page.\n\n**The reference literature.** For `Φ` and `erfc`: Abramowitz and Stegun chapter 26, whose\nformulas 26.2.16 to 26.2.19 are the classical series and continued-fraction expansions and\nwhose 26.2.17 rational approximation is the one embedded in an enormous amount of legacy code\nat about seven decimal digits; Cody's rational Chebyshev approximations for `erf`/`erfc`\n(*Rational Chebyshev approximation for the error function*, Math. Comp. 1969) and his ALGORITHM\n715 / SPECFUN implementations, which are the accuracy standard; Hart et al., *Computer\nApproximations*; and the treatments in Boost.Math and Cephes. For `ln`: fdlibm's\n`__ieee754_log` and its glibc and musl descendants; Muller, *Elementary Functions*, for the\nargument-reduction theory.\n\nThe published critique record on Excel's statistical distributions — McCullough and Wilson's\naccuracy papers, Knüsel's assessments of statistical distribution accuracy in spreadsheets, and\nMorten Welinder's work on Gnumeric's statistical functions — is the relevant background for\nthis family. The Handbook names it as literature and does not assert what Excel computes\ninternally.\n\n**A note on the density.** `f(x)` should be evaluated as `exp(−z²/2) / (x·σ·√(2π))`, not by\nexponentiating a difference of logarithms, and the `√(2π)` constant should be a correctly\nrounded literal rather than computed as `sqrt(2*PI())`. For very negative `−z²/2` the\nexponential underflows gradually; returning a subnormal is better than returning zero, and\nwhether that happens is observable.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns `Number`.\n\n- **`x → 0⁺`** — the CDF tends to zero and the density tends to zero as well, because\n  `exp(−(ln x)²/2σ²)` beats the `1/x` blow-up. The density therefore has a removable-looking\n  but genuinely zero limit at the origin, which is why the lognormal density is smooth at 0\n  even though the formula has a pole there.\n- **Very large `x`** — the CDF approaches 1 and, in double precision, *reaches* it: once\n  `(ln x − μ)/σ` exceeds roughly `8.3`, `Φ` rounds to exactly `1.0` and every distinction in\n  the upper tail is lost. See Numerical notes; this is a representational limit, not an\n  implementation defect, and it is the reason there is no way to compute a small upper-tail\n  probability from this function.\n- **Very small `x`** — the CDF underflows to zero once the standardised value falls below\n  roughly `−38`, and the density underflows sooner because of the extra factor.\n- **`σ` very small** — the distribution concentrates at `e^μ`; the density there behaves like\n  `1/(e^μ σ√(2π))` and overflows for `σ` small enough. A density that overflows to `#NUM!` on\n  a legitimate parameter is a real edge, and where the boundary falls is unverified.\n\n\n\n### Errors\n\n\n| Error | Condition | Basis |\n|---|---|---|\n| `#NUM!` | `x ≤ 0`, or `standard_dev ≤ 0` | Documented by Microsoft on the `LOGNORM.DIST` page |\n| `#VALUE!` | Any argument is non-numeric (or `cumulative` is not interpretable as a logical) | Documented; also the shared coercion rule |\n| propagated | An error value in any argument | Shared coercion rule, chapter 02 |\n\n",
    "sources": "- Abramowitz and Stegun, *Handbook of Mathematical Functions*, chapter 26 (normal distribution\n  and error function; 26.2.16–26.2.19 for the classical expansions, 26.2.17 for the rational\n  approximation embedded in much legacy code).\n- Cody, *Rational Chebyshev approximation for the error function*, Mathematics of Computation\n  23 (1969), and the SPECFUN/ALGORITHM 715 implementations — the accuracy standard for `erf`\n  and `erfc`.\n- Hart et al., *Computer Approximations*; the `ndtr`/`erfc` routines in Cephes; and\n  Boost.Math's normal distribution and error-function documentation.\n- fdlibm `__ieee754_log`, and Muller, *Elementary Functions: Algorithms and Implementation* —\n  the accuracy of the logarithm the composition depends on.\n- Knüsel, and McCullough and Wilson, on the accuracy of statistical distributions in\n  spreadsheets; and Morten Welinder's work on Gnumeric's statistical functions. Named as\n  published literature about the family, not as evidence about this surface.\n- Handbook [Coercion and lifting](../model/02-coercion-and-lifting.md).\n- Handbook projections `data/functions/FUNC.LOGNORM.DIST.json` (arity exactly 4,\n  `xlfLognorm_dist`) and `data/presence/FUNC.LOGNORM.DIST.json` (module `normal_log_family.rs`,\n  shared with the whole `NORM`/`LOGNORM`/`CONFIDENCE` group).\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| 20131 | Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics | 3,299 |\n| 20430 | Windows, 64-bit, AMD Ryzen 7 4800H with Radeon Graphics | 3,005 |\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.LOGNORM.DIST.json).",
    "what-it-does": "\n`LOGNORM.DIST(x, mean, standard_dev, cumulative)` evaluates the **lognormal** distribution.\n\nA positive random variable `X` is lognormal with parameters `μ` and `σ` when `ln X` is normal\nwith mean `μ` and standard deviation `σ`. The two functions follow by change of variable:\n\n**Density** (`cumulative = FALSE`):\n\n    f(x; μ, σ) = 1 / ( x·σ·√(2π) ) · exp( −(ln x − μ)² / (2σ²) ),    x > 0\n\n**Distribution function** (`cumulative = TRUE`):\n\n    F(x; μ, σ) = Φ( (ln x − μ) / σ ),    x > 0\n\nwhere `Φ` is the standard normal CDF. That second identity is the entire mathematical content\nof the function: **the lognormal CDF is the normal CDF of the standardised logarithm.** The\n`1/x` factor in the density is the Jacobian of the substitution `u = ln x`, and it is the only\nplace the two forms differ structurally.\n\n**The parameters are those of `ln X`, not of `X`.** This is the single most common misreading\nof this function, and it is worth setting the record out explicitly:\n\n| Quantity of `X` | Expression |\n|---|---|\n| median | `e^μ` |\n| mean | `exp(μ + σ²/2)` |\n| mode | `exp(μ − σ²)` |\n| variance | `(e^{σ²} − 1)·e^{2μ + σ²}` |\n\nSo `mean = 0, standard_dev = 1` describes a distribution whose median is 1 and whose mean is\n`√e ≈ 1.6487`. Passing the sample mean and standard deviation of the *data* into this function\ngives an answer to a different question. The correct parameter estimates are the mean and\nstandard deviation of the logged data.\n\n**Domain.** `x > 0`, `σ > 0`, `μ` any real. **Range:** the density is positive and unbounded\nabove as `σ → 0`; the CDF is confined to `(0, 1)`, is strictly increasing on `(0, ∞)`, and\nsatisfies `F(0⁺) = 0`, `F(∞) = 1`. The distribution is right-skewed for every `σ > 0`, with\nskewness `(e^{σ²} + 2)·√(e^{σ²} − 1)`, and all its moments are finite even though its\nmoment-generating function does not exist — a standard textbook curiosity, and the reason the\nlognormal is not determined by its moments.\n\n**The two forms are related by differentiation**, `f = F′`, and a correct implementation\nshould satisfy that relation numerically to within the accuracy of `Φ` and `ln`; it is a\nusable self-check.\n\n\n\n### Arguments\n\n\n| Argument | Meaning | Admissible values |\n|---|---|---|\n| `x` | The value at which the distribution is evaluated | `x > 0`; required |\n| `mean` | `μ`, the mean of `ln X` | Any finite real; required |\n| `standard_dev` | `σ`, the standard deviation of `ln X` | `σ > 0`; required |\n| `cumulative` | `TRUE` for the CDF, `FALSE` for the density | Logical; **required** |\n\nAll four are scalar slots governed by ordinary to-number and to-logical coercion — see\n[Coercion and lifting](../model/02-coercion-and-lifting.md).\n\n\n"
  },
  "signature": {
    "display": "LOGNORM.DIST(x, mean, standard_dev, cumulative)",
    "parameters": [
      {
        "description": null,
        "name": "x",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "mean",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "standard_dev",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "cumulative",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 4,
        "min": 4
      },
      "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": "Lognormal distribution: the density or the cumulative probability",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the cumulative lognormal distribution",
        "microsoft_url": "https://support.microsoft.com/en-us/office/lognorm-dist-function-eb60d00b-48a9-4217-be2b-6074aee6b070"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "bg-BG",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "cs-CZ",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "da-DK",
          "name": "LOGNORM.FORDELING"
        },
        {
          "locale": "de-DE",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "el-GR",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "en-AU",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "en-GB",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "en-US",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "es-ES",
          "name": "DISTR.LOGNORM"
        },
        {
          "locale": "et-EE",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "fi-FI",
          "name": "LOGNORM_JAKAUMA"
        },
        {
          "locale": "fr-FR",
          "name": "LOI.LOGNORMALE.N*"
        },
        {
          "locale": "he-IL",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "hr-HR",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "hu-HU",
          "name": "LOGNORM.ELOSZLÁS"
        },
        {
          "locale": "id-ID",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "it-IT",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "ja-JP",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "ko-KR",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "lt-LT",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "lv-LV",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "nb-NO",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "nl-NL",
          "name": "LOGNORM.VERD"
        },
        {
          "locale": "pl-PL",
          "name": "ROZKŁ.LOG"
        },
        {
          "locale": "pt-BR",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "pt-PT",
          "name": "DIST.NORMLOG"
        },
        {
          "locale": "ro-RO",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "ru-RU",
          "name": "ЛОГНОРМ.РАСП"
        },
        {
          "locale": "sk-SK",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "sl-SI",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "sv-SE",
          "name": "LOGNORM.FÖRD"
        },
        {
          "locale": "th-TH",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "tr-TR",
          "name": "LOGNORM.DAĞ"
        },
        {
          "locale": "uk-UA",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "vi-VN",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "zh-CN",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "zh-HK",
          "name": "LOGNORM.DIST"
        },
        {
          "locale": "zh-TW",
          "name": "LOGNORM.DIST"
        }
      ],
      "signature": {
        "display": "LOGNORM.DIST(x, mean, standard_dev, cumulative)",
        "parameters": [
          {
            "description": null,
            "name": "x",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "mean",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "standard_dev",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "cumulative",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "LOGNORM.DIST",
      "version_marker": null,
      "xlcall": {
        "code": "536",
        "symbol": "xlfLognorm_dist"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/lognorm-dist-function-eb60d00b-48a9-4217-be2b-6074aee6b070"
  },
  "try_it": {
    "formula": "=LOGNORM.DIST(2,0,1,TRUE)"
  },
  "url": "https://handbook.dnacalc.com/functions/LOGNORM.DIST.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "3,299 captured inputs are indexed for this environment. Capture dates: 2026-07-17 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.LOGNORM.DIST.json"
      ]
    },
    {
      "behaviour": "3,005 captured inputs are indexed for this environment. Capture dates: 2026-09-24 to 2026-09-25. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20430",
      "platform": "Windows, 64-bit, AMD Ryzen 7 4800H with Radeon Graphics",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.LOGNORM.DIST.json"
      ]
    }
  ]
}