{
  "category": "Math and trigonometry functions",
  "display_name": "INT",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.INT",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 2,
      "matched": 124399,
      "other_mismatch": 0,
      "refused": 2,
      "rows": 124403,
      "unread": 0,
      "worst_ulp": 4
    },
    "detail": "Of 124,561 recorded answers (124,403 in the answer bank and 158 workbook cells), 4 do not match: 2 differ by at most 16 ULP, 2 are refused.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "differs",
    "state_label": "Known larger differences",
    "summary": "Known larger differences on 4 of 124,561 recorded answers",
    "workbook_corpus": {
      "cells": 158,
      "matched": 158
    }
  },
  "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/rounding.rs#L106-L106",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/rounding.rs#L200-L228"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/rounding::call",
        "catalogue/rounding::numeric",
        "catalogue/rounding::numbers",
        "catalogue/rounding::abs",
        "catalogue/rounding::reading",
        "decimal::low32",
        "decimal::Natural::zero",
        "decimal::Natural::from_u64",
        "decimal::Natural::pow10",
        "decimal::Natural::normalize",
        "decimal::Natural::is_zero",
        "decimal::Natural::mul_add_small",
        "decimal::Natural::add_one",
        "decimal::Natural::times_pow10",
        "decimal::Natural::times_pow5",
        "decimal::Natural::times_pow2",
        "decimal::Natural::add",
        "decimal::Natural::subtract",
        "decimal::Natural::bit_len",
        "decimal::Natural::bit",
        "decimal::Natural::pow2",
        "decimal::Natural::from_u128",
        "decimal::Natural::to_u128",
        "decimal::Natural::shift_in",
        "decimal::Natural::div_rem",
        "decimal::Natural::div_small",
        "decimal::Natural::digits",
        "decimal::Natural::cmp",
        "decimal::ExactDecimal::read",
        "decimal::ExactDecimal::fifteen",
        "decimal::ExactDecimal::magnitude",
        "decimal::ExactDecimal::fifteen_x87",
        "decimal::ExactDecimal::normalized",
        "decimal::ExactDecimal::binary",
        "decimal::ExactDecimal::round_at",
        "decimal::round_to_64_bits",
        "decimal::truncate",
        "decimal::floor"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/rounding.rs#L106-L106",
      "state": "differs",
      "suite": null,
      "summary": "Known larger differences on 4 of 124,561 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.INT.json",
  "name": "INT",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[TRUNC](FUNC.TRUNC.md) removes a fraction toward zero. [FLOOR.MATH](FUNC.FLOOR.MATH.md) chooses a multiple with explicit negative-number mode, and [ROUND](FUNC.ROUND.md) chooses a nearest decimal position. [MOD](FUNC.MOD.md) has a documented floor identity but a separately recovered numerical route.\n\n\n",
    "how-to-implement": "\nThe current code separates decimal reading from binary floor:\n\n1. If `abs(x)>=1e15`, floor the exact binary64 value. A value already integral is unchanged; for a negative value with a fractional part, the result is one less than its toward-zero truncation.\n2. Below that threshold, obtain the shortest decimal that converts back to the input binary64. If it has at most fifteen significant digits, use that exact decimal; otherwise decode the exact binary64 as a rational or exact decimal.\n3. Round that reading to fifteen significant decimal digits, choosing the larger magnitude at an exact decimal half. When this did not change the reading, the current code falls back to floor of the incoming binary64.\n4. When the reading changed, truncate its decimal fraction toward zero and convert the whole value to binary64. Also convert the full reading. If the full reading is below the truncated whole value, subtract one; otherwise retain the whole value.\n\nFor `2.9999999999999982`, the shortened fifteen-digit reading is `3`, so the answer is three. For `-6.8`, the integral truncation is minus six and the number lies below it, so floor gives minus seven. Do not reuse ROUND's preliminary x87 scale operation: INT's current decimal helper is a separate route.\n\nThe calculation source reports 109 COM controls on build 20527, including both sides of small integers and the large-value exception. Those controls support this implementation on their stated inputs; they do not identify every conversion or workbook route. The [stored-arithmetic chapter](../model/09-staged-arithmetic.md) explains exact input decoding when a host decimal representation is unsuitable.\n\n\n",
    "quirks": "\nThe fifteen-digit reading can cross an integer. Calling a language's floor on the incoming double therefore misses recorded answers. The current implementation applies this reading only below magnitude `1e15`; larger values use binary64 floor directly. For example, the recorded `4503599627370495.5` floors to `4503599627370495`, while its fifteen-digit decimal reading would have crossed upward.\n\nINT has no digit-count argument. The direction for ordinary negative fractions is toward negative infinity; ROUNDDOWN and TRUNC use toward zero. Numeric conversion, errors and array handling belong to the worksheet wrapper, separately from this finite scalar recipe.\n\n\n",
    "sources": "\n- [Microsoft: INT function](https://support.microsoft.com/en-us/excel/functions/int-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/catalogue/rounding.rs); implementation steps and the limits identified in the text.\n- [Exact decimal reading and integer parts](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/decimal.rs).\n- [Recorded acceptance control](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/tests/acceptance.rs), INT at cell A5 in the rounding tests.\n\n",
    "try-it": "\n`=INT(-6.8)` returns `-7`, while `=TRUNC(-6.8)` returns `-6`. `=INT(6.8)` returns `6`. For an ordinary positive amount, subtracting its INT result extracts the fractional part.\n\nA boundary control from the source is different from mathematical floor of the incoming binary value: an exact cell value `2.9999999999999982` gives `3` on the recorded build. Entering a decimal formula literal can change the value before INT sees it; retain the exact cell input when reproducing that control.\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| 19929 | Windows, bitness not recorded, CPU not recorded | 40 |\n| 20430 | Windows, 64-bit, CPU not recorded | 124,403 |\n\n- XC-INT-001: build 19929 versus build 20430; 2 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.INT.json).\n\n\nThe current source also retains a later build-20527 COM group of 109 INT readings from 30 October 2026. It records `INT(2.9999999999999982)=3` and the large-input exception `INT(4503599627370495.5)=4503599627370495`. These are additional controls, not a matched-input comparison with the earlier environments.\n\nRetained controls from the indexed captures:\n\n| Build and recorded CPU | Captured call or arguments | Excel result |\n|---|---|---|\n| 19929, CPU not recorded | [`=INT(0)`](https://github.com/DnaCalc/CalcFunc-Evidence/blob/4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2/runs/W097-R-B-validation-cellref-module/comparisons/excel_sample_comparisons.jsonl.gz) | `0.0` (`0x0000000000000000`) |\n| 20430, CPU not recorded | [`INT(1)`](https://github.com/DnaCalc/CalcFunc-Evidence/blob/4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2/cache/w111-broad-regenerated-20260929/answers-int.json.gz) | `1` (`0x3ff0000000000000`) |\n\nThese are earlier recorded answers, not new Excel runs or an additional cross-build comparison. The function JSON retains each source locator, exact argument bits where available, and input-route status. Call notation does not imply that captured binary64 values were entered as decimal formula literals.",
    "what-it-does": "\n`INT(number)` rounds down to an integer, toward negative infinity. This makes negative fractions more negative: it is a different direction from TRUNC. The recorded compatibility route also has a preliminary decimal reading near integer boundaries.\n\n\n"
  },
  "signature": {
    "display": "INT(number)",
    "parameters": [
      {
        "description": null,
        "name": "number",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 1,
        "min": 1
      },
      "category": "Math and trigonometry functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "UnaryNumericScalarOrArrayElementwise",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "NumToNum",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Number rounded down to a whole number",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Rounds a number down to the nearest integer",
        "microsoft_url": "https://support.microsoft.com/en-us/office/int-function-a6c4af9e-356d-4369-ab6a-cb1fd9d343ef"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "INT"
        },
        {
          "locale": "bg-BG",
          "name": "INT"
        },
        {
          "locale": "cs-CZ",
          "name": "INT"
        },
        {
          "locale": "da-DK",
          "name": "INT"
        },
        {
          "locale": "de-DE",
          "name": "INT"
        },
        {
          "locale": "el-GR",
          "name": "INT"
        },
        {
          "locale": "en-AU",
          "name": "INT"
        },
        {
          "locale": "en-GB",
          "name": "INT"
        },
        {
          "locale": "en-US",
          "name": "INT"
        },
        {
          "locale": "es-ES",
          "name": "INT"
        },
        {
          "locale": "et-EE",
          "name": "INT"
        },
        {
          "locale": "fi-FI",
          "name": "INT"
        },
        {
          "locale": "fr-FR",
          "name": "INT"
        },
        {
          "locale": "he-IL",
          "name": "INT"
        },
        {
          "locale": "hr-HR",
          "name": "INT"
        },
        {
          "locale": "hu-HU",
          "name": "INT"
        },
        {
          "locale": "id-ID",
          "name": "INT"
        },
        {
          "locale": "it-IT",
          "name": "INT"
        },
        {
          "locale": "ja-JP",
          "name": "INT"
        },
        {
          "locale": "ko-KR",
          "name": "INT"
        },
        {
          "locale": "lt-LT",
          "name": "INT"
        },
        {
          "locale": "lv-LV",
          "name": "INT"
        },
        {
          "locale": "nb-NO",
          "name": "INT"
        },
        {
          "locale": "nl-NL",
          "name": "INT"
        },
        {
          "locale": "pl-PL",
          "name": "INT"
        },
        {
          "locale": "pt-BR",
          "name": "INT"
        },
        {
          "locale": "pt-PT",
          "name": "INT"
        },
        {
          "locale": "ro-RO",
          "name": "INT"
        },
        {
          "locale": "ru-RU",
          "name": "INT"
        },
        {
          "locale": "sk-SK",
          "name": "INT"
        },
        {
          "locale": "sl-SI",
          "name": "INT"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "INT"
        },
        {
          "locale": "sv-SE",
          "name": "INT"
        },
        {
          "locale": "th-TH",
          "name": "INT"
        },
        {
          "locale": "tr-TR",
          "name": "TAMSAYI"
        },
        {
          "locale": "uk-UA",
          "name": "INT"
        },
        {
          "locale": "vi-VN",
          "name": "INT"
        },
        {
          "locale": "zh-CN",
          "name": "INT"
        },
        {
          "locale": "zh-HK",
          "name": "INT"
        },
        {
          "locale": "zh-TW",
          "name": "INT"
        }
      ],
      "signature": {
        "display": "INT(number)",
        "parameters": [
          {
            "description": null,
            "name": "number",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "INT",
      "version_marker": null,
      "xlcall": {
        "code": "25",
        "symbol": "xlfInt"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/int-function-a6c4af9e-356d-4369-ab6a-cb1fd9d343ef"
  },
  "try_it": {
    "formula": "=INT(-6.8)"
  },
  "url": "https://handbook.dnacalc.com/functions/INT.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "40 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build. Retained control =INT(0) returned 0.0 (0x0000000000000000). The selected archive row does not record its input plumbing; no input route is inferred.",
      "excel_build": "16.0 build 19929",
      "observations": [
        {
          "call": "=INT(0)",
          "excel": {
            "bits": "0x0000000000000000",
            "display": "0.0",
            "kind": "number"
          },
          "input_route": "not-recorded",
          "inputs": [],
          "recorded_in": "Excel 16.0 build 19929, Windows, bitness not recorded, CPU not recorded.",
          "source": {
            "commit": "4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2",
            "locator": "BSE-000000814",
            "path": "runs/W097-R-B-validation-cellref-module/comparisons/excel_sample_comparisons.jsonl.gz",
            "repository": "CalcFunc-Evidence"
          }
        }
      ],
      "platform": "Windows, bitness not recorded, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.INT.json",
        "https://github.com/DnaCalc/CalcFunc-Evidence/blob/4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2/runs/W097-R-B-validation-cellref-module/comparisons/excel_sample_comparisons.jsonl.gz"
      ]
    },
    {
      "behaviour": "124,403 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. Retained control INT(1) returned 1 (0x3ff0000000000000). The capture specifies exact-double bulk Value2 cell input.",
      "excel_build": "16.0 build 20430",
      "observations": [
        {
          "call": "INT(1)",
          "excel": {
            "bits": "0x3ff0000000000000",
            "display": "1",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "argument1",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20430, Windows, 64-bit, CPU not recorded.",
          "source": {
            "commit": "4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2",
            "locator": "w111broad-20260929-INT-00012",
            "path": "cache/w111-broad-regenerated-20260929/answers-int.json.gz",
            "repository": "CalcFunc-Evidence"
          }
        }
      ],
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.INT.json",
        "https://github.com/DnaCalc/CalcFunc-Evidence/blob/4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2/cache/w111-broad-regenerated-20260929/answers-int.json.gz"
      ]
    },
    {
      "behaviour": "The current source also retains a later build-20527 COM group of 109 INT readings from 30 October 2026. It records `INT(2.9999999999999982)=3` and the large-input exception `INT(4503599627370495.5)=4503599627370495`. These are additional controls, not a matched-input comparison with the earlier environments.",
      "excel_build": "16.0 build 20527",
      "platform": "Windows through COM; bitness and CPU not stated in this comment",
      "sources": [
        "https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/catalogue/rounding.rs"
      ]
    }
  ]
}