{
  "category": "Engineering functions",
  "display_name": "IMARGUMENT",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.IMARGUMENT",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1209,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 1209,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 1,209 in the answer bank and 3 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,212 recorded answers",
    "workbook_corpus": {
      "cells": 3,
      "matched": 3
    }
  },
  "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/engineering.rs#L189-L189"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/engineering::complex_of",
        "catalogue/engineering::complex_number",
        "ported/complex_family::parse_ascii_decimal_15",
        "ported/complex_family::ParsedComplex::new",
        "ported/complex_family::normalize_zero",
        "ported/complex_family::parse_real_number",
        "ported/complex_family::find_real_imag_split",
        "ported/complex_family::parse_imag_coeff",
        "ported/complex_family::parse_complex_text"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/engineering.rs#L189-L189",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,212 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.IMARGUMENT.json",
  "name": "IMARGUMENT",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[COMPLEX](FUNC.COMPLEX.md) constructs text from coordinates. [IMABS](FUNC.IMABS.md) returns the magnitude rather than the angle.\n\n\n",
    "how-to-implement": "\nParse the pair `(a,b)` and normalize signed zeros. If `a=0`, reject `b=0`; otherwise return `sign(b)*pi/2`. For nonzero a, compute the binary64 ratio `q=b/a` and reject an infinite ratio. Evaluate the current reduced scalar arctangent at q. If `a<0`, subtract pi when `b<0`, or add pi otherwise. Flush a subnormal angle to zero before numeric publication.\n\nFor `-1+i`, the ratio is minus one. Its reduced arctangent is near `-pi/4`; adding pi for the second quadrant gives `3*pi/4`. This is an explicit evaluation order from the current code. The arctangent approximation is a separate leaf; algebraically replacing the route with `atan2(b,a)` changes the recorded overflow boundary.\n\n\n",
    "quirks": "\nAngles are in radians. Zero has no direction and the current kernel returns `#DIV/0!`. Its ratio-based route also gives `#DIV/0!` if `b/a` overflows for nonzero a, even though a mathematical principal angle exists. This differs from a general `atan2` implementation and from the fallback inside IMSQRT.\n\nComplex text uses lowercase `i` or `j`. Malformed text gives `#NUM!` in the parser; a logical argument gives `#VALUE!` in the wrapper. The result here is a number, not complex text.\n\n\n",
    "sources": "\n- [Microsoft: IMARGUMENT function](https://support.microsoft.com/en-us/excel/functions/imargument-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/complex_family.rs); implementation steps and the limits identified in the text.\n\n",
    "try-it": "\n`=IMARGUMENT(\"-1+i\")` is about `2.356194490192345` radians, or three quarters of a half-turn. The negative real and positive imaginary components put the point in the second quadrant. `=IMARGUMENT(\"i\")` is about `1.5707963267949`, a quarter turn.\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 | 1,209 |\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.IMARGUMENT.json).",
    "what-it-does": "\n`IMARGUMENT(inumber)` returns the phase angle in radians of a complex number `a+bi`. Unlike functions that return complex text, this function returns a real worksheet number.\n\n\n"
  },
  "signature": {
    "display": "IMARGUMENT(inumber)",
    "parameters": [
      {
        "description": null,
        "name": "inumber",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 1,
        "min": 1
      },
      "category": "Engineering 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": "Argument (angle in radians) of a complex number",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the argument theta, an angle expressed in radians",
        "microsoft_url": "https://support.microsoft.com/en-us/office/imargument-function-eed37ec1-23b3-4f59-b9f3-d340358a034a"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "IMARGUMENT"
        },
        {
          "locale": "bg-BG",
          "name": "IMARGUMENT"
        },
        {
          "locale": "cs-CZ",
          "name": "IMARGUMENT"
        },
        {
          "locale": "da-DK",
          "name": "IMAGARGUMENT"
        },
        {
          "locale": "de-DE",
          "name": "IMARGUMENT"
        },
        {
          "locale": "el-GR",
          "name": "IMARGUMENT"
        },
        {
          "locale": "en-AU",
          "name": "IMARGUMENT"
        },
        {
          "locale": "en-GB",
          "name": "IMARGUMENT"
        },
        {
          "locale": "en-US",
          "name": "IMARGUMENT"
        },
        {
          "locale": "es-ES",
          "name": "IM.ANGULO"
        },
        {
          "locale": "et-EE",
          "name": "IMARGUMENT"
        },
        {
          "locale": "fi-FI",
          "name": "KOMPLEKSI.ARG"
        },
        {
          "locale": "fr-FR",
          "name": "COMPLEXE.ARGUMENT*"
        },
        {
          "locale": "he-IL",
          "name": "IMARGUMENT"
        },
        {
          "locale": "hr-HR",
          "name": "IMARGUMENT"
        },
        {
          "locale": "hu-HU",
          "name": "KÉPZ.ARGUMENT"
        },
        {
          "locale": "id-ID",
          "name": "IMARGUMENT"
        },
        {
          "locale": "it-IT",
          "name": "IMARGUMENT"
        },
        {
          "locale": "ja-JP",
          "name": "IMARGUMENT"
        },
        {
          "locale": "ko-KR",
          "name": "IMARGUMENT"
        },
        {
          "locale": "lt-LT",
          "name": "IMARGUMENT"
        },
        {
          "locale": "lv-LV",
          "name": "IMARGUMENT"
        },
        {
          "locale": "nb-NO",
          "name": "IMARGUMENT"
        },
        {
          "locale": "nl-NL",
          "name": "C.ARGUMENT"
        },
        {
          "locale": "pl-PL",
          "name": "ARG.LICZBY.ZESP"
        },
        {
          "locale": "pt-BR",
          "name": "IMARGUMENT"
        },
        {
          "locale": "pt-PT",
          "name": "IMARG"
        },
        {
          "locale": "ro-RO",
          "name": "IMARGUMENT"
        },
        {
          "locale": "ru-RU",
          "name": "МНИМ.АРГУМЕНТ"
        },
        {
          "locale": "sk-SK",
          "name": "IMARGUMENT"
        },
        {
          "locale": "sl-SI",
          "name": "IMARGUMENT"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "IMARGUMENT"
        },
        {
          "locale": "sv-SE",
          "name": "IMARGUMENT"
        },
        {
          "locale": "th-TH",
          "name": "IMARGUMENT"
        },
        {
          "locale": "tr-TR",
          "name": "SANBAĞ_DEĞİŞKEN işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "IMARGUMENT"
        },
        {
          "locale": "vi-VN",
          "name": "IMARGUMENT"
        },
        {
          "locale": "zh-CN",
          "name": "IMARGUMENT"
        },
        {
          "locale": "zh-HK",
          "name": "IMARGUMENT"
        },
        {
          "locale": "zh-TW",
          "name": "IMARGUMENT"
        }
      ],
      "signature": {
        "display": "IMARGUMENT(inumber)",
        "parameters": [
          {
            "description": null,
            "name": "inumber",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "IMARGUMENT",
      "version_marker": null,
      "xlcall": {
        "code": "407",
        "symbol": "xlfImargument"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/imargument-function-eed37ec1-23b3-4f59-b9f3-d340358a034a"
  },
  "try_it": {
    "formula": "=IMARGUMENT(\"-1+i\")"
  },
  "url": "https://handbook.dnacalc.com/functions/IMARGUMENT.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "1,209 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.IMARGUMENT.json"
      ]
    }
  ]
}