{
  "category": "Statistical functions",
  "display_name": "BETA.DIST",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.BETA.DIST",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20131",
        "20430",
        "?"
      ],
      "larger_numeric": 574,
      "last_bit": 1363,
      "matched": 885,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 2822,
      "unread": 0,
      "worst_ulp": 170
    },
    "detail": "Of 2,828 recorded answers (2,822 in the answer bank and 6 workbook cells), 1,938 do not match: 574 differ by more than 16 ULP, 1,364 differ by at most 16 ULP.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "differs",
    "state_label": "Known larger differences",
    "summary": "Known larger differences on 1,938 of 2,828 recorded answers",
    "workbook_corpus": {
      "cells": 6,
      "last_bit": 1,
      "matched": 5,
      "worst_ulp": 2
    }
  },
  "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#L198-L204"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/distributions::nums",
        "ported/beta_gamma_stats_family::beta_log_norm",
        "ported/beta_gamma_stats_family::validate_beta_shape",
        "ported/beta_gamma_stats_family::beta_dist_kernel",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_x87_add",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric::excel_x87_mul_add",
        "ported/excel_numeric/x87::mul",
        "ported/excel_numeric/x87::add",
        "ported/special_math_common::ln_gamma",
        "ported/special_math_common::bratio_ftoi",
        "ported/special_math_common::bratio_spmpar1",
        "ported/special_math_common::bratio_exparg",
        "ported/special_math_common::bratio_esum",
        "ported/special_math_common::bratio_esum20",
        "ported/special_math_common::bratio_alnrel",
        "ported/special_math_common::bratio_rlog1",
        "ported/special_math_common::bratio_gam1",
        "ported/special_math_common::bratio_gamln1",
        "ported/special_math_common::bratio_gamln",
        "ported/special_math_common::bratio_algdiv",
        "ported/special_math_common::bratio_bcorr",
        "ported/special_math_common::bratio_gsumln",
        "ported/special_math_common::bratio_betaln",
        "ported/special_math_common::bratio_betaln_60",
        "ported/special_math_common::bratio_erf_nswc",
        "ported/special_math_common::bratio_erfc1",
        "ported/special_math_common::bratio_rexp",
        "ported/special_math_common::bratio_psi",
        "ported/special_math_common::bratio_fpser",
        "ported/special_math_common::bratio_apser",
        "ported/special_math_common::bratio_bpser",
        "ported/special_math_common::bratio_bup",
        "ported/special_math_common::bratio_brcomp",
        "ported/special_math_common::bratio_brcmp1",
        "ported/special_math_common::bratio_bfrac",
        "ported/special_math_common::bratio_bgrat",
        "ported/special_math_common::bratio_grat1",
        "ported/special_math_common::bratio_basym",
        "ported/special_math_common::bratio",
        "ported/special_math_common::regularized_beta"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/distributions.rs#L198-L204",
      "state": "differs",
      "suite": null,
      "summary": "Known larger differences on 1,938 of 2,828 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.BETA.DIST.json",
  "name": "BETA.DIST",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[BETADIST](FUNC.BETADIST.md) is the compatibility CDF-only spelling; [BETA.INV](FUNC.BETA.INV.md) maps probability to a value. [F.DIST](FUNC.F.DIST.md) and [T.DIST](FUNC.T.DIST.md) use related beta ratios with different argument constructions.\n\n\n",
    "how-to-implement": "\nUse D for ordinary binary64 storage.\n\n1. Apply optional bounds and validate positive finite shapes, finite x and ordered finite bounds. Require x inside the interval.\n2. Store `width=D(B-A)`, `offset=D(x-A)` and `z=D(offset/width)`.\n3. For cumulative mode, call the regularized lower beta helper. It handles z=0 and z=1 explicitly; otherwise it supplies `bratio(alpha,beta,z,D(1-z))` and returns the first ratio.\n4. For density mode, the current body uses runtime logarithms and exponentials and the internal log-gamma routine. It computes `log_norm=logGamma(alpha)+logGamma(beta)-logGamma(alpha+beta)`, then `(alpha-1)*log(z)+(beta-1)*log(1-z)-log_norm-log(width)` with binary64 stores in that order, and exponentiates. These are internal leaves, not unconditional calls to the worksheet LN, EXP or GAMMALN wrappers.\n5. Apply the finite-result and worksheet publication rules. Preserve the density’s current endpoint behaviour when describing this code; handling mathematical limits is a separate implementation choice.\n\nFor the examples z is three quarters. The beta(2,1) CDF is `z^2=9/16`; the density on the chosen interval is `2*z/4=3/8`. Stored numerical approximations can differ in their low bits from those rational values.\n\nInteger shapes use the same current beta-ratio route, rather than a binomial-sum shortcut. The complement construction, log-density arithmetic, endpoint cases and inner approximations have distinct numerical scopes. The problem report still records beta-distribution mismatches; a general beta library does not by itself reproduce Excel’s private program.\n\n\n",
    "quirks": "\nMicrosoft documents `#VALUE!` for nonnumeric arguments and `#NUM!` for nonpositive shapes, x outside the interval or equal bounds. The current helper requires ordered finite bounds `B>A`.\n\nAt an interval endpoint, mathematical density limits need explicit treatment. The current log-density body has no general endpoint shortcut: even the uniform shape-one density can encounter `0*log(0)` and return `#NUM!`, although its mathematical density is finite. This is a code limitation, rather than an additional Excel observation.\n\nThe current ordinary binary64 width calculation can overflow for extreme finite bounds. Keeping finite parameter validation separate from intermediate arithmetic is necessary for explaining that case.\n\n\n",
    "sources": "\n- [Microsoft: BETA.DIST function](https://support.microsoft.com/en-us/excel/functions/beta-dist-function), opened 7 November 2026; syntax, documented argument rules and errors.\n- [DnaCalc implementation](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/ported/beta_gamma_stats_family.rs); implementation steps and the limits identified in the text.\n- [Beta ratio and internal log-gamma](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/ported/special_math_common.rs); numerical helpers used by the wrapper.\n- [Remaining numerical failures](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/docs/generated/problem-functions.md).\n\n",
    "try-it": "\n`=BETA.DIST(5,2,1,TRUE,2,6)` is about `0.5625`. Five maps to `z=(5-2)/(6-2)=0.75`, and these shapes have CDF `z^2`.\n\n`=BETA.DIST(5,2,1,FALSE,2,6)` is about `0.375`. The standard density `2*z` is divided by width four, giving `1.5/4`. The density is a different quantity from the cumulative probability.\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| 20131 | Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics | 2,805 |\n| 20430 | Windows, 64-bit, CPU not recorded | 17 |\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.BETA.DIST.json).",
    "what-it-does": "\n`BETA.DIST(x,alpha,beta,cumulative,[A],[B])` evaluates a beta distribution between optional bounds A and B, defaulting to zero and one. The two shape parameters are positive. TRUE selects its cumulative probability; FALSE selects its density.\n\nChanging the interval rescales the density by its width. It does not multiply a CDF by that width.\n\n\n"
  },
  "signature": {
    "display": "BETA.DIST(x, alpha, beta, cumulative, [A], [B])",
    "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
      },
      {
        "description": null,
        "name": "A",
        "optional": true,
        "repeats": false
      },
      {
        "description": null,
        "name": "B",
        "optional": true,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 6,
        "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": "None",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Beta distribution: the density or the cumulative probability, on an optional interval",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the beta cumulative distribution function",
        "microsoft_url": "https://support.microsoft.com/en-us/office/beta-dist-function-11188c9c-780a-42c7-ba43-9ecb5a878d31"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "BETA.DIST"
        },
        {
          "locale": "bg-BG",
          "name": "BETA.DIST"
        },
        {
          "locale": "cs-CZ",
          "name": "BETA.DIST"
        },
        {
          "locale": "da-DK",
          "name": "BETA.FORDELING"
        },
        {
          "locale": "de-DE",
          "name": "BETA.DIST"
        },
        {
          "locale": "el-GR",
          "name": "BETA.DIST"
        },
        {
          "locale": "en-AU",
          "name": "BETA.DIST"
        },
        {
          "locale": "en-GB",
          "name": "BETA.DIST"
        },
        {
          "locale": "en-US",
          "name": "BETA.DIST"
        },
        {
          "locale": "es-ES",
          "name": "DISTR.BETA.N"
        },
        {
          "locale": "et-EE",
          "name": "BETA.DIST"
        },
        {
          "locale": "fi-FI",
          "name": "BEETA.JAKAUMA"
        },
        {
          "locale": "fr-FR",
          "name": "LOI.BETA.N*"
        },
        {
          "locale": "he-IL",
          "name": "BETA.DIST"
        },
        {
          "locale": "hr-HR",
          "name": "BETA.DIST"
        },
        {
          "locale": "hu-HU",
          "name": "BÉTA.ELOSZL"
        },
        {
          "locale": "id-ID",
          "name": "BETA.DIST"
        },
        {
          "locale": "it-IT",
          "name": "BETA.DIST"
        },
        {
          "locale": "ja-JP",
          "name": "BETA.DIST"
        },
        {
          "locale": "ko-KR",
          "name": "BETA.DIST"
        },
        {
          "locale": "lt-LT",
          "name": "BETA.DIST"
        },
        {
          "locale": "lv-LV",
          "name": "BETA.DIST"
        },
        {
          "locale": "nb-NO",
          "name": "BETA.DIST"
        },
        {
          "locale": "nl-NL",
          "name": "BETA.DIST"
        },
        {
          "locale": "pl-PL",
          "name": "ROZKŁ.BETA"
        },
        {
          "locale": "pt-BR",
          "name": "BETA.DIST"
        },
        {
          "locale": "pt-PT",
          "name": "DIST.BETA"
        },
        {
          "locale": "ro-RO",
          "name": "BETA.DIST"
        },
        {
          "locale": "ru-RU",
          "name": "БЕТА.РАСП"
        },
        {
          "locale": "sk-SK",
          "name": "BETA.DIST"
        },
        {
          "locale": "sl-SI",
          "name": "BETA.DIST"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "BETA.DIST"
        },
        {
          "locale": "sv-SE",
          "name": "BETA.FÖRD"
        },
        {
          "locale": "th-TH",
          "name": "BETA.DIST"
        },
        {
          "locale": "tr-TR",
          "name": "BETA.DAĞ"
        },
        {
          "locale": "uk-UA",
          "name": "BETA.DIST"
        },
        {
          "locale": "vi-VN",
          "name": "BETA.DIST"
        },
        {
          "locale": "zh-CN",
          "name": "BETA.DIST"
        },
        {
          "locale": "zh-HK",
          "name": "BETA.DIST"
        },
        {
          "locale": "zh-TW",
          "name": "BETA.DIST"
        }
      ],
      "signature": {
        "display": "BETA.DIST(x, alpha, beta, cumulative, [A], [B])",
        "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
          },
          {
            "description": null,
            "name": "A",
            "optional": true,
            "repeats": false
          },
          {
            "description": null,
            "name": "B",
            "optional": true,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "BETA.DIST",
      "version_marker": null,
      "xlcall": {
        "code": "525",
        "symbol": "xlfBeta_dist"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/beta-dist-function-11188c9c-780a-42c7-ba43-9ecb5a878d31"
  },
  "try_it": {
    "formula": "=BETA.DIST(5,2,1,TRUE,2,6)"
  },
  "url": "https://handbook.dnacalc.com/functions/BETA.DIST.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "2,805 captured inputs are indexed for this environment. Capture dates: 2026-07-16 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.BETA.DIST.json"
      ]
    },
    {
      "behaviour": "17 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.",
      "excel_build": "16.0 build 20430",
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.BETA.DIST.json"
      ]
    }
  ]
}