{
  "category": "Statistical functions",
  "display_name": "MAXA",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.MAXA",
  "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 16 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,228 recorded answers",
    "workbook_corpus": {
      "cells": 16,
      "matched": 16
    }
  },
  "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#L116-L116",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/aggregate.rs#L277-L283"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/aggregate::aggregate",
        "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#L116-L116",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,228 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.MAXA.json",
  "name": "MAXA",
  "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- **[MAX](FUNC.MAX.md)** — the numbers-only sibling, and the function whose own documentation\n  names `MAXA` as the remedy for wanting logicals and numeric text counted. Read both coercion\n  tables side by side before choosing; they differ on four rows.\n- **[MINA](FUNC.MINA.md)** — the mirror. Note that the sign asymmetry is worse for `MINA`: text\n  and `FALSE` converting to `0` puts a *ceiling* of zero on `MINA` over all-positive data,\n  which is the more frequently encountered version of the trap.\n- **The rest of the `A` suffix family**: [AVERAGEA](FUNC.AVERAGEA.md),\n  [COUNTA](FUNC.COUNTA.md), [STDEVA](FUNC.STDEVA.md), [STDEVPA](FUNC.STDEVPA.md),\n  `VARA`, `VARPA`. These share an *intent* — count more kinds of\n  value — and do **not** share one uniform rule. `COUNTA` in particular counts anything\n  non-empty including text, without converting it. Each page states its own table; do not\n  generalise from this one.\n- **[LARGE](FUNC.LARGE.md)** — the order-statistic selector, numbers only.\n- **Confused with:** `MAX`, in both directions. A workbook that switched from `MAX` to `MAXA`\n  to \"make it handle the text cells\" has changed the answer on every column containing text,\n  usually by clamping it at zero.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\nThere is no floating-point arithmetic in `MAXA` beyond the conversions, so there is no\nrounding error to analyse. Three implementation observations are worth recording anyway.\n\n**The empty-set identity is `0`, and it is not `−∞`.** The same associativity trap described on\nthe [MAX](FUNC.MAX.md) page applies here and is *worse*, because `MAXA` reaches `0` through two\nindependent routes — the no-values rule and the text-converts-to-zero rule. A hierarchical\ncomputation that takes `MAXA` of column `MAXA`s over all-negative data will report `0` if any\ncolumn is empty *or* contains any text. An implementer should track \"have I seen an admissible\nvalue\" as a separate flag from the running best, and must not initialise the accumulator to\n`0`.\n\n",
    "quirks": "\n### The coercion table, and a contradiction in it\n\n\nRead as a table, Microsoft's rules give:\n\n| Value | Typed **directly** into the argument list | Reached inside an **array or reference** |\n|---|---|---|\n| Number | counted | counted |\n| `TRUE` | counted as 1 | counted as 1 |\n| `FALSE` | counted as 0 | counted as 0 |\n| Text that reads as a number | counted as its numeric value | **see below** |\n| Text that does not read as a number | **error** | **see below** |\n| Empty cell | — | ignored |\n| Error value | error | error |\n\n**The two \"see below\" cells are a documented contradiction, and the Handbook publishes it as a\nfinding rather than choosing a side.** Microsoft's own page says both of the following about\ntext inside a reference:\n\n1. \"Arguments that contain text or FALSE evaluate as 0 (zero).\"\n2. \"Empty cells and text values in the array or reference are ignored.\"\n\nThese cannot both hold for text in a reference. If text evaluates as `0` it is counted and\ndrags the maximum up toward zero; if it is ignored it contributes nothing and the maximum of an\nall-negative column stays negative. The two readings differ on exactly the case that\ndistinguishes `MAXA` from `MAX`, and they differ in the sign of the answer.\n\nThe Handbook has not observed which reading Excel implements, and does not assert one from\nmemory. What can be said:\n\n- Rule 1 is the one that gives `MAXA` a reason to exist as a separate function; under rule 2\n  applied to text, `MAXA` and `MAX` would differ only on logicals in references.\n- The `A`-suffix family's stated purpose — Microsoft's `MAX` page points at `MAXA` as the way\n  to \"include logical values and text representations of numbers in a reference as part of the\n  calculation\" — is consistent with rule 1.\n- Nothing in the Handbook's record settles it, and the probe is one cell wide. It is first on\n  the list below.\n\n\n\n### Result and edge cases\n\n\nReturns `Number`. Unlike `MAX`, the result need not be one of the input values, because text\nand `FALSE` are converted rather than selected.\n\n- **An all-text column.** Under rule 1 above the answer is `0`; under rule 2 it is the\n  no-values case, which is also `0`. The two readings happen to coincide here, which is why\n  this input does *not* discriminate between them. The discriminating input is an all-negative\n  numeric column with one text cell in it.\n- **`TRUE` in a reference** is counted as `1` — this part of the family's purpose is not in\n  dispute, and it is the cleanest observable difference from `MAX`.\n- **Arrays** are consumed by scanning, not lifted elementwise.\n\n\n\n### Errors\n\n\n| Error | Condition | Basis |\n|---|---|---|\n| `#VALUE!` | A directly-passed argument is text that cannot be translated into a number | Documented on Microsoft's `MAXA` page |\n| propagated | An argument is an error value | Documented (\"arguments that are error values … cause errors\") |\n\nThere is no documented `#NUM!` or `#DIV/0!` condition, and no documented empty-input error —\nthe documented empty-input answer is `0`.\n\n\n",
    "sources": "- Handbook [MAX](FUNC.MAX.md) — the numbers-only sibling and the shared empty-set divergence\n  finding.\n- Handbook [Coercion and lifting](../model/02-coercion-and-lifting.md) — the direct-argument\n  versus range-scan asymmetry.\n- Handbook projections `data/functions/FUNC.MAXA.json` (arity 1–255, `xlfMaxa` code 362,\n  `AggregateDirectAndRangeDualPolicy`, `ReductionFold`, `SequentialLeftFold`) and\n  `data/presence/FUNC.MAXA.json` (module `maxa_fn.rs`, 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.MAXA.json).",
    "what-it-does": "\n`MAXA(value1, [value2], …)` returns the largest value in a set, where **logical values and\ntext are converted to numbers rather than skipped**.\n\n- \"Arguments that contain TRUE evaluate as 1; arguments that contain text or FALSE evaluate as\n  0 (zero).\"\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 values in that array or reference are used.\n  Empty cells and text values in the array or reference are ignored.\"\n- \"If the arguments contain no values, MAXA returns 0 (zero).\"\n- \"Arguments that are error values or text that cannot be translated into numbers cause\n  errors.\"\n\nThe consequence that matters, and the reason the function exists: because text and `FALSE`\nconvert to `0` rather than being skipped, **`MAXA` can never return a negative number when any\ntext or `FALSE` is present in the data.** A column of negative measurements with one \"n/a\"\ntyped into it has `MAXA` equal to `0`, and the `0` is not in the data. `MAXA` is therefore not\na selector in the sense `MAX` is: its result need not be one of its inputs.\n\nThat is a feature when the zeros are meaningful — \"no reading\" genuinely means zero — and a\ntrap otherwise. It is the reason `MAXA` should be chosen deliberately rather than reached for\nas \"MAX but more inclusive\".\n\n\n\n### Arguments\n\n\n| Argument | Meaning | Notes |\n|---|---|---|\n| `value1` | The first value | Required |\n| `value2, …` | Further values | Optional; \"Number arguments 2 to 255\" |\n\nArgument boundaries carry no meaning; all slots pool into one reduction.\n\n\n"
  },
  "signature": {
    "display": "MAXA(value1, [value2], ...)",
    "parameters": [
      {
        "description": null,
        "name": "value1",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "value2",
        "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": "Largest value, counting text as 0 and logical values as 1 or 0",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the maximum value in a list of arguments, including numbers, text, and logical values",
        "microsoft_url": "https://support.microsoft.com/en-us/office/maxa-function-814bda1e-3840-4bff-9365-2f59ac2ee62d"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "MAXA"
        },
        {
          "locale": "bg-BG",
          "name": "MAXA"
        },
        {
          "locale": "cs-CZ",
          "name": "MAXA"
        },
        {
          "locale": "da-DK",
          "name": "MAKSV"
        },
        {
          "locale": "de-DE",
          "name": "MAXA"
        },
        {
          "locale": "el-GR",
          "name": "MAXA"
        },
        {
          "locale": "en-AU",
          "name": "MAXA"
        },
        {
          "locale": "en-GB",
          "name": "MAXA"
        },
        {
          "locale": "en-US",
          "name": "MAXA"
        },
        {
          "locale": "es-ES",
          "name": "MAXA"
        },
        {
          "locale": "et-EE",
          "name": "MAXA"
        },
        {
          "locale": "fi-FI",
          "name": "MAKSA"
        },
        {
          "locale": "fr-FR",
          "name": "MAXA*"
        },
        {
          "locale": "he-IL",
          "name": "MAXA"
        },
        {
          "locale": "hr-HR",
          "name": "MAXA"
        },
        {
          "locale": "hu-HU",
          "name": "MAXA"
        },
        {
          "locale": "id-ID",
          "name": "MAXA"
        },
        {
          "locale": "it-IT",
          "name": "MAXA"
        },
        {
          "locale": "ja-JP",
          "name": "MAXA"
        },
        {
          "locale": "ko-KR",
          "name": "MAXA"
        },
        {
          "locale": "lt-LT",
          "name": "MAXA"
        },
        {
          "locale": "lv-LV",
          "name": "MAXA"
        },
        {
          "locale": "nb-NO",
          "name": "MAKSA"
        },
        {
          "locale": "nl-NL",
          "name": "MAXA"
        },
        {
          "locale": "pl-PL",
          "name": "MAX.A"
        },
        {
          "locale": "pt-BR",
          "name": "MAXA"
        },
        {
          "locale": "pt-PT",
          "name": "MÁXIMOA"
        },
        {
          "locale": "ro-RO",
          "name": "MAXA"
        },
        {
          "locale": "ru-RU",
          "name": "МАКСА"
        },
        {
          "locale": "sk-SK",
          "name": "MAXA"
        },
        {
          "locale": "sl-SI",
          "name": "MAXA"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "MAXA"
        },
        {
          "locale": "sv-SE",
          "name": "MAXA"
        },
        {
          "locale": "th-TH",
          "name": "MAXA"
        },
        {
          "locale": "tr-TR",
          "name": "MAKA işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "MAXA"
        },
        {
          "locale": "vi-VN",
          "name": "MAXA"
        },
        {
          "locale": "zh-CN",
          "name": "MAXA"
        },
        {
          "locale": "zh-HK",
          "name": "MAXA"
        },
        {
          "locale": "zh-TW",
          "name": "MAXA"
        }
      ],
      "signature": {
        "display": "MAXA(value1, [value2], ...)",
        "parameters": [
          {
            "description": null,
            "name": "value1",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "value2",
            "optional": true,
            "repeats": true
          }
        ],
        "trailing_repeats": true
      },
      "surface_name": "MAXA",
      "version_marker": null,
      "xlcall": {
        "code": "362",
        "symbol": "xlfMaxa"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/maxa-function-814bda1e-3840-4bff-9365-2f59ac2ee62d"
  },
  "try_it": {
    "formula": "=MAXA(1)"
  },
  "url": "https://handbook.dnacalc.com/functions/MAXA.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.MAXA.json"
      ]
    }
  ]
}