{
  "category": "Date and time functions",
  "display_name": "DAYS360",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.DAYS360",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 4564,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 4564,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 4,564 in the answer bank and 7 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 4,571 recorded answers",
    "workbook_corpus": {
      "cells": 7,
      "matched": 7
    }
  },
  "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#L262-L270",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/date_kernels.rs#L319-L326",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/date_kernels.rs#L328-L354"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/dates::environment",
        "catalogue/dates::system",
        "catalogue/dates::to_1900",
        "catalogue/dates::date_arg",
        "ported/date_kernels::days_from_civil",
        "ported/date_kernels::civil_from_days",
        "ported/date_kernels::ymd_1900",
        "ported/date_kernels::is_leap",
        "ported/date_kernels::days_in_month",
        "ported/date_kernels::whole",
        "ported/date_kernels::ymd_of"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/dates.rs#L262-L270",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 4,571 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.DAYS360.json",
  "name": "DAYS360",
  "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- **[YEARFRAC](FUNC.YEARFRAC.md)** — carries the same two conventions as `basis` 0 (US 30/360) and\n  `basis` 4 (European 30/360), expressed as a fraction of a year rather than a day count.\n  `DAYS360(a, b, FALSE)/360` and `YEARFRAC(a, b, 0)` are the same quantity on the documented\n  reading — and Microsoft separately warns that `YEARFRAC` \"may return an incorrect result when\n  using the US (NASD) 30/360 basis, and the start_date is the last day in February\". Whether\n  `DAYS360` carries the same defect, or whether the two disagree on those inputs, is exactly the\n  kind of question a cross-function suite would answer. Nobody has answered it here.\n- **[DAYS](FUNC.DAYS.md)** and the `−` operator — actual calendar days. Substituting one for the\n  other changes the financial answer, not just the units.\n- **[DATEDIF](FUNC.DATEDIF.md)** with `\"D\"` — calendar days again, with a documented `#NUM!` for\n  reversed arguments that `DAYS360` does not appear to share.\n- **Confusable.** `DAYS360` and `DAYS` differ by four characters and by a whole convention;\n  `DAYS360(a,b)` and `DAYS360(a,b,TRUE)` differ by a national standard.\n\n\n",
    "how-to-implement": "\n### Notes for implementers\n\n\n1. **Adjust, then subtract — and adjust in the documented order.** The US end-date rule reads the\n   *unadjusted* start date's day-of-month in its condition (\"the starting date is earlier than the\n   30th day of a month\"). An implementation that adjusts the start date first and then evaluates\n   the condition against the adjusted value will get a different answer, because the start\n   adjustment can move a 28 to a 30 and flip the test. This is the most likely place for two\n   good-faith implementations to diverge.\n2. **Do not assume antisymmetry.** Under the US method, `f(a,b) ≠ −f(b,a)` in general. Any\n   optimization that sorts the arguments and negates is wrong.\n3. **Treat \"last day of a month\" correctly for February**, including 29 February in leap years and\n   the phantom 29 February 1900 (see [FUNC.DATE](FUNC.DATE.md)).\n4. **`method` is a logical, coerced by the ordinary rules** — a numeric 1 or 0, or numeric text,\n   will reach it through the standard to-logical path described in\n   [coercion and lifting](../model/02-coercion-and-lifting.md). The Handbook's chapter notes that\n   to-logical behaviour is per-family; this page does not claim to know `DAYS360`'s.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns a `Number`: a signed integer count of 30/360 days.\n\n- **Month ends are the entire subject.** For dates that are neither the 30th nor the 31st nor a\n  February month end, the two methods and the plain formula all agree.\n- **February under the US method** is the distinctive case: 28 February (or 29 in a leap year) as a\n  *start date* is treated as the 30th, so February is stretched to a full 30-day month. The\n  European method leaves it alone.\n- **The US end-date rule is order-dependent** — it consults the start date — so `DAYS360` is not\n  antisymmetric under the US method: swapping the arguments need not simply negate the result. That\n  is a genuinely unusual property for an interval function and is worth testing directly.\n- **The 1900 artefact is largely invisible here**, because the computation runs on (year, month,\n  day) components rather than on serial differences — but the components themselves come from the\n  serial, so February 1900 remains a curiosity.\n\n\n\n### Errors\n\n\nMicrosoft's `DAYS360` page describes the methods and the text-entry hazard, but does not publish an\nenumerated error table of the kind [WEEKDAY](FUNC.WEEKDAY.md) or\n[NETWORKDAYS.INTL](FUNC.NETWORKDAYS.INTL.md) carry. What can be stated honestly:\n\n- `#VALUE!` for an argument that will not coerce to a number, and propagation of an error argument,\n  are the engine-level behaviours from\n  [coercion and lifting](../model/02-coercion-and-lifting.md).\n- Out-of-range serials are `#NUM!` across this category; the page does not state it for this\n  function specifically, and it is not asserted here as a `DAYS360` fact.\n\n\n",
    "sources": "\n- Microsoft 365 support, **DAYS360 function** —\n  <https://support.microsoft.com/en-us/office/days360-function-b9a509fd-49ef-407e-94df-0cbda5718c2a>.\n  Source of the syntax, the two method rules quoted verbatim above, and the text-entry warning.\n- Microsoft 365 support, **YEARFRAC function** —\n  <https://support.microsoft.com/en-us/office/yearfrac-function-3844141e-c76d-4143-82b6-208454ddc6a8>.\n  Source of the basis table and the last-day-of-February caveat referred to above.\n- [FUNC.DATE](FUNC.DATE.md) — the serial-number model and the 1900 artefact.\n- Handbook call-model chapter [02 coercion and lifting](../model/02-coercion-and-lifting.md).\n- `data/functions/FUNC.DAYS360.json`, `data/presence/FUNC.DAYS360.json`,\n  `data/battery/FUNC.DAYS360.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, AMD Ryzen 7 4800H with Radeon Graphics | 3,061 |\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.DAYS360.json).",
    "what-it-does": "\n`DAYS360` returns the number of days between two dates **as counted by a 360-day year of twelve\n30-day months** — the day-count convention used in bond and accrual arithmetic, not the calendar.\n\nThe computation has two steps. First, each endpoint's day-of-month is adjusted according to the\nselected method; then the count is taken as\n\n> `360·(y₂ − y₁) + 30·(m₂ − m₁) + (d₂ − d₁)`\n\non the adjusted components. All of the difficulty is in the adjustment, and the adjustment is\nwhere the two methods disagree.\n\n### The two methods, as documented\n\nMicrosoft states them verbatim:\n\n**US (NASD) method — `method` FALSE or omitted.** \"If the starting date is the last day of a month,\nit becomes equal to the 30th day of the same month. If the ending date is the last day of a month\nand the starting date is earlier than the 30th day of a month, the ending date becomes equal to the\n1st day of the next month; otherwise the ending date becomes equal to the 30th day of the same\nmonth.\"\n\n**European method — `method` TRUE.** \"Starting dates and ending dates that occur on the 31st day of\na month become equal to the 30th day of the same month.\"\n\nRead side by side, the difference is sharper than it first appears:\n\n- The **European** rule is symmetric, unconditional and touches only the 31st. February is never\n  special: 28 February stays 28.\n- The **US** rule is asymmetric and conditional. It treats *any* month end (including 28 or 29\n  February) as the 30th when it is the start date; and for the end date it makes the outcome depend\n  on the start date, which is why the US method is not a function of each endpoint independently.\n  The \"otherwise\" branch — pushing a month-end end-date to the 1st of the next month — is the\n  clause that produces the results people find surprising.\n\nThe consequence is that the same pair of dates yields **different answers** under the two methods,\nand that is not a bug in either. Any workbook that computes accruals has to know which convention\nits contracts use.\n\n\n\n### Arguments\n\n\n`DAYS360(start_date, end_date, [method])` — two required arguments and one optional.\n\n**start_date** — the beginning of the period. Microsoft's page carries the category's strongest\nversion of the text warning: \"Problems can occur if dates are entered as text\", with the advice to\nuse `DATE` or the results of other formulas instead.\n\n**end_date** — the end of the period. As with plain subtraction, an end before the start gives a\nnegative count; the documentation does not describe an error for that case, unlike\n[DATEDIF](FUNC.DATEDIF.md).\n\n**method** — optional logical. FALSE or omitted selects the US (NASD) method; TRUE selects the\nEuropean method.\n\nThe misunderstood argument is `method`, in a specific and consequential way: it is a *logical*, and\nits default is the US convention. A European workbook that omits it silently gets American\naccrual counts. Because the two methods agree on most ordinary dates and differ only near month\nends, the mistake survives casual testing.\n\n\n"
  },
  "signature": {
    "display": "DAYS360(start_date, end_date, [method])",
    "parameters": [
      {
        "description": null,
        "name": "start_date",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "end_date",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "method",
        "optional": true,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 3,
        "min": 2
      },
      "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": "Days between two dates counted with twelve 30-day months",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Calculates the number of days between two dates based on a 360-day year",
        "microsoft_url": "https://support.microsoft.com/en-us/office/days360-function-b9a509fd-49ef-407e-94df-0cbda5718c2a"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "DAYS360"
        },
        {
          "locale": "bg-BG",
          "name": "DAYS360"
        },
        {
          "locale": "cs-CZ",
          "name": "ROK360"
        },
        {
          "locale": "da-DK",
          "name": "DAGE360"
        },
        {
          "locale": "de-DE",
          "name": "DAYS360"
        },
        {
          "locale": "el-GR",
          "name": "DAYS360"
        },
        {
          "locale": "en-AU",
          "name": "DAYS360"
        },
        {
          "locale": "en-GB",
          "name": "DAYS360"
        },
        {
          "locale": "en-US",
          "name": "DAYS360"
        },
        {
          "locale": "es-ES",
          "name": "DIAS360"
        },
        {
          "locale": "et-EE",
          "name": "DAYS360"
        },
        {
          "locale": "fi-FI",
          "name": "PÄIVÄT360"
        },
        {
          "locale": "fr-FR",
          "name": "JOURS360*"
        },
        {
          "locale": "he-IL",
          "name": "DAYS360"
        },
        {
          "locale": "hr-HR",
          "name": "DAYS360"
        },
        {
          "locale": "hu-HU",
          "name": "NAP360"
        },
        {
          "locale": "id-ID",
          "name": "DAYS360"
        },
        {
          "locale": "it-IT",
          "name": "DAYS360"
        },
        {
          "locale": "ja-JP",
          "name": "DAYS360"
        },
        {
          "locale": "ko-KR",
          "name": "DAYS360"
        },
        {
          "locale": "lt-LT",
          "name": "DAYS360"
        },
        {
          "locale": "lv-LV",
          "name": "DAYS360"
        },
        {
          "locale": "nb-NO",
          "name": "DAYS360"
        },
        {
          "locale": "nl-NL",
          "name": "DAGEN360"
        },
        {
          "locale": "pl-PL",
          "name": "DNI.360"
        },
        {
          "locale": "pt-BR",
          "name": "DAYS360"
        },
        {
          "locale": "pt-PT",
          "name": "DIAS360"
        },
        {
          "locale": "ro-RO",
          "name": "DAYS360"
        },
        {
          "locale": "ru-RU",
          "name": "ДНЕЙ360"
        },
        {
          "locale": "sk-SK",
          "name": "DAYS360"
        },
        {
          "locale": "sl-SI",
          "name": "DAYS360"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "DAYS360"
        },
        {
          "locale": "sv-SE",
          "name": "DAGAR360"
        },
        {
          "locale": "th-TH",
          "name": "DAYS360"
        },
        {
          "locale": "tr-TR",
          "name": "GÜN360 işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "DAYS360"
        },
        {
          "locale": "vi-VN",
          "name": "DAYS360"
        },
        {
          "locale": "zh-CN",
          "name": "DAYS360"
        },
        {
          "locale": "zh-HK",
          "name": "DAYS360"
        },
        {
          "locale": "zh-TW",
          "name": "DAYS360"
        }
      ],
      "signature": {
        "display": "DAYS360(start_date, end_date, [method])",
        "parameters": [
          {
            "description": null,
            "name": "start_date",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "end_date",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "method",
            "optional": true,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "DAYS360",
      "version_marker": null,
      "xlcall": {
        "code": "220",
        "symbol": "xlfDays360"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/days360-function-b9a509fd-49ef-407e-94df-0cbda5718c2a"
  },
  "try_it": {
    "formula": "=DAYS360(DATE(2026,1,1),DATE(2026,7,1))"
  },
  "url": "https://handbook.dnacalc.com/functions/DAYS360.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "3,061 captured inputs are indexed for this environment. Capture dates: 2026-09-24 to 2026-09-25. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20430",
      "platform": "Windows, 64-bit, AMD Ryzen 7 4800H with Radeon Graphics",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.DAYS360.json"
      ]
    }
  ]
}