{
  "category": "Compatibility",
  "display_name": "CONFIDENCE",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.CONFIDENCE",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Everything else matches (5 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 5 recorded answers differ in the last bits, worst 2 ULP",
    "workbook_corpus": {
      "cells": 5,
      "last_bit": 2,
      "matched": 3,
      "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#L97-L100"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/distributions::nums",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric/x87::mul",
        "ported/normal_dist_common::phi_kernel",
        "ported/normal_log_family::validate_probability_open_unit",
        "ported/normal_log_family::inverse_standard_normal_acklam_refined",
        "ported/normal_log_family::inverse_standard_normal",
        "ported/normal_log_family::confidence_norm_kernel"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/distributions.rs#L97-L100",
      "state": "close",
      "suite": null,
      "summary": "Close: 2 of 5 recorded answers differ in the last bits, worst 2 ULP"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.CONFIDENCE.json",
  "name": "CONFIDENCE",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[CONFIDENCE.NORM](FUNC.CONFIDENCE.NORM.md) is the modern normal spelling; [CONFIDENCE.T](FUNC.CONFIDENCE.T.md) uses the t critical value; [NORM.S.INV](FUNC.NORM.S.INV.md) exposes the normal quantile.\n\n\n",
    "how-to-implement": "\n1. Truncate size toward zero and validate `0<alpha<1`, positive standard deviation and `n>=1`.\n2. Form `p=1-alpha/2` with a binary64 division and subtraction, then obtain the current standard-normal inverse at p.\n3. Multiply that critical value by standard_dev, storing to binary64. Divide the stored product by the binary64 square root of n. The current order is `(critical*standard_dev)/sqrt(n)`, rather than multiplying critical by a precomputed standard error.\n\nIn the example n=100 has square root ten, so the margin is approximately `1.9599639845*10/10`, or 1.96. With sample mean fifty, add and subtract that margin outside the function.\n\nFor very small alpha, the stored probability expression can round to one even while alpha is positive. A tail-aware inverse can avoid that loss in a mathematical implementation, but changes the current operation tree. The normal inverse approximation and its return rounding remain separate compatibility obligations; a valid quantile algorithm alone is not evidence of Excel’s private method.\n\n\n",
    "quirks": "\nAlpha must be strictly between zero and one, standard deviation positive, and truncated size at least one, otherwise `#NUM!`. Nonnumeric arguments give `#VALUE!`. The returned margin does not incorporate a sample mean, and the normal-known-scale model differs from a Student-t margin.\n\n\n",
    "sources": "\n- [Microsoft: CONFIDENCE function](https://support.microsoft.com/en-us/excel/functions/confidence-function), opened 6 November 2026; syntax, documented argument rules and errors.\n- [Current normal-confidence implementation](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/ported/normal_log_family.rs); `confidence_norm_kernel`, probability expression and product/division order.\n\n",
    "try-it": "\n`=CONFIDENCE(0.05,10,100)` is about `1.96`. With a sample mean of fifty the corresponding arithmetic interval is about `48.04` to `51.96`; the function itself returns only the margin.\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`CONFIDENCE(alpha,standard_dev,size)` returns a normal-based confidence-interval **half-width**. Alpha is the excluded two-tail probability; standard_dev is a known positive population standard deviation; size is the observation count. It is the compatibility normal-confidence name.\n\n\n"
  },
  "signature": {
    "display": "CONFIDENCE(alpha, standard_dev, size)",
    "parameters": [
      {
        "description": null,
        "name": "alpha",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "standard_dev",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "size",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 3,
        "min": 3
      },
      "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": "Half-width of a normal confidence interval for a mean (older form)",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the confidence interval for a population mean",
        "microsoft_url": "https://support.microsoft.com/en-us/office/confidence-function-75ccc007-f77c-4343-bc14-673642091ad6"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "CONFIDENCE"
        },
        {
          "locale": "bg-BG",
          "name": "CONFIDENCE"
        },
        {
          "locale": "cs-CZ",
          "name": "CONFIDENCE"
        },
        {
          "locale": "da-DK",
          "name": "KONFIDENSINTERVAL"
        },
        {
          "locale": "de-DE",
          "name": "CONFIDENCE"
        },
        {
          "locale": "el-GR",
          "name": "CONFIDENCE"
        },
        {
          "locale": "en-AU",
          "name": "CONFIDENCE"
        },
        {
          "locale": "en-GB",
          "name": "CONFIDENCE"
        },
        {
          "locale": "en-US",
          "name": "CONFIDENCE"
        },
        {
          "locale": "es-ES",
          "name": "INTERVALO.CONFIANZA"
        },
        {
          "locale": "et-EE",
          "name": "CONFIDENCE"
        },
        {
          "locale": "fi-FI",
          "name": "LUOTTAMUSVÄLI"
        },
        {
          "locale": "fr-FR",
          "name": "INTERVALLE.CONFIANCE*"
        },
        {
          "locale": "he-IL",
          "name": "CONFIDENCE"
        },
        {
          "locale": "hr-HR",
          "name": "CONFIDENCE"
        },
        {
          "locale": "hu-HU",
          "name": "MEGBÍZHATÓSÁG"
        },
        {
          "locale": "id-ID",
          "name": "CONFIDENCE"
        },
        {
          "locale": "it-IT",
          "name": "CONFIDENCE"
        },
        {
          "locale": "ja-JP",
          "name": "CONFIDENCE"
        },
        {
          "locale": "ko-KR",
          "name": "CONFIDENCE"
        },
        {
          "locale": "lt-LT",
          "name": "CONFIDENCE"
        },
        {
          "locale": "lv-LV",
          "name": "CONFIDENCE"
        },
        {
          "locale": "nb-NO",
          "name": "KONFIDENS"
        },
        {
          "locale": "nl-NL",
          "name": "BETROUWBAARHEID"
        },
        {
          "locale": "pl-PL",
          "name": "UFNOŚĆ"
        },
        {
          "locale": "pt-BR",
          "name": "CONFIANÇA"
        },
        {
          "locale": "pt-PT",
          "name": "INT.CONFIANÇA"
        },
        {
          "locale": "ro-RO",
          "name": "CONFIDENCE"
        },
        {
          "locale": "ru-RU",
          "name": "ДОВЕРИТ"
        },
        {
          "locale": "sk-SK",
          "name": "CONFIDENCE"
        },
        {
          "locale": "sl-SI",
          "name": "CONFIDENCE"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "CONFIDENCE"
        },
        {
          "locale": "sv-SE",
          "name": "KONFIDENS"
        },
        {
          "locale": "th-TH",
          "name": "CONFIDENCE"
        },
        {
          "locale": "tr-TR",
          "name": "GÜVENİRLİK işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "CONFIDENCE"
        },
        {
          "locale": "vi-VN",
          "name": "CONFIDENCE"
        },
        {
          "locale": "zh-CN",
          "name": "CONFIDENCE"
        },
        {
          "locale": "zh-HK",
          "name": "CONFIDENCE"
        },
        {
          "locale": "zh-TW",
          "name": "CONFIDENCE"
        }
      ],
      "signature": {
        "display": "CONFIDENCE(alpha, standard_dev, size)",
        "parameters": [
          {
            "description": null,
            "name": "alpha",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "standard_dev",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "size",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "CONFIDENCE",
      "version_marker": null,
      "xlcall": {
        "code": "277",
        "symbol": "xlfConfidence"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/confidence-function-75ccc007-f77c-4343-bc14-673642091ad6"
  },
  "try_it": {
    "formula": "=CONFIDENCE(0.05,10,100)"
  },
  "url": "https://handbook.dnacalc.com/functions/CONFIDENCE.html",
  "variants": [],
  "versions": []
}