{
  "category": "Engineering functions",
  "display_name": "CONVERT",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.CONVERT",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20228"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 33972,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 33972,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 33,972 in the answer bank and 5 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 33,977 recorded answers",
    "workbook_corpus": {
      "cells": 5,
      "matched": 5
    }
  },
  "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#L275-L280",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/misc_conversion_family.rs#L153-L279",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/misc_conversion_family.rs#L281-L302",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/misc_conversion_family.rs#L304-L316",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/misc_conversion_family.rs#L329-L332",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/misc_conversion_family.rs#L334-L345",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/misc_conversion_family.rs#L347-L372"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric::excel_x87_div",
        "ported/excel_numeric/x87::mul",
        "ported/excel_numeric/x87::div"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/engineering.rs#L275-L280",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 33,977 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.CONVERT.json",
  "name": "CONVERT",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[EUROCONVERT](FUNC.EUROCONVERT.md) handles its specified currency table. Direct multiplication is clear for a single known factor, but does not validate units or handle offsets.\n\n\n",
    "how-to-implement": "\nKeep unit validation, linear arithmetic and temperature arithmetic separate.\n\nFor the current linear route, resolve each code to a measurement category, stored base factor and decimal-prefix exponent. Resolve a direct unit name before trying prefixes. Check that categories agree, then use the [stored operation R](../model/09-staged-arithmetic.md):\n\n```text\nproduct = R(number * from_factor)\ncore = R(product / to_factor)\nresult = R(core * stored_power_of_ten(from_prefix - to_prefix))\n```\n\nPrefix scaling is a separate final multiplication. Replacing the three steps by one precomputed ratio changes the rounding history. The source retains a disjoint 10,418-row check for its selected linear graph; that scope does not cover every documented unit or prove universal agreement.\n\nFor three feet to inches, the retained length factors are `3048000000` and `254000000`. The product is `9144000000`, the division gives 36, and prefix scaling multiplies by one. For metres to millimetres the base factors cancel, then the final prefix factor is 1000.\n\nThe current temperature route uses ordinary binary64 pair formulas. C to F is `x*1.8+32`; F to C is `(x-32)/1.8`; C to K adds `273.15`. Do not replace division by the stored `1.8` with multiplication by a separately stored `5/9` when reproducing this code. An explicit reviewed unit table and the stated operation order are both needed; extending the table still requires its own Excel comparisons.\n\n\n",
    "quirks": "\nUnit codes and prefixes are case-sensitive. Microsoft documents `#N/A` for an unknown unit, a binary prefix not supported by its unit, or units from incompatible measurement groups; incorrect input types give `#VALUE!`. A mass-to-length conversion has no factor in this function.\n\nThe opened Microsoft unit list is broader than the current code table. It includes information units `bit` and `byte` and binary prefixes; the current helper implements a smaller linear-unit table and decimal prefixes. A preview `#N/A` for a documented unit can therefore be an implementation coverage gap. Do not infer an Excel rejection from that result alone.\n\nTemperature offsets also prevent a single scale-only implementation. The current helper handles C, F and K through explicit pair formulas, and trims outer whitespace from unit strings before its case-sensitive lookup.\n\n\n",
    "sources": "\n- [Microsoft: CONVERT function](https://support.microsoft.com/en-us/excel/functions/convert-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/misc_conversion_family.rs); implementation steps and the limits identified in the text.\n\n",
    "try-it": "\n`=CONVERT(3,\"ft\",\"in\")` returns `36`: each foot contributes twelve inches. `=CONVERT(32,\"F\",\"C\")` returns zero; a temperature conversion needs an offset as well as a scale.\n\nPrefix case changes the quantity. `=CONVERT(1,\"Mm\",\"m\")` returns `1000000`, whereas `=CONVERT(1,\"mm\",\"m\")` returns `0.001`. The first unit is a megametre and the second a millimetre.\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| 20228 | Windows, 64-bit, CPU not recorded | 33,972 |\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.CONVERT.json).",
    "what-it-does": "\n`CONVERT(number, from_unit, to_unit)` converts a measured quantity between supported units of the same dimension. Unit names are text codes, not the labels shown by cell formatting.\n\n\n"
  },
  "signature": {
    "display": "CONVERT(number, from_unit, to_unit)",
    "parameters": [
      {
        "description": null,
        "name": "number",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "from_unit",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "to_unit",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 3,
        "min": 3
      },
      "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": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "A measurement converted from one unit to another",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Converts a number from one measurement system to another",
        "microsoft_url": "https://support.microsoft.com/en-us/office/convert-function-d785bef1-808e-4aac-bdcd-666c810f9af2"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "CONVERT"
        },
        {
          "locale": "bg-BG",
          "name": "CONVERT"
        },
        {
          "locale": "cs-CZ",
          "name": "CONVERT"
        },
        {
          "locale": "da-DK",
          "name": "CONVERT"
        },
        {
          "locale": "de-DE",
          "name": "CONVERT"
        },
        {
          "locale": "el-GR",
          "name": "CONVERT"
        },
        {
          "locale": "en-AU",
          "name": "CONVERT"
        },
        {
          "locale": "en-GB",
          "name": "CONVERT"
        },
        {
          "locale": "en-US",
          "name": "CONVERT"
        },
        {
          "locale": "es-ES",
          "name": "CONVERT"
        },
        {
          "locale": "et-EE",
          "name": "CONVERT"
        },
        {
          "locale": "fi-FI",
          "name": "MUUNNA"
        },
        {
          "locale": "fr-FR",
          "name": "CONVERT"
        },
        {
          "locale": "he-IL",
          "name": "CONVERT"
        },
        {
          "locale": "hr-HR",
          "name": "CONVERT"
        },
        {
          "locale": "hu-HU",
          "name": "CONVERT"
        },
        {
          "locale": "id-ID",
          "name": "CONVERT"
        },
        {
          "locale": "it-IT",
          "name": "CONVERTI"
        },
        {
          "locale": "ja-JP",
          "name": "CONVERT"
        },
        {
          "locale": "ko-KR",
          "name": "CONVERT"
        },
        {
          "locale": "lt-LT",
          "name": "CONVERT"
        },
        {
          "locale": "lv-LV",
          "name": "CONVERT"
        },
        {
          "locale": "nb-NO",
          "name": "CONVERT"
        },
        {
          "locale": "nl-NL",
          "name": "CONVERT"
        },
        {
          "locale": "pl-PL",
          "name": "CONVERT"
        },
        {
          "locale": "pt-BR",
          "name": "CONVERT"
        },
        {
          "locale": "pt-PT",
          "name": "CONVERT"
        },
        {
          "locale": "ro-RO",
          "name": "CONVERT"
        },
        {
          "locale": "ru-RU",
          "name": "CONVERT"
        },
        {
          "locale": "sk-SK",
          "name": "CONVERT"
        },
        {
          "locale": "sl-SI",
          "name": "CONVERT"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "CONVERT"
        },
        {
          "locale": "sv-SE",
          "name": "CONVERT"
        },
        {
          "locale": "th-TH",
          "name": "CONVERT"
        },
        {
          "locale": "tr-TR",
          "name": "CONVERT"
        },
        {
          "locale": "uk-UA",
          "name": "CONVERT"
        },
        {
          "locale": "vi-VN",
          "name": "CONVERT"
        },
        {
          "locale": "zh-CN",
          "name": "CONVERT"
        },
        {
          "locale": "zh-HK",
          "name": "CONVERT"
        },
        {
          "locale": "zh-TW",
          "name": "CONVERT"
        }
      ],
      "signature": {
        "display": "CONVERT(number, from_unit, to_unit)",
        "parameters": [
          {
            "description": null,
            "name": "number",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "from_unit",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "to_unit",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "CONVERT",
      "version_marker": null,
      "xlcall": {
        "code": "468",
        "symbol": "xlfConvert"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/convert-function-d785bef1-808e-4aac-bdcd-666c810f9af2"
  },
  "try_it": {
    "formula": "=CONVERT(3,\"ft\",\"in\")"
  },
  "url": "https://handbook.dnacalc.com/functions/CONVERT.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "33,972 captured inputs are indexed for this environment. Capture dates: 2026-08-09 to 2026-08-09. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20228",
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.CONVERT.json"
      ]
    }
  ]
}