{
  "category": "Statistical functions",
  "display_name": "WEIBULL.DIST",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.WEIBULL.DIST",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20131",
        "?"
      ],
      "larger_numeric": 0,
      "last_bit": 2,
      "matched": 31481,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 31483,
      "unread": 0,
      "worst_ulp": 2
    },
    "detail": "Everything else matches (31,483 in the answer bank and 6 workbook cells). Last-bit means a finite number within 16 ULP of Excel's.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "close",
    "state_label": "Close: last-bit deviations remain",
    "summary": "Close: 2 of 31,489 recorded answers differ in the last bits, worst 2 ULP",
    "workbook_corpus": {
      "cells": 6,
      "matched": 6
    }
  },
  "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#L244-L247"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/distributions::nums",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_expm1_internal",
        "ported/excel_numeric::expm1_internal_graph",
        "ported/excel_numeric::excel_pow_chain",
        "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::sub",
        "ported/excel_numeric/x87::div",
        "ported/excel_numeric/x87_chains::pow2_positive",
        "ported/excel_numeric/x87_chains::pow2",
        "ported/excel_numeric/x87_chains::exp_ext",
        "ported/excel_numeric/x87_chains::exp_with",
        "ported/excel_numeric/x87_chains::excel_exp",
        "ported/excel_numeric/x87_chains::log_with",
        "ported/excel_numeric/x87_chains::excel_log",
        "ported/special_dist_family::weibull_dist_kernel"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/distributions.rs#L244-L247",
      "state": "close",
      "suite": null,
      "summary": "Close: 2 of 31,489 recorded answers differ in the last bits, worst 2 ULP"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.WEIBULL.DIST.json",
  "name": "WEIBULL.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- **`WEIBULL`** is the legacy compatibility spelling, documented to compute the same thing.\n  Whether it computes it the *same way* is a separate question, and the Handbook holds an\n  evidence record on exactly that point: `EV-DIST-0033` records that the sign-off measurement in\n  this cluster was made on the **modern** surface and on the modern kernel by name, and that\n  nothing measures the legacy spelling separately. The record's reader warning is explicit that\n  the modern figure may not be inherited onto `WEIBULL`. The contrast the record draws is the\n  useful part: the gamma-side legacy/modern collapse *was* measured, and this pair is not among\n  the pairs it covers.\n- **`EXPON.DIST`** is the α = 1 special case, and the two surfaces overlap exactly there.\n  `WEIBULL.DIST(x, 1, β, TRUE)` and `EXPON.DIST(x, 1/β, TRUE)` are the same number — note the\n  reciprocal, since `EXPON.DIST` is parameterized by rate λ and `WEIBULL.DIST` by scale β. That\n  reciprocal is a standing trap in both directions.\n- **There is no `WEIBULL.INV`.** The quantile has an elementary closed form,\n  `beta * (-LN(1-p))^(1/alpha)`, and a caller who needs it writes it out. That expression forms\n  `1 − p`, so it loses precision for `p` near 1; `beta * (-LN(q))^(1/alpha)` with `q = 1 − p`\n  supplied directly is the accurate form when the caller has `q`.\n- **`GAMMA.DIST`** is the other main lifetime distribution and the usual alternative; the two\n  agree only at α = 1, where both reduce to the exponential.\n- **`NORM.DIST`** relates through the log: `ln X` for Weibull `X` is a Gumbel (smallest-extreme)\n  variate, not a normal one — which is the technical reason Weibull probability paper is not\n  lognormal probability paper.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\n**The cancellation is the whole story for the CDF.** `1 − exp(−t)` for small `t` is the textbook\ncatastrophic-cancellation example: the true value is `t − t²/2 + …`, and the computed value has\nabsorbed the entire result into the rounding of `exp(−t)` against 1. Below `t ≈ 2⁻⁵³` the naive\nform returns exactly zero for a quantity that is perfectly representable. The remedy is\n`−expm1(−t)`, which is exactly what `expm1` was standardized for, and it costs nothing. Any\nimplementation of a Weibull CDF that does not use `expm1` (or an equivalent series for small `t`)\nis wrong in a region real reliability data occupies — early-life failure probabilities are small\nby construction.\n\n**Forming `t = (x/β)^α` is the second problem.** Three separate hazards:\n\n1. *Overflow and underflow of the power.* For large α, a modest `x/β` produces an enormous or\n   vanishing `t`. Evaluating as `exp(α · ln(x/β))` moves the problem into the exponent, where it\n   is at least detectable, but introduces its own rounding: an error of ε in `ln(x/β)` becomes an\n   error of `α·ε` in the exponent, so accuracy degrades linearly in α.\n2. *`x/β` near 1.* This is where `ln(x/β)` suffers cancellation of its own; `log1p((x − β)/β)` is\n   the accurate form, and it matters because `x ≈ β` is the characteristic-life region where\n   engineers actually read the curve.\n3. *The division itself.* `x/β` rounds once before the power is taken, and that single rounding\n   is then amplified by α. Whether the division is performed first or folded into the exponential\n   is a visible implementation decision, not an invisible one.\n\n**The density adds a third factor.** `x^(α−1)` must not be computed as `pow(x, α−1)` when α is\nnear 1 and `x` is far from 1, and the leading `α/β^α` overflows for large α and small β even when\nthe product is well scaled; grouping as `(α/β)·(x/β)^(α−1)` keeps every intermediate in range and\nis the form the hazard-rate reading suggests anyway.\n\nThe relevant lesson for an implementer is the one the substrate makes concrete: on this surface\nthe *association order and the rounding of each intermediate* are load-bearing, not just the\nmathematical formula. Two implementations of `1 − exp(−(x/β)^α)` that agree on paper can differ\nin the last bits purely through where the compiler spilled a double.\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns `Number`: a probability in `[0, 1)` for the cumulative form, a density in `[0, ∞)` for\nthe density form.\n\n- **`x = 0`, cumulative** is exactly 0, for every α and β.\n- **`x = 0`, density** is where the three shape regimes visibly separate: the value is 0 for\n  α > 1, exactly `1/β` for α = 1, and mathematically infinite for α < 1. The documentation says\n  nothing about this. Excel has no infinity in its value model\n  ([The value universe](../model/01-value-universe.md)), so the α < 1 corner must resolve to a\n  finite number, `#NUM!`, or `#DIV/0!` — and which one is unknown. It is the first probe below.\n- **`x = β`, cumulative** is `1 − 1/e` for every α — an exact, shape-independent value, and\n  therefore a free correctness probe on any implementation.\n- **Small `(x/β)^α`.** `F` behaves like `(x/β)^α` itself. Computed as a literal\n  `1 − exp(−t)` in double precision, everything below `t ≈ 2⁻⁵³` is lost to zero. Computed as\n  `−expm1(−t)` it survives to the underflow floor. This is the defining accuracy question for\n  the surface, and it is discussed under Numerical notes.\n- **Large `(x/β)^α`.** `F` saturates at 1 and the density underflows to 0. The saturation point\n  moves with α, so a large α turns a modest `x/β` into an overflowed exponent.\n- **`cumulative` coercion.** The flag is a logical slot; how a number, text or blank in that\n  position is interpreted follows the shared call model, and the Handbook has not checked it for\n  this surface.\n\n\n\n### Errors\n\n\nAs documented on Microsoft's `WEIBULL.DIST` page:\n\n| Error | Documented condition |\n|---|---|\n| `#VALUE!` | `x`, `alpha`, or `beta` is nonnumeric. |\n| `#NUM!` | `x < 0`. |\n| `#NUM!` | `alpha ≤ 0`. |\n| `#NUM!` | `beta ≤ 0`. |\n\nNote what is *not* covered: nothing is said about a nonnumeric `cumulative`, and nothing is said\nabout the `x = 0`, `α < 1` density singularity. Errors in any argument propagate under the\nuniversal coercion rule.\n\n",
    "sources": "\n- Microsoft, \"WEIBULL.DIST function\" —\n  <https://support.microsoft.com/en-us/office/weibull-dist-function-4e783c39-9325-49be-bbc9-a83ef82b45db>\n  (syntax, the four required arguments, the cumulative and density equations, the statement that\n  `alpha = 1` returns the exponential distribution, and the `#VALUE!` and three `#NUM!`\n  conditions). Retrieved for this page.\n- Handbook evidence record `EV-DIST-0031` — substrate identification for this surface plus a\n  fresh held-out gate against a live Excel oracle on the production kernel, with its own stated\n  build ambiguity and residual class.\n- Handbook evidence record `EV-DIST-0033` — the alias-pairing record establishing that the\n  legacy `WEIBULL` spelling carries no measurement of its own and may not inherit this surface's\n  figure.\n- M. Abramowitz and I. A. Stegun, *Handbook of Mathematical Functions*, chapter 26 (probability\n  functions) for the surrounding distribution material; the Weibull's extreme-value character is\n  the type III minimum law of the classical extreme-value theory in that literature.\n- IEEE 754 and the C standard `expm1` / `log1p` rationale — the two primitives this surface's\n  accuracy rests on; fdlibm is the readable reference implementation of both.\n- Handbook [The value universe](../model/01-value-universe.md) (no infinity kind, which is what\n  makes the density pole a decision) and\n  [Coercion and lifting](../model/02-coercion-and-lifting.md).\n- Handbook projections `data/functions/FUNC.WEIBULL.DIST.json`,\n  `data/presence/FUNC.WEIBULL.DIST.json` (the shared `special_dist_family` module) and\n  `data/battery/FUNC.WEIBULL.DIST.json`.\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 | 31,483 |\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.WEIBULL.DIST.json).",
    "what-it-does": "\n`WEIBULL.DIST(x, alpha, beta, cumulative)` evaluates the two-parameter Weibull distribution with\nshape α and scale β — the cumulative distribution function when `cumulative` is TRUE, the\nprobability density when it is FALSE.\n\nMicrosoft states both forms on the function's page. Writing them out:\n\n    F(x; α, β) = 1 − exp( −(x/β)^α )                            cumulative\n    f(x; α, β) = (α / β^α) · x^(α−1) · exp( −(x/β)^α )          density\n\nfor `x ≥ 0`, `α > 0`, `β > 0`. `F` rises strictly from 0 at `x = 0` to 1 as `x → ∞`; `f` is\nnon-negative and integrates to 1 over `[0, ∞)`.\n\nThe single structural fact that organizes everything else is the **hazard rate**:\n\n    h(x) = f(x) / (1 − F(x)) = (α/β) · (x/β)^(α−1)\n\na pure power of `x`. That is what the Weibull *is*: the distribution whose instantaneous failure\nrate is a power law. The shape parameter chooses which regime:\n\n| α | Hazard | Interpretation |\n|---|---|---|\n| α < 1 | decreasing | Infant mortality — early failures dominate |\n| α = 1 | constant | Memoryless; the **exponential** distribution with mean β |\n| α = 2 | linearly increasing | The **Rayleigh** distribution, with `σ = β/sqrt 2` |\n| α > 1 | increasing | Wear-out |\n\nMicrosoft documents the α = 1 case explicitly: `WEIBULL.DIST` returns the exponential\ndistribution there.\n\nOther facts worth having on the page:\n\n- **Moments.** `E[X^k] = β^k · Γ(1 + k/α)`, so the mean is `β·Γ(1 + 1/α)` and the variance is\n  `β²·[Γ(1 + 2/α) − Γ(1 + 1/α)²]`. Every moment exists for every α > 0 — the Weibull's tail is\n  stretched-exponential, not power-law, which is exactly the contrast with the t-distribution.\n- **Quantile.** `F` inverts in closed form: `x = β · (−ln(1 − p))^(1/α)`. This is elementary\n  and exactly computable, which matters below, because **Excel publishes no `WEIBULL.INV`\n  surface** — the inverse must be written out by the caller.\n- **Scale is a pure scaling.** `F(x; α, β) = F(x/β; α, 1)`, so β never affects shape. The whole\n  family is one function of the reduced variable `u = x/β`.\n- **Min-stability.** The minimum of independent Weibulls with common α is Weibull with the same\n  α; the Weibull is the type III extreme-value distribution for minima. That is why it dominates\n  reliability engineering: a system that fails when its weakest component fails inherits the\n  shape.\n\nThere are no poles in `F`. The density has one, at `x = 0` when `α < 1`, where\n`x^(α−1) → +∞`. That corner is the sharpest edge in the whole surface and is unaddressed by the\ndocumentation.\n\n\n\n### Arguments\n\n\n| Argument | Meaning | Required |\n|---|---|---|\n| `x` | \"The value at which to evaluate the function.\" Documented non-negative. | Yes |\n| `alpha` | \"A parameter to the distribution\" — the shape parameter. Documented positive. | Yes |\n| `beta` | \"A parameter to the distribution\" — the scale parameter. Documented positive. | Yes |\n| `cumulative` | \"Determines the form of the function.\" TRUE gives the CDF, FALSE the density. | Yes |\n\nNumeric slots take ordinary to-number coercion; see\n[Coercion and lifting](../model/02-coercion-and-lifting.md).\n\n\n"
  },
  "signature": {
    "display": "WEIBULL.DIST(x, alpha, beta, cumulative)",
    "parameters": [
      {
        "description": null,
        "name": "x",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "alpha",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "beta",
        "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": "Weibull distribution: the density or the cumulative probability",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the Weibull distribution",
        "microsoft_url": "https://support.microsoft.com/en-us/office/weibull-dist-function-4e783c39-9325-49be-bbc9-a83ef82b45db"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "bg-BG",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "cs-CZ",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "da-DK",
          "name": "WEIBULL.FORDELING"
        },
        {
          "locale": "de-DE",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "el-GR",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "en-AU",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "en-GB",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "en-US",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "es-ES",
          "name": "DISTR.WEIBULL"
        },
        {
          "locale": "et-EE",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "fi-FI",
          "name": "WEIBULL.JAKAUMA"
        },
        {
          "locale": "fr-FR",
          "name": "LOI.WEIBULL.N*"
        },
        {
          "locale": "he-IL",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "hr-HR",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "hu-HU",
          "name": "WEIBULL.ELOSZLÁS"
        },
        {
          "locale": "id-ID",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "it-IT",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "ja-JP",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "ko-KR",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "lt-LT",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "lv-LV",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "nb-NO",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "nl-NL",
          "name": "WEIBULL.VERD"
        },
        {
          "locale": "pl-PL",
          "name": "ROZKŁ.WEIBULL"
        },
        {
          "locale": "pt-BR",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "pt-PT",
          "name": "DIST.WEIBULL"
        },
        {
          "locale": "ro-RO",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "ru-RU",
          "name": "ВЕЙБУЛЛ.РАСП"
        },
        {
          "locale": "sk-SK",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "sl-SI",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "sv-SE",
          "name": "WEIBULL.FÖRD"
        },
        {
          "locale": "th-TH",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "tr-TR",
          "name": "WEIBULL.DAĞ"
        },
        {
          "locale": "uk-UA",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "vi-VN",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "zh-CN",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "zh-HK",
          "name": "WEIBULL.DIST"
        },
        {
          "locale": "zh-TW",
          "name": "WEIBULL.DIST"
        }
      ],
      "signature": {
        "display": "WEIBULL.DIST(x, alpha, beta, cumulative)",
        "parameters": [
          {
            "description": null,
            "name": "x",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "alpha",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "beta",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "cumulative",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "WEIBULL.DIST",
      "version_marker": null,
      "xlcall": {
        "code": "519",
        "symbol": "xlfWeibull_dist"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/weibull-dist-function-4e783c39-9325-49be-bbc9-a83ef82b45db"
  },
  "try_it": {
    "formula": "=WEIBULL.DIST(2,3,2,TRUE)"
  },
  "url": "https://handbook.dnacalc.com/functions/WEIBULL.DIST.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "31,483 captured inputs are indexed for this environment. Capture dates: 2026-07-17 to 2026-07-18. 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.WEIBULL.DIST.json"
      ]
    }
  ]
}