{
  "category": "Engineering functions",
  "display_name": "IMSUB",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.IMSUB",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1216,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 1216,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 1,216 in the answer bank and 4 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,220 recorded answers",
    "workbook_corpus": {
      "cells": 4,
      "matched": 4
    }
  },
  "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#L245-L249"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/engineering::complex_of",
        "catalogue/engineering::complex_text",
        "ported/complex_decimal::nearest_even",
        "ported/complex_decimal::decimal_pair",
        "ported/complex_family::parse_ascii_decimal_15",
        "ported/complex_family::ParsedComplex::new",
        "ported/complex_family::ParsedComplex::abs",
        "ported/complex_family::normalize_zero",
        "ported/complex_family::number_to_excel_text",
        "ported/complex_family::format_complex_text",
        "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",
        "ported/complex_family::suffix_from_operands"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/engineering.rs#L245-L249",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,220 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.IMSUB.json",
  "name": "IMSUB",
  "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 each input; [IMDIV](FUNC.IMDIV.md) divides; [IMPOWER](FUNC.IMPOWER.md) raises one input to a real power.\n\n\n",
    "how-to-implement": "\nParse the two coefficients and suffix before doing arithmetic; use the common complex formatter afterward. Retain suffix consistency, suppress a zero component and omit the coefficient one before the imaginary unit. Formatting and parsing have their own fifteen-significant-digit rules, so testing only the algebra misses observable behaviour.\n\nCompute `(a,b)-(c,d)=(a-c,b-d)`. The example gives `5-1=4` and `2-5=-3`. Preserve operand order; subtraction is not commutative. The current implementation uses ordinary binary64 component arithmetic. Keep error propagation and traversal of range arguments consistent with the worksheet call model; flattening values without their error policy can change which result is returned.\n\n\n",
    "quirks": "\nOperand order matters: subtraction is neither commutative nor associative. Both arguments are required. Complex text may use lowercase `i` or `j`, but two written suffixes must agree or the current wrapper gives `#VALUE!`. A malformed complex number gives `#NUM!`. The result is complex text; extracting its coordinates with IMREAL and IMAGINARY returns ordinary numbers.\n\n\n",
    "sources": "\n- [Microsoft: IMSUB function](https://support.microsoft.com/en-us/office/imsub-function-2e404b4d-4935-4e85-9f52-cb08b9a45054), 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`=IMSUB(\"5+2i\",\"1+5i\")` returns `\"4-3i\"`: subtract real coefficients and imaginary coefficients separately. Reversing the arguments returns `\"-4+3i\"`.\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,216 |\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.IMSUB.json).",
    "what-it-does": "\n`IMSUB(inumber1, inumber2)` subtracts its second complex argument from its first. Both arguments are required.\n\n\n"
  },
  "signature": {
    "display": "IMSUB(inumber1, inumber2)",
    "parameters": [
      {
        "description": null,
        "name": "inumber1",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "inumber2",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 2,
        "min": 2
      },
      "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": "One complex number minus another",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the difference between two complex numbers",
        "microsoft_url": "https://support.microsoft.com/en-us/office/imsub-function-2e404b4d-4935-4e85-9f52-cb08b9a45054"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "IMSUB"
        },
        {
          "locale": "bg-BG",
          "name": "IMSUB"
        },
        {
          "locale": "cs-CZ",
          "name": "IMSUB"
        },
        {
          "locale": "da-DK",
          "name": "IMAGSUB"
        },
        {
          "locale": "de-DE",
          "name": "IMSUB"
        },
        {
          "locale": "el-GR",
          "name": "IMSUB"
        },
        {
          "locale": "en-AU",
          "name": "IMSUB"
        },
        {
          "locale": "en-GB",
          "name": "IMSUB"
        },
        {
          "locale": "en-US",
          "name": "IMSUB"
        },
        {
          "locale": "es-ES",
          "name": "IM.SUSTR"
        },
        {
          "locale": "et-EE",
          "name": "IMSUB"
        },
        {
          "locale": "fi-FI",
          "name": "KOMPLEKSI.EROTUS"
        },
        {
          "locale": "fr-FR",
          "name": "COMPLEXE.DIFFERENCE*"
        },
        {
          "locale": "he-IL",
          "name": "IMSUB"
        },
        {
          "locale": "hr-HR",
          "name": "IMSUB"
        },
        {
          "locale": "hu-HU",
          "name": "KÉPZ.KÜL"
        },
        {
          "locale": "id-ID",
          "name": "IMSUB"
        },
        {
          "locale": "it-IT",
          "name": "IMSUB"
        },
        {
          "locale": "ja-JP",
          "name": "IMSUB"
        },
        {
          "locale": "ko-KR",
          "name": "IMSUB"
        },
        {
          "locale": "lt-LT",
          "name": "IMSUB"
        },
        {
          "locale": "lv-LV",
          "name": "IMSUB"
        },
        {
          "locale": "nb-NO",
          "name": "IMSUB"
        },
        {
          "locale": "nl-NL",
          "name": "C.VERSCHIL"
        },
        {
          "locale": "pl-PL",
          "name": "RÓŻN.LICZB.ZESP"
        },
        {
          "locale": "pt-BR",
          "name": "IMSUB"
        },
        {
          "locale": "pt-PT",
          "name": "IMSUBTR"
        },
        {
          "locale": "ro-RO",
          "name": "IMSUB"
        },
        {
          "locale": "ru-RU",
          "name": "МНИМ.РАЗН"
        },
        {
          "locale": "sk-SK",
          "name": "IMSUB"
        },
        {
          "locale": "sl-SI",
          "name": "IMSUB"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "IMSUB"
        },
        {
          "locale": "sv-SE",
          "name": "IMDIFF"
        },
        {
          "locale": "th-TH",
          "name": "IMSUB"
        },
        {
          "locale": "tr-TR",
          "name": "SANTOPLA"
        },
        {
          "locale": "uk-UA",
          "name": "IMSUB"
        },
        {
          "locale": "vi-VN",
          "name": "IMSUB"
        },
        {
          "locale": "zh-CN",
          "name": "IMSUB"
        },
        {
          "locale": "zh-HK",
          "name": "IMSUB"
        },
        {
          "locale": "zh-TW",
          "name": "IMSUB"
        }
      ],
      "signature": {
        "display": "IMSUB(inumber1, inumber2)",
        "parameters": [
          {
            "description": null,
            "name": "inumber1",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "inumber2",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "IMSUB",
      "version_marker": null,
      "xlcall": {
        "code": "396",
        "symbol": "xlfImsub"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/imsub-function-2e404b4d-4935-4e85-9f52-cb08b9a45054"
  },
  "try_it": {
    "formula": "=IMSUB(\"5+2i\",\"1+5i\")"
  },
  "url": "https://handbook.dnacalc.com/functions/IMSUB.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "1,216 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.IMSUB.json"
      ]
    }
  ]
}