{
  "category": "Statistical functions",
  "display_name": "MIN",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.MIN",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1212,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 1212,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 1,212 in the answer bank and 18 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,230 recorded answers",
    "workbook_corpus": {
      "cells": 19,
      "matched": 18,
      "pending": 1
    }
  },
  "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/aggregate.rs#L113-L113"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/aggregate::aggregate",
        "catalogue/aggregate::min",
        "catalogue/aggregate::extreme",
        "catalogue/aggregate::holds_held_arrays",
        "catalogue/aggregate::read_held_references",
        "catalogue/aggregate::number_of",
        "catalogue/aggregate::each_value",
        "catalogue/aggregate::read_values",
        "catalogue/aggregate::reader",
        "catalogue/aggregate::read_reference",
        "catalogue/comparison::overflow_numbers",
        "catalogue/comparison::numbers",
        "catalogue/comparison::in_band",
        "catalogue/comparison::Rounded::up",
        "catalogue/comparison::Roundings::of",
        "catalogue/comparison::Roundings::disjoint",
        "decimal::low32",
        "decimal::Natural::from_u64",
        "decimal::Natural::pow10",
        "decimal::Natural::normalize",
        "decimal::Natural::is_zero",
        "decimal::Natural::mul_add_small",
        "decimal::Natural::times_pow10",
        "decimal::Natural::times_pow5",
        "decimal::Natural::times_pow2",
        "decimal::ExactDecimal::binary"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/aggregate.rs#L113-L113",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,230 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.MIN.json",
  "name": "MIN",
  "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- **[MAX](FUNC.MAX.md)** — the exact mirror. Same argument shape, same documented coercion\n  table, same documented `0`. Any behavioural difference beyond the comparator is a defect in\n  one of them, which makes cross-testing the pair unusually productive.\n- **[MINA](FUNC.MINA.md)** — the variant counting text and logicals in references, named by\n  `MIN`'s own documentation. On `MINA` the zero-conversion trap is at its worst: any text in an\n  all-positive column pulls the minimum to `0`.\n- **[MINIFS](FUNC.MINIFS.md)** — the conditional form, which returns `0` when nothing matches —\n  the same convention, with the same all-positive-data hazard.\n- **[SMALL](FUNC.SMALL.md)** — the general order-statistic selector; `SMALL(array, 1)` is the\n  minimum over the same admitted set, but `SMALL` errors on an empty array instead of returning\n  zero. The `MIN`/`SMALL` pair is the cleanest illustration of two functions computing the same\n  thing with different empty-set conventions, and `SMALL` is the safer of the two when \"no\n  data\" must not be confused with \"zero\".\n- **[DMIN](FUNC.DMIN.md)** — the database-family minimum with criteria-range selection.\n- **[SUBTOTAL](FUNC.SUBTOTAL.md)** (function numbers 5 and 105) and\n  **[AGGREGATE](FUNC.AGGREGATE.md)** (function number 5) — the filter-aware and error-skipping\n  minima. `AGGREGATE` is the only route to a minimum that ignores error values.\n- **Confused with:** `MIN` and `SMALL` on ranges containing text (same scan policy, so they\n  should agree); and with the belief that an empty `MIN` is an error, which the documentation\n  contradicts.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\n`MIN` has no arithmetic and therefore no rounding error. Three questions remain, and all three\nare about definition.\n\n**1. The comparison predicate.** A minimum needs a total order. IEEE-754 `<` is one on the\ndoubles Excel can hold, except that `+0` and `−0` compare equal; Excel has no NaN in its\npublished value universe, so the NaN-poisoning problem does not arise at this level. Whether\nExcel's `MIN` uses raw `<` or the tolerant truncation-style 15-significant-digit comparison it\napplies in some other families is open. The consequence is limited to which of two equal-\ncomparing representations is returned, but it is observable.\n\n**3. The empty-set identity.** Mathematically `min ∅ = +∞`, which Excel cannot represent, so\nthe specification substitutes `0`. As argued above, the substitution is directional in its\nharm: `0` is a *lower* bound for most real spreadsheet data, so an empty `MIN` does not merely\ngive a wrong answer, it gives an answer that dominates every correct one downstream.\n\nFor an implementer, the rule follows directly: initialise with a **found flag** plus a\nsentinel, never with `0` and never with `f64::INFINITY` alone. `0` is wrong for all-positive\ndata; `+∞` produces a value outside Excel's value universe. Track \"have I seen a number\"\nseparately from \"what is the best so far\", and apply the documented zero only at the end. The\nsame advice appears on [MAX](FUNC.MAX.md) and is worth repeating because the two functions are\nusually implemented by the same person on the same afternoon and the mirror case is easy to\nget subtly different.\n\n\n",
    "quirks": "\n### The two coercion policies\n\n\nQuoted from Microsoft's `MIN` page, which states the split in consecutive sentences:\n\n- \"Arguments can either be numbers or names, arrays, or references that contain numbers.\"\n- \"Logical values and text representations of numbers that you type directly into the list of\n  arguments are counted.\"\n- \"If an argument is an array or reference, only numbers in that array or reference are used.\n  Empty cells, logical values, or text in the array or reference are ignored.\"\n- \"If the arguments contain no numbers, MIN returns 0.\"\n- \"Arguments that are error values or text that cannot be translated into numbers cause\n  errors.\"\n\nAs a table:\n\n| Value | Typed **directly** into the argument list | Reached inside an **array or reference** |\n|---|---|---|\n| Number | counted | counted |\n| `TRUE` / `FALSE` | counted (as 1 / 0) | **ignored** |\n| Text that reads as a number | counted | **ignored** |\n| Text that does not read as a number | **error** | ignored |\n| Empty cell | — | ignored |\n| Error value | error | error |\n\nThis is word-for-word the [MAX](FUNC.MAX.md) table with the comparator reversed, which is how\nit should be: the two functions are documented to differ in nothing but direction. Microsoft's\npage names the same remedy for wanting more values counted: \"If you want to include logical\nvalues and text representations of numbers in a reference as part of the calculation, use the\nMINA function.\" See [MINA](FUNC.MINA.md), and read its rules before switching.\n\n\n\n### Result and edge cases\n\n\nReturns `Number`.\n\n- **No numbers among the arguments.** Microsoft documents: \"If the arguments contain no\n  numbers, MIN returns 0.\" So `MIN` over a wholly blank range is documented to be `0`.\n\n  **Why it matters more on `MIN` than on `MAX`.** The documented `0` is not below the data; it\n  is inside the plausible range. On all-**positive** data — prices, distances, durations,\n  counts, every quantity a spreadsheet is usually full of — an empty range makes `MIN` return\n  `0`, which is smaller than every real value and therefore wins every subsequent comparison.\n  A minimum-of-minimums over several columns reports `0` the moment one column is empty. The\n  symmetric failure for `MAX` needs all-negative data, which is rarer. `MIN(MIN(A), MIN(B)) ≠\n  MIN(A ∪ B)` whenever one side is empty and the other is entirely positive, and that is the\n  common case rather than the exotic one.\n\n- **A single value.** `MIN(x)` is `x`, for the largest finite double and the smallest subnormal\n  alike.\n- **`+0` and `−0`** compare equal under IEEE, so which representation is returned is\n  unspecified and observable through `1/MIN(...)`. Unverified.\n- **Arrays** are consumed by scanning, not lifted elementwise.\n- **Dates and times** are numbers wearing formats, so `MIN` over a date column is the earliest\n  date.\n\n\n\n### Errors\n\nThere is no documented `#NUM!` or `#N/A` condition, and no documented empty-input error — the\ndocumented empty-input answer is `0`.\n\n\n",
    "sources": "- Handbook [MAX](FUNC.MAX.md) — the mirror surface and the shared empty-set divergence finding.\n- Handbook [The value universe](../model/01-value-universe.md) — the absence of infinities from\n  the published value gamut.\n- Handbook projections `data/functions/FUNC.MIN.json` (arity 1–255, `xlfMin` code 6,\n  `AggregateDirectAndRangeDualPolicy`, `ReductionFold`, `SequentialLeftFold`,\n  `CanonicalExcelLegacy` error algebra) and `data/presence/FUNC.MIN.json` (module `min_fn.rs`,\n  unshared, no defect stream named).\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,212 |\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.MIN.json).",
    "what-it-does": "\n`MIN(number1, [number2], …)` returns the smallest of the numeric values it admits.\n\nMathematically this is the bottom order statistic `x₍₁₎ = min{x₁ … xₙ}` — the infimum of a\nfinite set, attained, and therefore one of the inputs. `MIN` is a **selector**: it performs no\narithmetic, introduces no rounding error, and returns bits it was given.\n\n`min` is associative, commutative and idempotent with identity `+∞`, so it is a monoid fold —\nand, as with [MAX](FUNC.MAX.md), the identity is the one thing Excel cannot represent, so the\nspecification substitutes a value. Microsoft's choice is `0`, and on `MIN` that choice is more\nconsequential than on `MAX`; see below.\n\n\n### Arguments\n\n\n| Argument | Meaning | Notes |\n|---|---|---|\n| `number1` | The first value | See the note below |\n| `number2, …` | Further values | Optional |\n\nMicrosoft's page states: \"Number1 is optional, subsequent numbers are optional. 1 to 255\nnumbers for which you want to find the minimum value.\"\n\nArgument boundaries carry no meaning: `MIN(A1:A10)`, `MIN(A1:A5, A6:A10)` and\n`MIN(A1, …, A10)` all reduce over one pooled set.\n\n\n"
  },
  "signature": {
    "display": "MIN(number1, [number2], ...)",
    "parameters": [
      {
        "description": null,
        "name": "number1",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "number2",
        "optional": true,
        "repeats": true
      }
    ],
    "trailing_repeats": true
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 255,
        "min": 1
      },
      "category": "Statistical functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "AggregateDirectAndRangeDualPolicy",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "ReductionFold",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "NumsToNum",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Smallest of the numbers",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the minimum value in a list of arguments",
        "microsoft_url": "https://support.microsoft.com/en-us/office/min-function-61635d12-920f-4ce2-a70f-96f202dcc152"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "MIN"
        },
        {
          "locale": "bg-BG",
          "name": "MIN"
        },
        {
          "locale": "cs-CZ",
          "name": "MIN"
        },
        {
          "locale": "da-DK",
          "name": "MIN"
        },
        {
          "locale": "de-DE",
          "name": "MIN"
        },
        {
          "locale": "el-GR",
          "name": "MIN"
        },
        {
          "locale": "en-AU",
          "name": "MIN"
        },
        {
          "locale": "en-GB",
          "name": "MIN"
        },
        {
          "locale": "en-US",
          "name": "MIN"
        },
        {
          "locale": "es-ES",
          "name": "MIN"
        },
        {
          "locale": "et-EE",
          "name": "MIN"
        },
        {
          "locale": "fi-FI",
          "name": "MIN"
        },
        {
          "locale": "fr-FR",
          "name": "MIN"
        },
        {
          "locale": "he-IL",
          "name": "MIN"
        },
        {
          "locale": "hr-HR",
          "name": "MIN"
        },
        {
          "locale": "hu-HU",
          "name": "MIN"
        },
        {
          "locale": "id-ID",
          "name": "MIN"
        },
        {
          "locale": "it-IT",
          "name": "MIN"
        },
        {
          "locale": "ja-JP",
          "name": "MIN"
        },
        {
          "locale": "ko-KR",
          "name": "MIN"
        },
        {
          "locale": "lt-LT",
          "name": "MIN"
        },
        {
          "locale": "lv-LV",
          "name": "MIN"
        },
        {
          "locale": "nb-NO",
          "name": "MIN"
        },
        {
          "locale": "nl-NL",
          "name": "MIN"
        },
        {
          "locale": "pl-PL",
          "name": "MIN"
        },
        {
          "locale": "pt-BR",
          "name": "MÍN"
        },
        {
          "locale": "pt-PT",
          "name": "MIN"
        },
        {
          "locale": "ro-RO",
          "name": "MIN"
        },
        {
          "locale": "ru-RU",
          "name": "МИН"
        },
        {
          "locale": "sk-SK",
          "name": "MIN"
        },
        {
          "locale": "sl-SI",
          "name": "MIN"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "MIN"
        },
        {
          "locale": "sv-SE",
          "name": "MIN"
        },
        {
          "locale": "th-TH",
          "name": "MIN"
        },
        {
          "locale": "tr-TR",
          "name": "MİN"
        },
        {
          "locale": "uk-UA",
          "name": "MIN"
        },
        {
          "locale": "vi-VN",
          "name": "MIN"
        },
        {
          "locale": "zh-CN",
          "name": "MIN"
        },
        {
          "locale": "zh-HK",
          "name": "MIN"
        },
        {
          "locale": "zh-TW",
          "name": "MIN"
        }
      ],
      "signature": {
        "display": "MIN(number1, [number2], ...)",
        "parameters": [
          {
            "description": null,
            "name": "number1",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "number2",
            "optional": true,
            "repeats": true
          }
        ],
        "trailing_repeats": true
      },
      "surface_name": "MIN",
      "version_marker": null,
      "xlcall": {
        "code": "6",
        "symbol": "xlfMin"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/min-function-61635d12-920f-4ce2-a70f-96f202dcc152"
  },
  "try_it": {
    "formula": "=MIN(\"3\", 5)"
  },
  "url": "https://handbook.dnacalc.com/functions/MIN.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "1,212 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.MIN.json"
      ]
    }
  ]
}