{
  "category": "Math and trigonometry functions",
  "display_name": "FLOOR.MATH",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.FLOOR.MATH",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1350,
      "other_mismatch": 0,
      "refused": 12,
      "rows": 1362,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Of 1,486 recorded answers (1,362 in the answer bank and 124 workbook cells), 12 do not match: 12 are refused.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "differs",
    "state_label": "Known larger differences",
    "summary": "Refuses 12 of 1,486 recorded calls; the rest match",
    "workbook_corpus": {
      "cells": 124,
      "matched": 124
    }
  },
  "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_more.rs#L42-L44"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/rounding_more::three",
        "ported/ceiling_floor_family::excel_quotient",
        "ported/ceiling_floor_family::normalize_zero",
        "ported/ceiling_floor_family::floor_math_kernel"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/rounding_more.rs#L42-L44",
      "state": "differs",
      "suite": null,
      "summary": "Refuses 12 of 1,486 recorded calls; the rest match"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.FLOOR.MATH.json",
  "name": "FLOOR.MATH",
  "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\n- **`FLOOR.PRECISE`** — the same function without the `mode` argument,\n  documented as always returning the mathematical floor irrespective of both signs. It should\n  therefore equal `FLOOR.MATH` with `mode` omitted, on every input. Whether it does bitwise —\n  including at a zero significance, where only `FLOOR.PRECISE`'s page documents an answer — is\n  the natural cross-surface probe.\n- **`FLOOR`** — the legacy member. It rounds toward zero for negative numbers with negative\n  significance and errors when the signs of the two arguments differ. Replacing `FLOOR` with\n  `FLOOR.MATH` in an existing workbook changes results on negative arguments and removes an\n  error; that is a migration hazard, not a bug fix.\n- **`CEILING.MATH`, `CEILING.PRECISE`, `CEILING`, `ISO.CEILING`** — the upward mirror of the\n  same family, sharing the implementing module. `ISO.CEILING` and `CEILING.PRECISE` are the\n  toward-`+∞` pair.\n- **`INT`** — `INT(x)` is the floor to integers, toward `-∞`, and coincides with\n  `FLOOR.MATH(x)` at the default significance in the default mode. `TRUNC(x)` is the\n  toward-zero reading and coincides with the other mode.\n- **`MROUND`** — nearest multiple rather than lower multiple; it disagrees with this function\n  on the upper half of every step.\n- **`ROUNDDOWN`** — toward zero to a *digit position* rather than to a multiple; the same\n  direction convention as the non-default mode, on a decimal grid.\n- **[EVEN](FUNC.EVEN.md)** — a fixed-step rounding away from zero, for contrast: the worksheet's\n  rounding functions do not share one direction convention, and this family is where the\n  convention is made an explicit argument.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\nThe rule is exact arithmetic; the implementation is not, and the gap between them is this\npage's real content.\n\n**The naive op-graph fails, and it fails visibly.** Computing `s · floor(x / s)` in binary64\nperforms two roundings around an exact operation:\n\n1. `x / s` rounds. If the true quotient is an integer but the rounded quotient falls a hair\n   below it, `floor` drops an entire step.\n2. `floor` is exact — an IEEE 754 `roundToIntegral` operation.\n3. `s · q` rounds again, so the result need not be an exact multiple of `s` even when the\n   mathematics says it is.\n\nStep 1 is the damaging one, and it is not a rare edge case. Working the naive op-graph through\nin binary64 (this is arithmetic, not a claim about Excel):\n\n| Input | True quotient | Computed quotient | Naive result | Mathematical answer |\n|---|---|---|---|---|\n| `x = 0.29, s = 0.01` | 29 | just below 29 | `0.28` | `0.29` |\n| `x = 6.6, s = 1.1` | 6 | just below 6 | `5.5` | `6.6` |\n| `x = 4.35, s = 0.05` | 87 | just below 87 | `4.3` | `4.35` |\n\nIn each row the naive route returns a value **one whole step too low**, because the decimal\nsignificance is not a binary64 value and the quotient of two rounded decimals lands just under\nthe integer it should be. A user who thinks of the significance as \"cents\" or \"tenths\" sees the\nfunction skip a tread. This is the classic complaint about every floor-to-a-multiple function in\nevery spreadsheet, and it is arithmetic rather than a defect in the rule.\n\n**What a careful implementation does about it.** There is no single accepted answer, and the\nchoice is a decision to record rather than a neutral one:\n\n- **Exactness-preserving route**: use a fused multiply-add to compute the residual\n  `x - s·q` exactly and correct `q` by one when the residual has the wrong sign. This makes the\n  result the true floor of the *represented* values `x` and `s`, which is the defensible\n  mathematical position, and it still returns `0.28` for the first row above — because\n  `0.29/0.01` genuinely is less than 29 in the values the worksheet holds.\n- **Intent-preserving route**: apply a relative tolerance, treating a quotient within a few ulp\n  of an integer as that integer. This returns `0.29` and matches what users expect, at the cost\n  of no longer being a mathematical function of its inputs — there are then arguments where\n  `FLOOR.MATH(x, s) > x`.\n\nThese two routes disagree on a set of inputs that is easy to enumerate, and **the Handbook has\nnot determined which one Excel takes.** That is the most valuable open question on this page,\nbecause the answer changes results in the second decimal place of ordinary financial formulas,\nnot in the last bit.\n\n**Power-of-two significances.** When `s` is a power of two, `x/s` and `s·q` are both exact in the\nnaive op-graph. That does not show such a significance is safe: `FLOOR`'s readings refute it\n(FN-FLOOR-002 and [FLOOR](FUNC.FLOOR.md)), and `FLOOR.MATH` itself is untested.\n\n**A note on `mode` and negative zero.** In the toward-zero reading, a negative argument in\n`(-s, 0)` maps to zero. Whether that zero carries a sign is not documented and is visible\nthrough `1/FLOOR.MATH(-0.5, 1, 1)`.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns `Number`.\n\n- **`significance` omitted** — documented default 1, so the function is a plain floor.\n- **`significance` negative** — the absolute value is used; the sign of the significance does\n  not flip the direction. This is the design difference from the legacy `FLOOR`, which errors\n  when the two signs disagree.\n- **`significance` zero** — not documented on this page. The mathematical expression divides by\n  it. `FLOOR.PRECISE`'s page documents that a zero in either position gives zero; whether\n  `FLOOR.MATH` shares that convention is unchecked.\n- **`number` zero** — zero is a multiple of everything, so the answer is zero.\n- **Exact multiples** — unchanged, in both modes.\n- **Very large `number`** — above `2^53` the spacing of doubles exceeds 1, so with the default\n  significance the function is the identity; with a small significance it still is, because no\n  multiple of a small `s` lies strictly between two adjacent doubles up there.\n- **Non-integer `significance`** — the interesting case, and the one where the answer depends on\n  arithmetic rather than on the rule. See the numerical notes.\n\n\n\n### Errors\n\n\nMicrosoft's `FLOOR.MATH` page documents no error conditions. That is itself notable: the legacy\n`FLOOR` documents `#NUM!` for mismatched signs, and `FLOOR.MATH` was introduced precisely to remove\nthat restriction. Legacy `FLOOR` also gives `#DIV/0!` for a zero significance with a nonzero number\n(FN-FLOOR-001), which Microsoft's pages do not say. What a zero significance does in `FLOOR.MATH`\nthe page does not say, and it is untested.\n\nNon-numeric arguments surface `#VALUE!` under the shared call model, and error values\npropagate. The mechanically rendered battery beside this page shows the boundary probes.\n\n\n",
    "sources": "- Handbook evidence record `EV-STRUCT-0011` — named here only to state that this surface appears\n  inside its group listing and **not** as a subject; its figures may not be attributed here.\n- IEEE 754-2019 — `roundToIntegral` and the exactness of power-of-two scaling.\n- Muller et al., *Handbook of Floating-Point Arithmetic*; Kahan's lecture notes — composing\n  roundings and the failure of naive grid arithmetic.\n- Handbook, `FLOOR.PRECISE` and [EVEN](FUNC.EVEN.md);\n  [Coercion and lifting](../model/02-coercion-and-lifting.md).\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,362 |\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.FLOOR.MATH.json).",
    "what-it-does": "\n`FLOOR.MATH(number, [significance], [mode])` rounds *number* **down** to a multiple of\n*significance*, with *mode* selecting what \"down\" means for negative numbers.\n\nThe mathematics is one line. For a nonzero significance `s`, the mathematical floor to a\nmultiple is\n\n    floor_to_multiple(x, s) = ABS(s) · floor( x / ABS(s) )\n\nwhich is the largest multiple of `ABS(s)` not exceeding `x`. That is the toward-`-∞` reading,\nand it is what Microsoft documents as the default: a positive number with a fractional part\nloses it, and a negative number moves further from zero.\n\nThe mode argument selects the other reading for negative arguments — the toward-zero\ntruncation:\n\n    trunc_to_multiple(x, s) = sign(x) · ABS(s) · floor( ABS(x) / ABS(s) )\n\nThe two agree on every non-negative argument and on every exact multiple. They differ only on\nnegative arguments that are not multiples, where one gives the mathematical floor and the other\ngives truncation toward zero.\n\n| Property | Statement (for the default toward-`-∞` reading) |\n|---|---|\n| Domain | all real `x`, all real `s` |\n| Range | multiples of `ABS(s)` |\n| Idempotent | applying it twice changes nothing |\n| Monotone | non-decreasing in `x` |\n| Bound | `result ≤ x`, with equality exactly at the multiples |\n| Sign of `s` | ignored — the absolute value of the significance is used |\n| Fixed points | the multiples of `ABS(s)` |\n| Relation to `INT` | `FLOOR.MATH(x)` with default significance is `INT(x)` in the toward-`-∞` reading |\n\n\n\n### Arguments\n\n\n| Argument | Meaning | Default (as documented) |\n|---|---|---|\n| `number` | The value to round down. Required. | — |\n| `significance` | The multiple to round to. Optional. | 1 |\n| `mode` | The direction, toward or away from zero, used for negative numbers. Optional. | see the note below |\n\nThe pinned catalogue supplies `FLOOR.MATH(number, [significance], [mode])`: one required argument and two optional arguments.\n\n"
  },
  "signature": {
    "display": "FLOOR.MATH(number, [significance], [mode])",
    "parameters": [
      {
        "description": null,
        "name": "number",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "significance",
        "optional": true,
        "repeats": false
      },
      {
        "description": null,
        "name": "mode",
        "optional": true,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 3,
        "min": 1
      },
      "category": "Math and trigonometry 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": "Number rounded down to a multiple of the significance, with a choice of direction for negative numbers",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Rounds a number down, to the nearest integer or to the nearest multiple of significance",
        "microsoft_url": "https://support.microsoft.com/en-us/office/floor-math-function-c302b599-fbdb-4177-ba19-2c2b1249a2f5"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "bg-BG",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "cs-CZ",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "da-DK",
          "name": "AFRUND.BUND.MAT"
        },
        {
          "locale": "de-DE",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "el-GR",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "en-AU",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "en-GB",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "en-US",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "es-ES",
          "name": "MULTIPLO.INFERIOR.MAT"
        },
        {
          "locale": "et-EE",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "fi-FI",
          "name": "PYÖRISTÄ.KERR.ALAS.MATEMAATTINEN"
        },
        {
          "locale": "fr-FR",
          "name": "PLANCHER.MATH*"
        },
        {
          "locale": "he-IL",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "hr-HR",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "hu-HU",
          "name": "PADLÓ.MAT"
        },
        {
          "locale": "id-ID",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "it-IT",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "ja-JP",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "ko-KR",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "lt-LT",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "lv-LV",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "nb-NO",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "nl-NL",
          "name": "AFRONDEN.BENEDEN.WISK"
        },
        {
          "locale": "pl-PL",
          "name": "ZAOKR.W.DÓŁ.MATEMATYCZNE"
        },
        {
          "locale": "pt-BR",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "pt-PT",
          "name": "ARRED.DEFEITO.MAT"
        },
        {
          "locale": "ro-RO",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "ru-RU",
          "name": "ОКРВНИЗ.МАТ"
        },
        {
          "locale": "sk-SK",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "sl-SI",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "sv-SE",
          "name": "RUNDA.NER.MATEMATISKT"
        },
        {
          "locale": "th-TH",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "tr-TR",
          "name": "TABANAYUVARLA.MATEMATİK"
        },
        {
          "locale": "uk-UA",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "vi-VN",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "zh-CN",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "zh-HK",
          "name": "FLOOR.MATH"
        },
        {
          "locale": "zh-TW",
          "name": "FLOOR.MATH"
        }
      ],
      "signature": {
        "display": "FLOOR.MATH(number, [significance], [mode])",
        "parameters": [
          {
            "description": null,
            "name": "number",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "significance",
            "optional": true,
            "repeats": false
          },
          {
            "description": null,
            "name": "mode",
            "optional": true,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "FLOOR.MATH",
      "version_marker": null,
      "xlcall": {
        "code": "592",
        "symbol": "xlfFloor_math"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/floor-math-function-c302b599-fbdb-4177-ba19-2c2b1249a2f5"
  },
  "try_it": {
    "formula": "=FLOOR.MATH(0.29, 0.01)"
  },
  "url": "https://handbook.dnacalc.com/functions/FLOOR.MATH.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "1,362 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.FLOOR.MATH.json"
      ]
    }
  ]
}