{
  "category": "Statistical functions",
  "display_name": "BINOM.INV",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.BINOM.INV",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 3,
      "last_bit": 0,
      "matched": 2149,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 2152,
      "unread": 0,
      "worst_ulp": 4607182418800017408
    },
    "detail": "Of 2,162 recorded answers (2,152 in the answer bank and 10 workbook cells), 3 do not match: 3 differ by more than 16 ULP.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "differs",
    "state_label": "Known larger differences",
    "summary": "Known larger differences on 3 of 2,162 recorded answers",
    "workbook_corpus": {
      "cells": 10,
      "matched": 10
    }
  },
  "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#L274-L277"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/distributions::nums",
        "ported/discrete_dist::stirling_error",
        "ported/discrete_dist::deviance",
        "ported/discrete_dist::binom_mass",
        "ported/discrete_dist::binom_inv_kernel",
        "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"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/distributions.rs#L274-L277",
      "state": "differs",
      "suite": null,
      "summary": "Known larger differences on 3 of 2,162 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.BINOM.INV.json",
  "name": "BINOM.INV",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[BINOM.DIST](FUNC.BINOM.DIST.md) maps a count to a probability; [CRITBINOM](FUNC.CRITBINOM.md) supplies the other spelling.\n\n\n",
    "how-to-implement": "\nThe current candidate is a sequential search:\n\n1. Truncate and validate the trial count and the two open-interval probabilities.\n2. Form the stored binary64 complement `q=1-p`; start `sum=0` and `k=0`.\n3. While `k<n`, obtain the current shared binomial mass at `k`, add it to `sum`, and return `k` if `sum>=alpha`.\n4. Otherwise increment `k`. If no earlier count reaches the criterion, return `n`. For admitted `n=0`, this final branch returns zero.\n\nFor four trials with `p=0.5`, the mathematical masses are `1,4,6,4,1` divided by sixteen. The cumulative values at counts zero, one and two are `1/16`, `5/16` and `11/16`; `alpha=0.6` first qualifies at two. At criterion `5/16`, the inclusive mathematical comparison first qualifies at one.\n\nA large-`n` implementation can bracket a count and binary-search a stable CDF, but that is a different algorithm. It needs checks around adjacent counts and exact CDF boundaries; stopping when the numerical probability is merely close to `alpha` can return the wrong integer. The current sequential routine retains recorded mismatches, so neither this search outline nor a generic inverse library is a solved whole-domain Excel quantile recipe.\n\n\n",
    "quirks": "\nThe trial count is truncated toward zero. The current helper then requires `n>=0`, `0<p<1` and `0<alpha<1`; probabilities at either endpoint are rejected with `#NUM!`. Nonnumeric arguments give `#VALUE!`. Unlike BINOM.DIST, this inverse does not admit degenerate endpoint probabilities.\n\nAt an exact cumulative boundary, “at least” means `>=`, not `>`. A count can change because the accumulated floating-point CDF falls on a different side of `alpha`, even when two mass formulas agree to many decimal places. The returned result is an integer count, not an interpolated fraction of a trial.\n\n\n",
    "sources": "\n- [Microsoft: BINOM.INV function](https://support.microsoft.com/en-us/excel/functions/binom-inv-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/discrete_dist.rs); implementation steps and the limits identified in the text.\n\n",
    "try-it": "\n`=BINOM.INV(4,0.5,0.6)` returns `2`. The cumulative probabilities through zero, one and two successes are `1/16`, `5/16` and `11/16`; two is the first count to reach 0.6.\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| 20430 | Windows, 64-bit, CPU not recorded | 2,152 |\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.BINOM.INV.json).",
    "what-it-does": "\n`BINOM.INV(trials, probability_s, alpha)` returns the smallest success count whose cumulative binomial probability is at least alpha. Trials are independent and share a success probability.\n\n\n"
  },
  "signature": {
    "display": "BINOM.INV(trials, probability_s, alpha)",
    "parameters": [
      {
        "description": null,
        "name": "trials",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "probability_s",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "alpha",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 3,
        "min": 3
      },
      "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": "Fewest successes whose cumulative binomial probability reaches a target",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the smallest value for which the cumulative binomial distribution is less than or equal to a criterion value",
        "microsoft_url": "https://support.microsoft.com/en-us/office/binom-inv-function-80a0370c-ada6-49b4-83e7-05a91ba77ac9"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "BINOM.INV"
        },
        {
          "locale": "bg-BG",
          "name": "BINOM.INV"
        },
        {
          "locale": "cs-CZ",
          "name": "BINOM.INV"
        },
        {
          "locale": "da-DK",
          "name": "BINOMIAL.INV"
        },
        {
          "locale": "de-DE",
          "name": "BINOM.INV"
        },
        {
          "locale": "el-GR",
          "name": "BINOM.INV"
        },
        {
          "locale": "en-AU",
          "name": "BINOM.INV"
        },
        {
          "locale": "en-GB",
          "name": "BINOM.INV"
        },
        {
          "locale": "en-US",
          "name": "BINOM.INV"
        },
        {
          "locale": "es-ES",
          "name": "INV.BINOM"
        },
        {
          "locale": "et-EE",
          "name": "BINOM.INV"
        },
        {
          "locale": "fi-FI",
          "name": "BINOMIJAKAUMA.KÄÄNT"
        },
        {
          "locale": "fr-FR",
          "name": "LOI.BINOMIALE.INVERSE*"
        },
        {
          "locale": "he-IL",
          "name": "BINOM.INV"
        },
        {
          "locale": "hr-HR",
          "name": "BINOM.INV"
        },
        {
          "locale": "hu-HU",
          "name": "BINOM.INVERZ"
        },
        {
          "locale": "id-ID",
          "name": "BINOM.INV"
        },
        {
          "locale": "it-IT",
          "name": "BINOM.INV"
        },
        {
          "locale": "ja-JP",
          "name": "BINOM.INV"
        },
        {
          "locale": "ko-KR",
          "name": "BINOM.INV"
        },
        {
          "locale": "lt-LT",
          "name": "BINOM.INV"
        },
        {
          "locale": "lv-LV",
          "name": "BINOM.INV"
        },
        {
          "locale": "nb-NO",
          "name": "BINOM.INV"
        },
        {
          "locale": "nl-NL",
          "name": "BINOMIALE.INV"
        },
        {
          "locale": "pl-PL",
          "name": "ROZKŁ.DWUM.ODWR"
        },
        {
          "locale": "pt-BR",
          "name": "BINOM.INV"
        },
        {
          "locale": "pt-PT",
          "name": "INV.BINOM"
        },
        {
          "locale": "ro-RO",
          "name": "BINOM.INV"
        },
        {
          "locale": "ru-RU",
          "name": "БИНОМ.ОБР"
        },
        {
          "locale": "sk-SK",
          "name": "BINOM.INV"
        },
        {
          "locale": "sl-SI",
          "name": "BINOM.INV"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "BINOM.INV"
        },
        {
          "locale": "sv-SE",
          "name": "BINOM.INV"
        },
        {
          "locale": "th-TH",
          "name": "BINOM.INV"
        },
        {
          "locale": "tr-TR",
          "name": "BİNOM.TERS"
        },
        {
          "locale": "uk-UA",
          "name": "BINOM.INV"
        },
        {
          "locale": "vi-VN",
          "name": "BINOM.INV"
        },
        {
          "locale": "zh-CN",
          "name": "BINOM.INV"
        },
        {
          "locale": "zh-HK",
          "name": "BINOM.INV"
        },
        {
          "locale": "zh-TW",
          "name": "BINOM.INV"
        }
      ],
      "signature": {
        "display": "BINOM.INV(trials, probability_s, alpha)",
        "parameters": [
          {
            "description": null,
            "name": "trials",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "probability_s",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "alpha",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "BINOM.INV",
      "version_marker": null,
      "xlcall": {
        "code": "487",
        "symbol": "xlfBinom_inv"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/binom-inv-function-80a0370c-ada6-49b4-83e7-05a91ba77ac9"
  },
  "try_it": {
    "formula": "=BINOM.INV(4,0.5,0.6)"
  },
  "url": "https://handbook.dnacalc.com/functions/BINOM.INV.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "2,152 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.BINOM.INV.json"
      ]
    }
  ]
}