{
  "category": "Compatibility",
  "display_name": "WEIBULL",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.WEIBULL",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Recorded: 6 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 6 recorded answers",
    "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#L248-L251",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/special_dist_family.rs#L224-L231"
      ],
      "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#L248-L251",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 6 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.WEIBULL.json",
  "name": "WEIBULL",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[WEIBULL.DIST](FUNC.WEIBULL.DIST.md) is the modern spelling; [EXPON.DIST](FUNC.EXPON.DIST.md) is the shape-one special family; [GAMMA.DIST](FUNC.GAMMA.DIST.md) supplies another positive-valued distribution.\n\n\n",
    "how-to-implement": "\nFor positive inputs, define a raw power helper `P(a,b)=EXP(R(b*LN(a)))`, using the public stored LN and EXP leaves and the [stored operation R](../model/09-staged-arithmetic.md). The current route uses this chain even for integer exponents and square roots; a host `pow` shortcut changes the candidate.\n\n1. Validate finite inputs and the documented sign domain; handle the code’s zero-input branch separately.\n2. Store `r=R(x/beta)`, then obtain `t=P(r,alpha)`.\n3. For the CDF, compute `-expm1_internal(-t)`. Here the Kahan correction uses ordinary binary64 arithmetic: with `u=EXP(-t)`, return `t` if `u==1`; otherwise return `-(u-1)` for `t>=1`, or `-((u-1)*(-t)/LN(u))` for `t<1`.\n4. For density, obtain `B=P(beta,alpha)`, `X=P(x,alpha-1)` and `E=EXP(-t)`. Evaluate division first and multiply left to right: `R(R(R(alpha/B)*X)*E)`.\n5. The helper rejects a nonfinite result with `#NUM!`. Keep worksheet publication separate from the polynomial/power body.\n\nFor `x=4,alpha=2,beta=2`, the mathematical reduction has `r=2`, `t=4`, `alpha/beta^alpha=0.5`, and `x^(alpha-1)=4`; density is therefore `2*exp(-4)`. The raw power chain need not publish exact integer four at each intermediate stage, so the mathematical trace is not permission to remove those calls.\n\nThe cited source retains positive-input power-staging discriminants, including 113 controls separating the stored exponent product. Exact global branch boundaries and a whole-domain legacy-spelling result remain unestablished here. No Handbook suite is published for this function.\n\n\n",
    "quirks": "\nNegative `x` or a nonpositive shape or scale gives `#NUM!`; nonnumeric numeric arguments give `#VALUE!`. Densities and cumulative probabilities are different quantities, even when they happen to have similar decimal values.\n\nAt zero, the mathematical CDF is zero. The density’s right-hand limit is zero for `alpha>1`, `1/beta` for `alpha=1`, and unbounded for `0<alpha<1`. The current helper returns zero at `x=0` for both cumulative and density calls, for every admitted shape. For example, its `WEIBULL(0,1,2,FALSE)` result is zero rather than the mathematical one half. This is a code-level boundary behaviour, not a newly measured Excel answer; keep it separate from the positive-input reconstruction.\n\n\n",
    "sources": "\n- [Microsoft: WEIBULL function](https://support.microsoft.com/en-us/excel/functions/weibull-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/special_dist_family.rs); implementation steps and the limits identified in the text.\n- [Raw power and cancellation helpers](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/ported/excel_numeric/mod.rs), `excel_pow_chain` and `excel_expm1_internal`.\n\n",
    "try-it": "\n`=WEIBULL(4,2,2,TRUE)` is about `0.9816843611`: mathematically, `(4/2)^2=4` and the CDF is `1-exp(-4)`. Changing TRUE to FALSE gives a density of about `0.03663127777746836`.\n\nThe scale is not the exponential rate. In the shape-one case, a scale of two corresponds to rate one half, not rate two.\n\n\n",
    "version-differences": "\nNo same-input comparison between named Excel builds is recorded for this function here. The documented behaviour below is not a measurement of every Excel release.\n\n\n",
    "what-it-does": "\n`WEIBULL(x,alpha,beta,cumulative)` evaluates a Weibull distribution at nonnegative `x`. Alpha is the positive shape; beta is the positive scale in the same units as `x`. TRUE returns a cumulative probability and FALSE a density. This is the compatibility spelling of WEIBULL.DIST.\n\nWriting `t=(x/beta)^alpha`, the mathematical CDF is `1-exp(-t)`. In particular, at `x=beta` it is `1-exp(-1)` for every positive shape. Shape one gives the exponential family with rate `1/beta`.\n\n\n"
  },
  "signature": {
    "display": "WEIBULL(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": "Compatibility",
      "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 probability (older form of WEIBULL.DIST)",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the Weibull distribution",
        "microsoft_url": "https://support.microsoft.com/en-us/office/weibull-function-b83dc2c6-260b-4754-bef2-633196f6fdcc"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "WEIBULL"
        },
        {
          "locale": "bg-BG",
          "name": "WEIBULL"
        },
        {
          "locale": "cs-CZ",
          "name": "WEIBULL"
        },
        {
          "locale": "da-DK",
          "name": "WEIBULL"
        },
        {
          "locale": "de-DE",
          "name": "WEIBULL"
        },
        {
          "locale": "el-GR",
          "name": "WEIBULL"
        },
        {
          "locale": "en-AU",
          "name": "WEIBULL"
        },
        {
          "locale": "en-GB",
          "name": "WEIBULL"
        },
        {
          "locale": "en-US",
          "name": "WEIBULL"
        },
        {
          "locale": "es-ES",
          "name": "DIST.WEIBULL"
        },
        {
          "locale": "et-EE",
          "name": "WEIBULL"
        },
        {
          "locale": "fi-FI",
          "name": "WEIBULL"
        },
        {
          "locale": "fr-FR",
          "name": "LOI.WEIBULL*"
        },
        {
          "locale": "he-IL",
          "name": "WEIBULL"
        },
        {
          "locale": "hr-HR",
          "name": "WEIBULL"
        },
        {
          "locale": "hu-HU",
          "name": "WEIBULL"
        },
        {
          "locale": "id-ID",
          "name": "WEIBULL"
        },
        {
          "locale": "it-IT",
          "name": "WEIBULL"
        },
        {
          "locale": "ja-JP",
          "name": "WEIBULL"
        },
        {
          "locale": "ko-KR",
          "name": "WEIBULL"
        },
        {
          "locale": "lt-LT",
          "name": "WEIBULL"
        },
        {
          "locale": "lv-LV",
          "name": "WEIBULL"
        },
        {
          "locale": "nb-NO",
          "name": "WEIBULL"
        },
        {
          "locale": "nl-NL",
          "name": "WEIBULL"
        },
        {
          "locale": "pl-PL",
          "name": "ROZKŁAD.WEIBULL"
        },
        {
          "locale": "pt-BR",
          "name": "WEIBULL"
        },
        {
          "locale": "pt-PT",
          "name": "WEIBULL"
        },
        {
          "locale": "ro-RO",
          "name": "WEIBULL"
        },
        {
          "locale": "ru-RU",
          "name": "ВЕЙБУЛЛ"
        },
        {
          "locale": "sk-SK",
          "name": "WEIBULL"
        },
        {
          "locale": "sl-SI",
          "name": "WEIBULL"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "WEIBULL"
        },
        {
          "locale": "sv-SE",
          "name": "WEIBULL"
        },
        {
          "locale": "th-TH",
          "name": "WEIBULL"
        },
        {
          "locale": "tr-TR",
          "name": "WEIBULL işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "WEIBULL"
        },
        {
          "locale": "vi-VN",
          "name": "WEIBULL"
        },
        {
          "locale": "zh-CN",
          "name": "WEIBULL"
        },
        {
          "locale": "zh-HK",
          "name": "WEIBULL"
        },
        {
          "locale": "zh-TW",
          "name": "WEIBULL"
        }
      ],
      "signature": {
        "display": "WEIBULL(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",
      "version_marker": null,
      "xlcall": {
        "code": "302",
        "symbol": "xlfWeibull"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/weibull-function-b83dc2c6-260b-4754-bef2-633196f6fdcc"
  },
  "try_it": {
    "formula": "=WEIBULL(4,2,2,TRUE)"
  },
  "url": "https://handbook.dnacalc.com/functions/WEIBULL.html",
  "variants": [],
  "versions": []
}