{
  "category": "Math and trigonometry functions",
  "display_name": "POWER",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.POWER",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20131",
        "20430",
        "20527",
        "?"
      ],
      "larger_numeric": 0,
      "last_bit": 2,
      "matched": 62633,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 62635,
      "unread": 0,
      "worst_ulp": 1
    },
    "detail": "Everything else matches (62,635 in the answer bank and 146 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 62,781 recorded answers differ in the last bits, worst 1 ULP",
    "workbook_corpus": {
      "cells": 146,
      "matched": 146
    }
  },
  "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/math.rs#L112-L116"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/arithmetic::power_value",
        "catalogue/arithmetic::raise",
        "catalogue/arithmetic::power_algorithm",
        "ported/excel_numeric::backend::sqrt",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_pow_positive",
        "ported/excel_numeric::excel_pow_chain",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric::excel_x87_recip",
        "ported/excel_numeric/x87::mul",
        "ported/excel_numeric/x87::recip",
        "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/power_fn::exact_integer_magnitude",
        "ported/power_fn::accept_negative_base_odd_root",
        "ported/power_fn::binexp_positive",
        "ported/power_fn::power_kernel"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/math.rs#L112-L116",
      "state": "close",
      "suite": null,
      "summary": "Close: 2 of 62,781 recorded answers differ in the last bits, worst 1 ULP"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.POWER.json",
  "name": "POWER",
  "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- **`EXP` and `LN`** — the pair the fractional path is built from. `POWER(x,y)` and\n  `EXP(y*LN(x))` are different computations even when both are defined.\n- **`SQRT`** — for `y = 0.5` a hardware square root is correctly rounded and a general power is\n  not, which is why `SQRT(x)` and `POWER(x, 0.5)` are worth distinguishing. `EV-MATH-0002` records\n  that the exponent-`½`-is-`sqrt` behaviour was *discovered* during the upstream sweep rather than\n  assumed.\n- **Confused with `EXP`.** `EXP(x)` is `e^x`, not `x^e`. The mistake is common enough that it is\n  worth the sentence.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\n`pow` is the hardest of the elementary functions to get right, and the reasons are worth stating\nbecause they explain every deviation above.\n\n**Error amplification through the logarithm.** Writing `x^y = exp(y ln x)`, a relative error `ε`\nin `ln x` becomes a relative error of about `|y ln x| · ε` in the result. Since `|y ln x|` can\nreach 709 before the result overflows, a logarithm accurate to one unit in the last place buys a\nresult accurate only to about 2⁹·ulp. Every serious implementation therefore computes `ln x` in\nextra precision — Cody & Waite use a split representation, fdlibm's `__ieee754_pow` carries about\n2⁻⁵³ of extra headroom in a two-word product, and correctly rounded libraries (CRlibm, MPFR) go\nfurther. This is the single fact that explains why \"just call `exp` and `ln`\" is not an\nimplementation.\n\n**Negative bases are a branch decision.** The odd-root convention is not a mathematical necessity;\nit is a choice to prefer the real branch over the principal complex one. Once made, it raises the\nquestion of *when* an exponent counts as a reciprocal odd integer — and the upstream record here\nis instructive: the acceptance band was found to be decimal-shaped, widening by a factor of 100\naround `1/101` relative to `1/3`, which is the signature of a test performed on the decimal\nrendering of `1/y` rather than on its bits.\n\n**Host-CPU sensitivity.** `EV-MATH-0002`'s reader warning records that the `0.5 → sqrt` and\ninteger paths are CPU-independent while the general fractional path is not, and carries the same\nx87 microcode caveat as `EXP` and `LN`. A power result is therefore not necessarily portable\nacross machines even within one Excel build — which is exactly the distinction the Handbook's\n`portable-reproducible` flavour exists to name; see\n[About implementation options](../model/07-implementation-options.md).\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns `Number`.\n\n    precision_rounding_profile: integer_exponent_publication\n\nBoundary cases, each with its source named:\n\n- **`POWER(0, negative)`** — the same stream records `=0^-1 → #DIV/0!`. The pole is reported as a\n  division error rather than a domain error, which is the reading that treats `x^-n` as `1/x^n`.\n\n\n\n### Errors\n\n**Microsoft's documentation states none of these rows.** The VBA reference lists no error\ncondition for `Power` at all. Every row above is either shared-model machinery or an upstream\nlive-Excel observation, and the Handbook has not re-observed any of it.\n\n\n",
    "sources": "- Microsoft, \"WorksheetFunction.Power method (Excel)\" —\n  <https://learn.microsoft.com/en-us/office/vba/api/excel.worksheetfunction.power> (signature,\n  \"any real number\" for the base, and the `^` equivalence; no error conditions are stated).\n- Handbook evidence records `EV-MATH-0002`, `EV-MATH-0008`, `EV-STRUCT-0013`, `EV-MATH-0003`,\n  rendered beside this page with their own reader warnings.\n- Abramowitz & Stegun chapter 4; Cody & Waite, *Software Manual for the Elementary Functions*;\n  Muller, *Elementary Functions: Algorithms and Implementation*; fdlibm `__ieee754_pow`.\n- Handbook, [Coercion and lifting](../model/02-coercion-and-lifting.md),\n  [Claim language and honesty](../model/06-claim-language.md),\n  [About implementation options](../model/07-implementation-options.md).\n- Handbook projections `data/functions/FUNC.POWER.json` (the `integer_exponent_publication`\n  precision axis) and `data/presence/FUNC.POWER.json` (module, shared kernel, defect streams\n  `BUG-FUNC-005`, `BUG-FUNC-015`, `BUG-FUNC-027`, `BUG-FUNC-042`).\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| 19929 | Windows, bitness not recorded, CPU not recorded | 129 |\n| 20131 | Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics | 697 |\n| 20430 | Windows, 64-bit, CPU not recorded | 61,926 |\n\n- XC-POWER-001: build 19929 versus build 20430; 27 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.\n\nAgreement on these compared inputs does not establish agreement on unmeasured inputs.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.POWER.json).",
    "what-it-does": "\n`POWER(number, power)` returns `number` raised to `power` — written `x^y` below.\n\nThe mathematics is not one function but a family of cases, and every implementation difficulty on\nthis page comes from the seams between them.\n\n**For `x > 0`, all real `y`:**\n\n    x^y = exp(y · ln x)\n\nThis is the definition, not merely an evaluation strategy (A&S 4.2.1). It is smooth in both\narguments and is the only case with no discussion.\n\n**For `x = 0`:**\n\n    0^y = 0        for y > 0\n    0^y            undefined (a pole) for y < 0\n    0^0            indeterminate\n\n`0^0` is the famous one. Combinatorics and the binomial theorem want `1`; the limit of `x^y`\nalong the path `y = 1/ln x` is `e`; the limit along `x = 0` is `0`. The two-variable limit does\nnot exist, so the value is a *convention*, and different systems choose differently. IEEE 754 and\nC99 `pow` both specify `pow(0,0) = 1`. Excel does not — see below, and note that this is one of\nthe very few places where a spreadsheet knowingly departs from the floating-point standard.\n\n**For `x < 0`:** `x^y` has no real value for general real `y`. It has a real value exactly when\n`y` is an integer, and — by the odd-root convention — when `y = p/q` in lowest terms with `q`\nodd, in which case `x^y = −(|x|^y)`. Off those points the principal complex value\n`exp(y·(ln|x| + iπ))` is not real, and the principal branch of the complex logarithm has its cut\nalong the negative real axis, which is precisely where the base lives. So the negative-base case\nis not a bug to be worked around; it is a branch-cut question that every implementation has to\nanswer explicitly.\n\n**Range.** For `x > 0` the result is positive; for `x < 0` and admissible `y` the result carries\nthe sign of `(−1)^y`. Overflow and underflow arrive fast: `x^y` exceeds binary64 range as soon as\n`y·log₁₀|x| > 308.25`.\n\n\n\n### Arguments\n\n\n| Argument | Meaning | Default |\n|---|---|---|\n| `number` | The base. Microsoft's VBA page says \"it can be any real number\". Required. | — |\n| `power` | The exponent. Required. | — |\n\nBoth are numeric slots under ordinary to-number coercion — see\n[Coercion and lifting](../model/02-coercion-and-lifting.md). Text that reads as a number converts;\nlogicals convert to 1 and 0; an error in either slot propagates.\n\n"
  },
  "signature": {
    "display": "POWER(number, power)",
    "parameters": [
      {
        "description": null,
        "name": "number",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "power",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 2,
        "min": 2
      },
      "category": "Math and trigonometry functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "UnaryNumericScalarOnly",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "NumsToNum",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "A number raised to a power",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the result of a number raised to a power",
        "microsoft_url": "https://support.microsoft.com/en-us/office/power-function-d3f2908b-56f4-4c3f-895a-07fb519c362a"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "POWER"
        },
        {
          "locale": "bg-BG",
          "name": "POWER"
        },
        {
          "locale": "cs-CZ",
          "name": "POWER"
        },
        {
          "locale": "da-DK",
          "name": "POTENS"
        },
        {
          "locale": "de-DE",
          "name": "POWER"
        },
        {
          "locale": "el-GR",
          "name": "POWER"
        },
        {
          "locale": "en-AU",
          "name": "POWER"
        },
        {
          "locale": "en-GB",
          "name": "POWER"
        },
        {
          "locale": "en-US",
          "name": "POWER"
        },
        {
          "locale": "es-ES",
          "name": "ALIMENTACIÓN"
        },
        {
          "locale": "et-EE",
          "name": "POWER"
        },
        {
          "locale": "fi-FI",
          "name": "POTENSSI"
        },
        {
          "locale": "fr-FR",
          "name": "ALIMENTATION"
        },
        {
          "locale": "he-IL",
          "name": "POWER"
        },
        {
          "locale": "hr-HR",
          "name": "POWER"
        },
        {
          "locale": "hu-HU",
          "name": "HATVÁNY"
        },
        {
          "locale": "id-ID",
          "name": "POWER"
        },
        {
          "locale": "it-IT",
          "name": "POTENZA"
        },
        {
          "locale": "ja-JP",
          "name": "POWER"
        },
        {
          "locale": "ko-KR",
          "name": "전원"
        },
        {
          "locale": "lt-LT",
          "name": "POWER"
        },
        {
          "locale": "lv-LV",
          "name": "POWER"
        },
        {
          "locale": "nb-NO",
          "name": "OPPHØYD"
        },
        {
          "locale": "nl-NL",
          "name": "POWER"
        },
        {
          "locale": "pl-PL",
          "name": "POTĘGA"
        },
        {
          "locale": "pt-BR",
          "name": "ENERGIA"
        },
        {
          "locale": "pt-PT",
          "name": "POTÊNCIA"
        },
        {
          "locale": "ro-RO",
          "name": "POWER"
        },
        {
          "locale": "ru-RU",
          "name": "POWER"
        },
        {
          "locale": "sk-SK",
          "name": "NAPÁJANIE"
        },
        {
          "locale": "sl-SI",
          "name": "POWER"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "SNAGA"
        },
        {
          "locale": "sv-SE",
          "name": "UPPHÖJT.TILL"
        },
        {
          "locale": "th-TH",
          "name": "POWER"
        },
        {
          "locale": "tr-TR",
          "name": "KUVVET"
        },
        {
          "locale": "uk-UA",
          "name": "POWER"
        },
        {
          "locale": "vi-VN",
          "name": "POWER"
        },
        {
          "locale": "zh-CN",
          "name": "电源"
        },
        {
          "locale": "zh-HK",
          "name": "POWER"
        },
        {
          "locale": "zh-TW",
          "name": "POWER"
        }
      ],
      "signature": {
        "display": "POWER(number, power)",
        "parameters": [
          {
            "description": null,
            "name": "number",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "power",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "POWER",
      "version_marker": null,
      "xlcall": {
        "code": "337",
        "symbol": "xlfPower"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/power-function-d3f2908b-56f4-4c3f-895a-07fb519c362a"
  },
  "try_it": {
    "formula": "=POWER(2,3)"
  },
  "url": "https://handbook.dnacalc.com/functions/POWER.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "129 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 19929",
      "platform": "Windows, bitness not recorded, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.POWER.json"
      ]
    },
    {
      "behaviour": "697 captured inputs are indexed for this environment. Capture dates: 2026-07-23 to 2026-07-23. 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.POWER.json"
      ]
    },
    {
      "behaviour": "61,926 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.POWER.json"
      ]
    }
  ]
}