{
  "category": "Financial functions",
  "display_name": "COUPDAYBS",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.COUPDAYBS",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20131",
        "20430",
        "?"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 5584,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 5584,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 5,584 in the answer bank and 26 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 5,610 recorded answers",
    "workbook_corpus": {
      "cells": 26,
      "matched": 26
    }
  },
  "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/bonds.rs#L167-L170",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/coupon_family.rs#L281-L290"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/bonds::basis",
        "catalogue/bonds::coupon_out",
        "catalogue/bonds::coupon_args",
        "catalogue/financial::date_1900",
        "locale::days_from_civil",
        "locale::civil_from_days",
        "locale::excel_serial_from_ymd",
        "locale::ymd_from_excel_serial",
        "ported/coupon_family::max_excel_serial",
        "ported/coupon_family::days_in_month",
        "ported/coupon_family::days_from_civil",
        "ported/coupon_family::excel_serial_from_ymd_unbounded_1900",
        "ported/coupon_family::calendar_days360",
        "ported/coupon_family::actual_days",
        "ported/coupon_family::accrued_or_remaining_days",
        "ported/coupon_family::parse_basis",
        "ported/coupon_family::parse_frequency",
        "ported/coupon_family::check_coupon_dates",
        "ported/coupon_family::parse_coupon_date",
        "ported/coupon_family::parse_coupon_context",
        "ported/coupon_family::coupon_date_before_maturity",
        "ported/coupon_family::locate_coupon_period"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/bonds.rs#L167-L170",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 5,610 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.COUPDAYBS.json",
  "name": "COUPDAYBS",
  "notes": [
    {
      "basis": "1,664 recorded rows with a number answer on basis 0, from builds 20131, 20430 and 20527, recomputed independently from the calendar. An implementation of these rules matches all 33,504 selected readings of the six coupon functions. Fictitious 1900-02-29 is not a month end here.",
      "documentation": null,
      "evidence": [
        {
          "commit": "7ec08d6707059ef1d74922ac9b8e0769f6093312",
          "locator": "coupdaysnc_kernel",
          "note": "the rule as implemented",
          "path": "crates/calc-func/src/ported/coupon_family.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": null,
          "note": "733 recorded readings",
          "path": "crates/calc-func/tests/captures/fn4_questions/COUPDAYSNC.reading.json",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": null,
          "note": "120 recorded readings",
          "path": "crates/calc-func/tests/captures/fn4_questions/COUPDAYBS.reading.json",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": "dc-zmk.4",
          "note": "the 33,504 selected coupon readings",
          "path": ".beads/issues.jsonl",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.COUPDAYBS",
        "FUNC.COUPDAYS",
        "FUNC.COUPDAYSNC"
      ],
      "inferred": "The split into P and A reproduces every row; that Excel's code forms these two counts is inferred. For the February cases in this note only COUPDAYSNC is recorded: their A comes from the rule, not from a COUPDAYBS reading.",
      "kind": "quirk",
      "note_id": "FN-COUPDAYSNC-001",
      "open": [],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "COUPDAYSNC(39923, 50919, 4, 0)",
          "correct": null,
          "excel": {
            "bits": "0x4043800000000000",
            "display": "39",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x40e37e6000000000",
                "display": "39923",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x40e8dce000000000",
                "display": "50919",
                "kind": "number"
              }
            },
            {
              "name": "frequency",
              "value": {
                "bits": "0x4010000000000000",
                "display": "4",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x0000000000000000",
                "display": "0",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-COUPDAYSNC-remaining-calendar-1",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/COUPDAYSNC.reading.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "COUPDAYSNC(45986, 57038, 2, 0)",
          "correct": null,
          "excel": {
            "bits": "0x4057c00000000000",
            "display": "95",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x40e6744000000000",
                "display": "45986",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x40ebd9c000000000",
                "display": "57038",
                "kind": "number"
              }
            },
            {
              "name": "frequency",
              "value": {
                "bits": "0x4000000000000000",
                "display": "2",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x0000000000000000",
                "display": "0",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-COUPDAYSNC-remaining-calendar-2",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/COUPDAYSNC.reading.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "COUPDAYSNC(46478, 46627, 4, 0)",
          "correct": null,
          "excel": {
            "bits": "0x404c800000000000",
            "display": "57",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x40e6b1c000000000",
                "display": "46478",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x40e6c46000000000",
                "display": "46627",
                "kind": "number"
              }
            },
            {
              "name": "frequency",
              "value": {
                "bits": "0x4010000000000000",
                "display": "4",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x0000000000000000",
                "display": "0",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-COUPDAYSNC-full-period-holdout-90",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/COUPDAYSNC.reading.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "COUPDAYSNC(33, 400, 2, 0)",
          "correct": null,
          "excel": {
            "bits": "0x3ff0000000000000",
            "display": "1",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x4040800000000000",
                "display": "33",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x4079000000000000",
                "display": "400",
                "kind": "number"
              }
            },
            {
              "name": "frequency",
              "value": {
                "bits": "0x4000000000000000",
                "display": "2",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x0000000000000000",
                "display": "0",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-COUPDAYSNC-calendar-boundary-127",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/COUPDAYSNC.reading.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "COUPDAYBS(61, 456, 1, 0)",
          "correct": null,
          "excel": {
            "bits": "0x404e800000000000",
            "display": "61",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x404e800000000000",
                "display": "61",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x407c800000000000",
                "display": "456",
                "kind": "number"
              }
            },
            {
              "name": "frequency",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x0000000000000000",
                "display": "0",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-COUPDAYBS-fake-february-43",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/COUPDAYBS.reading.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "COUPDAYSNC(61, 456, 1, 0)",
          "correct": null,
          "excel": {
            "bits": "0x403d000000000000",
            "display": "29",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x404e800000000000",
                "display": "61",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x407c800000000000",
                "display": "456",
                "kind": "number"
              }
            },
            {
              "name": "frequency",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x0000000000000000",
                "display": "0",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-COUPDAYSNC-fake-february-43",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/COUPDAYSNC.reading.json",
            "repository": "DnaCalc"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "On basis 0 (US 30/360), COUPDAYSNC is P - A. A is COUPDAYBS, the accrued days. P is a 30/360 count between the actual previous and next coupon dates, with day 31 and the last day of February both counted as day 30. COUPDAYS on basis 0 is always 360/frequency, but P need not be: when a coupon falls on the last day of February and maturity is not a month end, P can be 88, 89 or 92 for a quarter and 178 or 182 for a half year. So COUPDAYSNC(39923,50919,4,0), with coupons 2009-02-28 and 2009-05-29, is 39: P is 89 and A is 50, where 90 - 50 would give 40. With no coupon date before settlement in Excel's calendar, the period starts at serial 0: COUPDAYSNC(33,400,2,0) is 1, and for settlement 61, maturity 456 and annual coupons COUPDAYBS plus COUPDAYSNC is 90, not 360. This rule matches all 1,664 recorded number rows on basis 0, 733 of them chosen near February, month ends and the start of the calendar.",
      "status": "measured",
      "title": "On basis 0 COUPDAYSNC is not always COUPDAYS minus COUPDAYBS"
    }
  ],
  "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- **[COUPDAYS](FUNC.COUPDAYS.md)** — the denominator. Read its additivity section before\n  combining the two.\n- **[COUPDAYSNC](FUNC.COUPDAYSNC.md)** — the complement, days from settlement forward to the\n  next coupon. The pair is not guaranteed to partition the period.\n- **[COUPPCD](FUNC.COUPPCD.md)** — the date this function counts from. `settlement − COUPPCD` is\n  the *actual* elapsed days, which equals `COUPDAYBS` on bases 1, 2 and 3 and not on 0 or 4.\n- **[ACCRINT](FUNC.ACCRINT.md)** — the function to use when accrual starts at issuance rather\n  than at a schedule coupon date, or when the interval spans several periods.\n- **`PRICE`, `YIELD`** — consumers. `PRICE` returns a clean price; the invoice price adds the\n  accrual this function's quotient defines.\n- **[YEARFRAC](FUNC.YEARFRAC.md)** — the same day-count conventions, applied to an arbitrary\n  date pair instead of to a coupon period.\n- **Confused with**: `settlement − COUPPCD(...)` (above), and with `ACCRINT`, which answers a\n  different question with a different domain.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n1. **This is integer arithmetic pretending to be floating point.** Every answer is a whole\n   number of days on every basis. An implementation that computes it in integers and converts\n   once at the end has no rounding to discuss; one that routes through a year fraction and\n   multiplies back does.\n3. **The order of the two 30/360 adjustments is observable.** Collapsing the 31st to the 30th\n   before or after noticing that the start date was a month end changes the answer by a day on a\n   nameable input class — and only on that class, which is why it survives large corpora and\n   then fails in production.\n4. **The roll-forward convention is a branch, not a formula.** Whether `settlement` on a coupon\n   date yields 0 or a full period is decided before any counting happens, and it is the largest\n   single behavioural unknown on this page.\n5. No cancellation, no overflow, no transcendental. The difficulty here is entirely\n   definitional.\n\n\n",
    "quirks": "\n### How the days are counted\n\n| `basis` | How `COUPDAYBS` counts |\n|---|---|\n| 0 — US (NASD) 30/360 | 30/360-adjusted day count |\n| 1 — Actual/actual | actual calendar days |\n| 2 — Actual/360 | actual calendar days |\n| 3 — Actual/365 | actual calendar days |\n| 4 — European 30/360 | 30/360-adjusted day count |\n\nSo `COUPDAYBS` *is* a calendar measurement on three of the five bases, and a 30/360 measurement\non the other two. It is never a declared constant — which is precisely where it parts company\nwith [COUPDAYS](FUNC.COUPDAYS.md), and why\n\n>     COUPDAYBS + COUPDAYSNC  =  COUPDAYS\n\nholds on bases 1 and 4 and **fails on bases 2 and 3**. On basis 0 it does not always hold: there\nFN-COUPDAYSNC-001 measures `COUPDAYSNC` as `P − A`, and `P` need not be `360/frequency`. The full\naccount of the failure on bases 2 and 3, and of the upstream case where Excel's own `PRICE` and\n`COUPDAYSNC` disagreed because of it, is on\n[COUPDAYS](FUNC.COUPDAYS.md#the-additivity-that-fails).\n\n\n### Result and edge cases\n\n\nReturns a `Number`: a day count, integral on every basis.\n\n- **`settlement` one day after a coupon date** returns 1 on bases 1, 2 and 3, and 1 on the\n  30/360 bases too except where the adjustment rules bite.\n- **The 30/360 bases can disagree with the calendar by several days**, by design: a period from\n  31 January to 31 July counts as 180 days on basis 0 whatever the calendar says.\n- **The result is bounded by the period length only on bases 0, 1 and 4.** On bases 2 and 3 the\n  count can exceed the `COUPDAYS` the same call reports, because that denominator is a\n  convention.\n- **`settlement` ≥ `maturity`** is a documented error.\n- Empty, missing and error arguments follow the shared call model; see\n  [The value universe](../model/01-value-universe.md).\n\n\n\n### Errors\n\n\nDocumented on Microsoft's Learn page for this function, in these words (it says \"generates an\nerror\" without naming a worksheet error value):\n\n| Condition (documented) | Documented outcome |\n|---|---|\n| `settlement` or `maturity` is not a valid date | error |\n| `frequency` is any number other than 1, 2 or 4 | error |\n| `basis` < 0 or `basis` > 4 | error |\n| `settlement` ≥ `maturity` | error |\n\n",
    "sources": "- Microsoft Learn, **WorksheetFunction.CoupDayBs method (Excel)** —\n  <https://learn.microsoft.com/en-us/office/vba/api/excel.worksheetfunction.coupdaybs>. Source\n  of the one-line description, the quoted argument descriptions, the five-row basis table, the\n  \"All arguments are truncated to integers\" rule, and the four error conditions.\n- Microsoft 365 support, **COUPDAYBS function** —\n  <https://support.microsoft.com/en-us/office/coupdaybs-function-eb9a8dfb-2fb2-4c61-8e5d-690b320cf872>.\n  The worksheet-surface page; **not retrieved** for this entry (the host returned HTTP 403), so\n  nothing here is quoted from it.\n- Handbook, [COUPNCD](FUNC.COUPNCD.md#the-coupon-schedule) — the shared schedule construction;\n  [COUPDAYS](FUNC.COUPDAYS.md#the-additivity-that-fails) — the additivity failure.\n- Handbook, `content/lastbit/MATERIAL_W109_PRIMITIVES.md` §18 and §21 — the recorded day-count\n  divergences in the same engine and in Excel's own bond routines.\n- Handbook evidence record `EV-FIN-0030` — what the six `COUP*` figures are, and are not.\n- Handbook chapters [01 the value universe](../model/01-value-universe.md),\n  [02 coercion and lifting](../model/02-coercion-and-lifting.md),\n  [06 claim language](../model/06-claim-language.md).\n- `data/functions/FUNC.COUPDAYBS.json`, `data/presence/FUNC.COUPDAYBS.json`,\n  `data/battery/FUNC.COUPDAYBS.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| 20131 | Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics | 1,060 |\n| 20430 | Windows, 64-bit, AMD Ryzen 7 4800H with Radeon Graphics | 3,012 |\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.COUPDAYBS.json).",
    "what-it-does": "\n`COUPDAYBS(settlement, maturity, frequency, [basis])` returns **the number of days from the\nbeginning of the current coupon period to the settlement date** — the days the seller has\nalready earned.\n\nIts whole economic purpose is one quotient:\n\n>     accrued interest  =  coupon  ×  COUPDAYBS / COUPDAYS\n\nwhich is why the denominator's page, [COUPDAYS](FUNC.COUPDAYS.md), is required reading alongside\nthis one: the two functions do not measure time the same way on every basis.\n\nThe \"beginning of the current coupon period\" is the previous coupon date, which is exactly what\n[COUPPCD](FUNC.COUPPCD.md) returns. The period is derived from the schedule described on\n[COUPNCD](FUNC.COUPNCD.md#the-coupon-schedule) — coupon dates counted backwards from `maturity`\nin `12/frequency`-month steps.\n\n\n\n### Arguments\n\n\n`COUPDAYBS(settlement, maturity, frequency, [basis])`\n\n| Argument | Meaning (Microsoft's wording) | Required? |\n|---|---|---|\n| `settlement` | \"The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.\" | Required |\n| `maturity` | \"The security's maturity date. The maturity date is the date when the security expires.\" | Required |\n| `frequency` | \"The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.\" | Required |\n| `basis` | \"The type of day count basis to use.\" | Optional, defaults to 0 |\n\nThe five-row basis table is documented on this page and is the standard one — 0 or omitted = US\n(NASD) 30/360, 1 = actual/actual, 2 = actual/360, 3 = actual/365, 4 = European 30/360.\n\n**There is no issue date argument.** A security issued mid-period does not shorten the first\n`COUPDAYBS`: the function measures from the *schedule's* previous coupon date, real or notional,\nnot from issuance. Accrued interest on a newly issued bond therefore needs\n[ACCRINT](FUNC.ACCRINT.md), which does take an issue date, rather than this function.\n\nMicrosoft documents that **\"All arguments are truncated to integers.\"** Dates should be produced\nby `DATE` or by other formulas rather than typed as text; ordinary coercion rules are in\n[Coercion and lifting](../model/02-coercion-and-lifting.md).\n\n\n"
  },
  "signature": {
    "display": "COUPDAYBS(settlement, maturity, frequency, [basis])",
    "parameters": [
      {
        "description": null,
        "name": "settlement",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "maturity",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "frequency",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "basis",
        "optional": true,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 4,
        "min": 3
      },
      "category": "Financial 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 from the start of the coupon period to the settlement date",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the number of days from the beginning of the coupon period to the settlement date",
        "microsoft_url": "https://support.microsoft.com/en-us/office/coupdaybs-function-eb9a8dfb-2fb2-4c61-8e5d-690b320cf872"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "COUPDAYBS"
        },
        {
          "locale": "bg-BG",
          "name": "COUPDAYBS"
        },
        {
          "locale": "cs-CZ",
          "name": "COUPDAYBS"
        },
        {
          "locale": "da-DK",
          "name": "KUPONDAGE.SA"
        },
        {
          "locale": "de-DE",
          "name": "COUPDAYBS"
        },
        {
          "locale": "el-GR",
          "name": "COUPDAYBS"
        },
        {
          "locale": "en-AU",
          "name": "COUPDAYBS"
        },
        {
          "locale": "en-GB",
          "name": "COUPDAYBS"
        },
        {
          "locale": "en-US",
          "name": "COUPDAYBS"
        },
        {
          "locale": "es-ES",
          "name": "CUPON.DIAS.L1"
        },
        {
          "locale": "et-EE",
          "name": "COUPDAYBS"
        },
        {
          "locale": "fi-FI",
          "name": "KORKOPÄIVÄT.ALUSTA"
        },
        {
          "locale": "fr-FR",
          "name": "NB.JOURS.COUPON.PREC*"
        },
        {
          "locale": "he-IL",
          "name": "COUPDAYBS"
        },
        {
          "locale": "hr-HR",
          "name": "COUPDAYBS"
        },
        {
          "locale": "hu-HU",
          "name": "SZELVÉNYIDŐ.KEZDETTŐL"
        },
        {
          "locale": "id-ID",
          "name": "COUPDAYBS"
        },
        {
          "locale": "it-IT",
          "name": "COUPDAYBS"
        },
        {
          "locale": "ja-JP",
          "name": "COUPDAYBS"
        },
        {
          "locale": "ko-KR",
          "name": "COUPDAYBS"
        },
        {
          "locale": "lt-LT",
          "name": "COUPDAYBS"
        },
        {
          "locale": "lv-LV",
          "name": "COUPDAYBS"
        },
        {
          "locale": "nb-NO",
          "name": "COUPDAYBS"
        },
        {
          "locale": "nl-NL",
          "name": "COUP.DAGEN.BB"
        },
        {
          "locale": "pl-PL",
          "name": "WYPŁ.DNI.OD.POCZ"
        },
        {
          "locale": "pt-BR",
          "name": "COUPDAYBS"
        },
        {
          "locale": "pt-PT",
          "name": "CUPDIASINLIQ"
        },
        {
          "locale": "ro-RO",
          "name": "COUPDAYBS"
        },
        {
          "locale": "ru-RU",
          "name": "ДНЕЙКУПОНДО"
        },
        {
          "locale": "sk-SK",
          "name": "COUPDAYBS"
        },
        {
          "locale": "sl-SI",
          "name": "COUPDAYBS"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "COUPDAYBS"
        },
        {
          "locale": "sv-SE",
          "name": "KUPDAGBB"
        },
        {
          "locale": "th-TH",
          "name": "COUPDAYBS"
        },
        {
          "locale": "tr-TR",
          "name": "KUPONGÜNBD işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "COUPDAYBS"
        },
        {
          "locale": "vi-VN",
          "name": "COUPDAYBS"
        },
        {
          "locale": "zh-CN",
          "name": "COUPDAYBS"
        },
        {
          "locale": "zh-HK",
          "name": "COUPDAYBS"
        },
        {
          "locale": "zh-TW",
          "name": "COUPDAYBS"
        }
      ],
      "signature": {
        "display": "COUPDAYBS(settlement, maturity, frequency, [basis])",
        "parameters": [
          {
            "description": null,
            "name": "settlement",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "maturity",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "frequency",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "basis",
            "optional": true,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "COUPDAYBS",
      "version_marker": null,
      "xlcall": {
        "code": "452",
        "symbol": "xlfCoupdaybs"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/coupdaybs-function-eb9a8dfb-2fb2-4c61-8e5d-690b320cf872"
  },
  "try_it": {
    "formula": "=COUPDAYBS(61, 456, 1, 0)"
  },
  "url": "https://handbook.dnacalc.com/functions/COUPDAYBS.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "COUPDAYBS(61, 456, 1, 0) returned 61 (0x404e800000000000). Inputs were supplied through cells using Value2. These are controls from this environment, not a same-input comparison with another build.",
      "excel_build": "16.0.20527.20088",
      "observations": [
        {
          "call": "COUPDAYBS(61, 456, 1, 0)",
          "excel": {
            "bits": "0x404e800000000000",
            "display": "61",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x404e800000000000",
                "display": "61",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x407c800000000000",
                "display": "456",
                "kind": "number"
              }
            },
            {
              "name": "frequency",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x0000000000000000",
                "display": "0",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file"
        }
      ],
      "platform": "Windows, bitness and CPU not recorded in this reading file",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/3345a87/content/notes/FN-COUPDAYSNC-001.json"
      ]
    },
    {
      "behaviour": "1,060 captured inputs are indexed for this environment. Capture dates: 2026-07-19 to 2026-07-19. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20131",
      "platform": "Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.COUPDAYBS.json"
      ]
    },
    {
      "behaviour": "3,012 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.COUPDAYBS.json"
      ]
    }
  ]
}