{
  "category": "Date and time functions",
  "display_name": "MONTH",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.MONTH",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 10153,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 10153,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 10,153 in the answer bank and 4 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 10,157 recorded answers",
    "workbook_corpus": {
      "cells": 4,
      "matched": 4
    }
  },
  "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/dates.rs#L239-L241"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/dates::environment",
        "catalogue/dates::system",
        "catalogue/dates::to_1900",
        "catalogue/dates::date_arg",
        "catalogue/dates::of_date",
        "ported/date_kernels::days_from_civil",
        "ported/date_kernels::civil_from_days",
        "ported/date_kernels::ymd_1900",
        "ported/date_kernels::serial_to_ymd"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/dates.rs#L239-L241",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 10,157 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.MONTH.json",
  "name": "MONTH",
  "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- **[YEAR](FUNC.YEAR.md), [DAY](FUNC.DAY.md)** — the other two projections; together they invert\n  [DATE](FUNC.DATE.md).\n- **[EOMONTH](FUNC.EOMONTH.md)** — the natural companion when the question is \"the end of *this*\n  month\". `DATE(YEAR(s), MONTH(s)+1, 0)` is the classic hand-rolled equivalent, and relies on\n  `DATE`'s day-0 rollover rather than on `MONTH` itself.\n- **[EDATE](FUNC.EDATE.md)** — month *offsetting*, which is a different operation from month\n  *extraction* and is frequently confused with `MONTH`-based arithmetic. `DATE(YEAR(s),\n  MONTH(s)+1, DAY(s))` and `EDATE(s,1)` are believed to disagree at end-of-month — the former\n  rolls 31 January into 3 March by `DATE`'s documented day carry, while `EDATE` is generally\n  understood to clamp. `EDATE`'s Microsoft page does not state the clamping rule, and this\n  Handbook has not verified it.\n- **[DATEDIF](FUNC.DATEDIF.md)** with unit `\"M\"` — complete months *between* two dates, which is\n  not a difference of `MONTH` values.\n\n\n",
    "how-to-implement": "\n### Notes for implementers\n\n1. **Floor before mapping**, for the same reason as [YEAR](FUNC.YEAR.md): truncation and flooring\n   disagree precisely in the region the range check is meant to reject.\n3. **Never format inside the kernel.** The month number is the value; month names belong to the\n   presentation layer and to `TEXT`.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns a `Number` in 1…12.\n\n- **Fractional serials** are floored; the time of day is irrelevant.\n- **The phantom days.** Serial 0 (\"0 January 1900\") and serial 60 (the non-existent 29 February\n  1900) both live inside months that do exist, so `MONTH` returns an unremarkable 1 and 2\n  respectively under any consistent reading. `MONTH` is therefore the least diagnostic member of\n  the decomposition trio for the leap-year artefact — but it is also the one whose *neighbours*\n  reveal it: `MONTH(59)`, `MONTH(60)` and `MONTH(61)` should read 2, 2, 3.\n- **Out-of-range serials.** Negative serials are the documented `#NUM!` case. The upper end is\n  discussed under \"What has not been checked\".\n\n\n\n### Errors\n\n\nAs documented for this category:\n\n- `#NUM!` when `serial_number` is out of range for the workbook's date-base value.\n- `#VALUE!` when the argument will not convert to a number — the ordinary coercion outcome rather\n  than a rule specific to `MONTH`.\n- An error argument propagates.\n\n\n",
    "sources": "\n- Microsoft 365 support, **MONTH function** —\n  <https://support.microsoft.com/en-us/office/month-function-579a2881-199b-48b2-ab90-ddba0eba86e8>.\n- [FUNC.DATE](FUNC.DATE.md) — serial-number model, leap-year artefact, 1900/1904 systems.\n- Handbook call-model chapter [02 coercion and lifting](../model/02-coercion-and-lifting.md).\n- `data/functions/FUNC.MONTH.json`, `data/presence/FUNC.MONTH.json`,\n  `data/battery/FUNC.MONTH.json`.\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 | 10,153 |\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.MONTH.json).",
    "what-it-does": "\n`MONTH` projects a date serial onto its month-of-year component: it discards the fractional part,\nmaps `⌊serial⌋` to a calendar day under the workbook's date system (see\n[FUNC.DATE](FUNC.DATE.md)), and returns that day's month as an integer from 1 (January) to 12\n(December).\n\nThere is no month arithmetic here and no locale sensitivity: the result is a number, never a month\n*name*. Producing \"January\" is the `TEXT` function's job, and it is locale-dependent where `MONTH`\nis not.\n\n\n\n### Arguments\n\n\n`MONTH(serial_number)` — one required argument, the date whose month is wanted.\n\nMicrosoft's guidance for the whole category applies: supply the date as a serial — from\n[DATE](FUNC.DATE.md), from another formula, or from a cell that already holds a date — rather than\nas text, because text dates depend on the locale's date order and can be misread. Coercion of the\nargument follows the ordinary scalar rules in\n[coercion and lifting](../model/02-coercion-and-lifting.md).\n\n\n"
  },
  "signature": {
    "display": "MONTH(serial_number)",
    "parameters": [
      {
        "description": null,
        "name": "serial_number",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 1,
        "min": 1
      },
      "category": "Date and time 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": "Month (1 to 12) of a date",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Converts a serial number to a month",
        "microsoft_url": "https://support.microsoft.com/en-us/office/month-function-579a2881-199b-48b2-ab90-ddba0eba86e8"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "MONTH"
        },
        {
          "locale": "bg-BG",
          "name": "MONTH"
        },
        {
          "locale": "cs-CZ",
          "name": "MĚSÍC"
        },
        {
          "locale": "da-DK",
          "name": "MONTH"
        },
        {
          "locale": "de-DE",
          "name": "MONTH"
        },
        {
          "locale": "el-GR",
          "name": "MONTH"
        },
        {
          "locale": "en-AU",
          "name": "MONTH"
        },
        {
          "locale": "en-GB",
          "name": "MONTH"
        },
        {
          "locale": "en-US",
          "name": "MONTH"
        },
        {
          "locale": "es-ES",
          "name": "MONTH"
        },
        {
          "locale": "et-EE",
          "name": "KUU"
        },
        {
          "locale": "fi-FI",
          "name": "KUUKAUSI"
        },
        {
          "locale": "fr-FR",
          "name": "MONTH"
        },
        {
          "locale": "he-IL",
          "name": "MONTH"
        },
        {
          "locale": "hr-HR",
          "name": "MONTH"
        },
        {
          "locale": "hu-HU",
          "name": "MONTH"
        },
        {
          "locale": "id-ID",
          "name": "MONTH"
        },
        {
          "locale": "it-IT",
          "name": "MONTH"
        },
        {
          "locale": "ja-JP",
          "name": "MONTH"
        },
        {
          "locale": "ko-KR",
          "name": "MONTH"
        },
        {
          "locale": "lt-LT",
          "name": "MONTH"
        },
        {
          "locale": "lv-LV",
          "name": "MONTH"
        },
        {
          "locale": "nb-NO",
          "name": "MÅNED"
        },
        {
          "locale": "nl-NL",
          "name": "MONTH"
        },
        {
          "locale": "pl-PL",
          "name": "MONTH (miesiąc)"
        },
        {
          "locale": "pt-BR",
          "name": "MONTH"
        },
        {
          "locale": "pt-PT",
          "name": "MÊS"
        },
        {
          "locale": "ro-RO",
          "name": "MONTH"
        },
        {
          "locale": "ru-RU",
          "name": "MONTH"
        },
        {
          "locale": "sk-SK",
          "name": "MESIAC"
        },
        {
          "locale": "sl-SI",
          "name": "MESEC"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "MESEC"
        },
        {
          "locale": "sv-SE",
          "name": "MONTH"
        },
        {
          "locale": "th-TH",
          "name": "เดือน"
        },
        {
          "locale": "tr-TR",
          "name": "AY"
        },
        {
          "locale": "uk-UA",
          "name": "МІСЯЦЬ"
        },
        {
          "locale": "vi-VN",
          "name": "MONTH"
        },
        {
          "locale": "zh-CN",
          "name": "MONTH"
        },
        {
          "locale": "zh-HK",
          "name": "MONTH"
        },
        {
          "locale": "zh-TW",
          "name": "MONTH"
        }
      ],
      "signature": {
        "display": "MONTH(serial_number)",
        "parameters": [
          {
            "description": null,
            "name": "serial_number",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "MONTH",
      "version_marker": null,
      "xlcall": {
        "code": "68",
        "symbol": "xlfMonth"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/month-function-579a2881-199b-48b2-ab90-ddba0eba86e8"
  },
  "try_it": {
    "formula": "=MONTH(45000)"
  },
  "url": "https://handbook.dnacalc.com/functions/MONTH.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "10,153 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.MONTH.json"
      ]
    }
  ]
}