{
  "category": "Financial functions",
  "display_name": "ACCRINT",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.ACCRINT",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20131",
        "20228",
        "?"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 146688,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 146688,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 146,688 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 146,695 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/bonds.rs#L157-L162",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/bond_core_family.rs#L668-L672",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/bond_core_family.rs#L678-L694",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/bond_core_family.rs#L715-L738",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/bond_core_family.rs#L749-L760",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/bond_core_family.rs#L761-L773",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/bond_core_family.rs#L774-L790",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/bond_core_family.rs#L792-L810",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/bond_core_family.rs#L812-L954"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/bonds::or",
        "catalogue/bonds::bond_out",
        "catalogue/financial::date_1900",
        "locale::days_from_civil",
        "locale::civil_from_days",
        "locale::excel_serial_from_ymd",
        "locale::ymd_from_excel_serial",
        "ported/bond_core_family::max_serial",
        "ported/bond_core_family::derr",
        "ported/bond_core_family::dyear",
        "ported/bond_core_family::dim",
        "ported/bond_core_family::act",
        "ported/bond_core_family::basis",
        "ported/bond_core_family::freq",
        "ported/bond_core_family::dser",
        "ported/bond_core_family::pos",
        "ported/bond_core_family::rate",
        "ported/bond_core_family::d360eu",
        "ported/bond_core_family::last_day_of_feb",
        "ported/bond_core_family::diff360_us",
        "ported/bond_core_family::days_between_num",
        "ported/bond_core_family::map_bond_core_error_to_ws",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric/x87::mul"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/bonds.rs#L157-L162",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 146,695 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.ACCRINT.json",
  "name": "ACCRINT",
  "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- **[ACCRINTM](FUNC.ACCRINTM.md)** — the same question for a security that pays all its interest\n  at maturity. No coupon schedule, no `frequency`, no `calc_method`; one interval over one year\n  fraction. If you are unsure which you need, the test is whether the instrument pays coupons\n  before maturity.\n- **The coupon-date functions** — [COUPPCD](FUNC.COUPPCD.md), [COUPNCD](FUNC.COUPNCD.md),\n  [COUPDAYBS](FUNC.COUPDAYBS.md), [COUPDAYS](FUNC.COUPDAYS.md) — expose the schedule that\n  `ACCRINT` reconstructs internally. They are the right instruments for auditing an `ACCRINT`\n  result: if `COUPDAYBS`/`COUPDAYS` disagrees with the fraction implied by `ACCRINT`, the\n  disagreement is localized to one of the two.\n- **[YEARFRAC](FUNC.YEARFRAC.md)** — the standalone day-count engine. `ACCRINT` on a single\n  whole period is a `YEARFRAC` computation wearing a coupon schedule.\n- **Confused with**: `ACCRINTM` (above), and with simple `rate × par × YEARFRAC(...)` hand\n  arithmetic, which reproduces `ACCRINT` only when the interval lies inside one coupon period.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\nThe difficulty here is not floating point in the usual sense — there is no cancellation\ncatastrophe and no argument reduction. It is **combinatorial**: getting the same *sequence of\nsmall quotients* that Excel forms, and then adding them in the same order.\n\n1. **Schedule generation is the algorithm.** Walking back from `first_interest` by\n   `12/frequency` months, with month-end anchoring, is the whole of the hard part. Two\n   defensible month-arithmetic rules (clamp the day of month, versus remember that the anchor\n   was a month end) produce schedules that differ by a day several times a year.\n2. **Two 30/360 implementations will eventually disagree.** The Handbook's own research record\n   documents a case where two routines implementing \"the same\" US 30/360 rule differed only in\n   which adjustment they applied first, and disagreed by one day on month-end pairs. Share one\n   day-count routine; do not re-derive it per family.\n4. **The canonical-versus-actual period length choice** (above) is a *semantic* choice with\n   numerical consequences far larger than one ULP. It belongs in the specification, not in the\n   rounding discussion.\n5. There is no known closed form that avoids the schedule for a general `issue`; attempts to\n   shortcut it with a single `YEARFRAC` are correct only within one period.\n\n\n",
    "quirks": "\n### The calc_method argument\n\n\n`calc_method` is documented — on the worksheet-function page, not on the Learn page consulted\nhere — as a choice of *starting line*: TRUE accrues from `issue`, FALSE accrues from\n`first_interest`.\n\nTwo consequences follow, and both are visible without any last-bit machinery:\n\n1. **Accrual is not monotone in issue date under FALSE.** A bond issued three periods before\n   `first_interest` can accrue *less* than one issued a single period before, because the\n   intervening whole periods vanish.\n\n\n\n### Result and edge cases\n\n\nReturns a `Number`: an amount of currency in the same units as `par`, not a rate and not a\npercentage.\n\n- **Settlement exactly on a coupon date** is the interesting boundary. Under the reference\n  engine's TRUE path the final period is always measured as days divided by the canonical\n  length, so it stays a fraction rather than snapping to a whole period.\n- **Month-end and leap-day dates** are where the schedule reconstruction earns or loses its\n  accuracy: the backward walk from `first_interest` preserves month-end anchoring, so a coupon\n  dated the 30th of a 30-day month and one dated the 31st generate different schedules.\n- **Fractional arguments.** Date and `basis` arguments are truncated toward zero before use.\n- Empty, missing and error arguments follow the shared call model; see\n  [The value universe](../model/01-value-universe.md) and\n  [Coercion and lifting](../model/02-coercion-and-lifting.md).\n\n\n\n### Errors\n\n\nMicrosoft's Learn reference for this function documents no error conditions at all — it carries\nonly the parameter table and the basis table. What follows is therefore the **reference\nengine's** behaviour, recorded as such, plus the conditions Microsoft documents for the sibling\nfunctions in this family:\n\n",
    "sources": "- Microsoft Learn, **WorksheetFunction.AccrInt method (Excel)** —\n  <https://learn.microsoft.com/en-us/office/vba/api/excel.worksheetfunction.accrint>. Source of\n  the parameter list with its required/optional split, the day-count basis table, and the\n  date-entry warning. This page documents seven parameters and does not mention `calc_method`.\n- Microsoft 365 support, **ACCRINT function** —\n  <https://support.microsoft.com/en-us/office/accrint-function-fe45d089-6722-4fb3-9379-e1f911d8dc74>.\n  The worksheet-surface page, which carries `calc_method` and a published accrual equation.\n  Cited for completeness; **not retrieved** for this entry (the host returned HTTP 403), so\n  nothing on this page is quoted from it.\n- Handbook evidence record `EV-FIN-0020` — the open identification record naming this surface.\n- Handbook, `content/lastbit/MATERIAL_W109_PRIMITIVES.md` §20 — the research narrative for the\n  `calc_method` divergence and the backward summation order.\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.ACCRINT.json`, `data/presence/FUNC.ACCRINT.json`,\n  `data/battery/FUNC.ACCRINT.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 | 145,458 |\n| 20228 | Windows, 64-bit, CPU not recorded | 1,230 |\n\n- XC-ACCRINT-001: build 20131 versus build 20228; 780 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.\n\nAgreement on these compared inputs does not establish agreement on unmeasured inputs.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.ACCRINT.json).",
    "what-it-does": "\n`ACCRINT` returns the **accrued interest** on a security that pays periodic coupons — the\ninterest that has built up between the security's issue date and its settlement date, and\nthat a buyer therefore owes the seller on top of the price.\n\nThe arithmetic is a rate times a principal times a length of time:\n\n> accrued = `par` × `rate` × (accrued time, measured in years on the chosen `basis`)\n\nWritten the way coupon markets write it, the year is divided into `frequency` coupon periods\nand the elapsed time is counted in *periods* rather than in years:\n\n>     accrued = par × (rate / frequency) × Σ (A_i / NL_i)\n\nwhere the sum runs over the quasi-coupon periods touched by the accrual interval, `A_i` is the\nnumber of accrued days inside period *i* counted on the `basis`, and `NL_i` is the normal\nlength of period *i* on the same `basis`. A period that is entirely inside the interval\ncontributes exactly 1; the two end periods contribute fractions.\n\nThat decomposition is what makes `ACCRINT` different from its at-maturity sibling\n[ACCRINTM](FUNC.ACCRINTM.md), which needs no schedule at all: `ACCRINTM` measures one interval\nagainst one year, while `ACCRINT` has to *reconstruct the coupon schedule* backwards from\n`first_interest`, decide which periods the interval crosses, and normalize each piece by that\nperiod's own length. Every hard question about this function is a question about that\nreconstruction.\n\nMicrosoft's worksheet-function page publishes an equation of the shape above. That page was not\nretrieved for this entry — the support host returned HTTP 403 — so the formula printed here is\nstated as the standard accrual identity in the Handbook's own voice, not quoted from Microsoft.\nThe parameter list, the required/optional split and the basis table below **are** taken from\nMicrosoft's Learn reference for the same function.\n\n### Two lengths, and which one normalizes\n\nThe subtle part is `NL_i`. For a whole interior period there is nothing to decide. For the\nperiod that contains `settlement`, and for the stub period that contains `issue`, the\nimplementation has to choose between:\n\n1. the **actual** length of that particular period (which under actual/actual differs from\n   period to period, because half-years are 181, 182, 183 or 184 days long), and\n2. a **canonical** length — the length of the last coupon period before `first_interest`, used\n   for every fractional piece regardless of where it sits.\n\n\n### Arguments\n\n\n`ACCRINT(issue, first_interest, settlement, rate, par, frequency, [basis], [calc_method])`\n\n| Argument | Meaning | Required? |\n|---|---|---|\n| `issue` | The security's issue date — where accrual starts. | Required |\n| `first_interest` | The security's first interest (first coupon) date. | Required |\n| `settlement` | The date the trade settles — where accrual stops. | Required |\n| `rate` | The security's **annual** coupon rate. | Required |\n| `par` | The security's par value. | Required in the documented list |\n| `frequency` | Coupon payments per year: 1, 2 or 4. | Required |\n| `basis` | Day-count convention, 0–4. | Optional, defaults to 0 |\n| `calc_method` | Which accrual construction to use. | Optional, defaults to TRUE |\n\n**`rate` is annual, `frequency` divides it.** The single most common modelling error in this\nfamily is feeding a per-period rate into an argument that Excel will divide by `frequency`\nagain.\n\n**`basis` selects the day-count convention** — 0 or omitted = US (NASD) 30/360, 1 =\nactual/actual, 2 = actual/360, 3 = actual/365, 4 = European 30/360 — exactly the table on\nMicrosoft's Learn page for this function, and the same axis described at length on\n[YEARFRAC](FUNC.YEARFRAC.md). A workbook that omits `basis` is asking for 30/360, whatever the\ninstrument's term sheet says.\n\nThe date arguments are numeric slots holding Excel date serials, subject to ordinary to-number\ncoercion; see [Coercion and lifting](../model/02-coercion-and-lifting.md). Microsoft's page\ncarries the standard warning that dates should be produced by `DATE` or by other formulas\nrather than typed as text.\n\n"
  },
  "signature": {
    "display": "ACCRINT(issue, first_interest, settlement, rate, par, frequency, [basis], [calc_method])",
    "parameters": [
      {
        "description": null,
        "name": "issue",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "first_interest",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "settlement",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "rate",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "par",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "frequency",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "basis",
        "optional": true,
        "repeats": false
      },
      {
        "description": null,
        "name": "calc_method",
        "optional": true,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 8,
        "min": 6
      },
      "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": "Interest accrued on a security with periodic coupons, from issue to settlement",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the accrued interest for a security that pays periodic interest",
        "microsoft_url": "https://support.microsoft.com/en-us/office/accrint-function-fe45d089-6722-4fb3-9379-e1f911d8dc74"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "ACCRINT"
        },
        {
          "locale": "bg-BG",
          "name": "ACCRINT"
        },
        {
          "locale": "cs-CZ",
          "name": "ACCRINT"
        },
        {
          "locale": "da-DK",
          "name": "ACCRINT"
        },
        {
          "locale": "de-DE",
          "name": "ACCRINT"
        },
        {
          "locale": "el-GR",
          "name": "ACCRINT"
        },
        {
          "locale": "en-AU",
          "name": "ACCRINT"
        },
        {
          "locale": "en-GB",
          "name": "ACCRINT"
        },
        {
          "locale": "en-US",
          "name": "ACCRINT"
        },
        {
          "locale": "es-ES",
          "name": "INT.ACUM"
        },
        {
          "locale": "et-EE",
          "name": "ACCRINT"
        },
        {
          "locale": "fi-FI",
          "name": "KERTYNYT.KORKO"
        },
        {
          "locale": "fr-FR",
          "name": "INTERET.ACC"
        },
        {
          "locale": "he-IL",
          "name": "ACCRINT"
        },
        {
          "locale": "hr-HR",
          "name": "ACCRINT"
        },
        {
          "locale": "hu-HU",
          "name": "IDŐSZAKI.KAMAT"
        },
        {
          "locale": "id-ID",
          "name": "ACCRINT"
        },
        {
          "locale": "it-IT",
          "name": "ACCRINT"
        },
        {
          "locale": "ja-JP",
          "name": "ACCRINT"
        },
        {
          "locale": "ko-KR",
          "name": "ACCRINT"
        },
        {
          "locale": "lt-LT",
          "name": "ACCRINT"
        },
        {
          "locale": "lv-LV",
          "name": "ACCRINT"
        },
        {
          "locale": "nb-NO",
          "name": "ACCRINT"
        },
        {
          "locale": "nl-NL",
          "name": "SAMENG.RENTE"
        },
        {
          "locale": "pl-PL",
          "name": "NAL.ODS"
        },
        {
          "locale": "pt-BR",
          "name": "ACCRINT"
        },
        {
          "locale": "pt-PT",
          "name": "JUROSACUM"
        },
        {
          "locale": "ro-RO",
          "name": "ACCRINT"
        },
        {
          "locale": "ru-RU",
          "name": "НАКОПДОХОД"
        },
        {
          "locale": "sk-SK",
          "name": "ACCRINT"
        },
        {
          "locale": "sl-SI",
          "name": "ACCRINT"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "ACCRINT"
        },
        {
          "locale": "sv-SE",
          "name": "UPPLRÄNTA"
        },
        {
          "locale": "th-TH",
          "name": "ACCRINT"
        },
        {
          "locale": "tr-TR",
          "name": "GERÇEKFAİZ işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "ACCRINT"
        },
        {
          "locale": "vi-VN",
          "name": "ACCRINT"
        },
        {
          "locale": "zh-CN",
          "name": "ACCRINT"
        },
        {
          "locale": "zh-HK",
          "name": "ACCRINT"
        },
        {
          "locale": "zh-TW",
          "name": "ACCRINT"
        }
      ],
      "signature": {
        "display": "ACCRINT(issue, first_interest, settlement, rate, par, frequency, [basis], [calc_method])",
        "parameters": [
          {
            "description": null,
            "name": "issue",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "first_interest",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "settlement",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "rate",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "par",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "frequency",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "basis",
            "optional": true,
            "repeats": false
          },
          {
            "description": null,
            "name": "calc_method",
            "optional": true,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "ACCRINT",
      "version_marker": null,
      "xlcall": {
        "code": "469",
        "symbol": "xlfAccrint"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/accrint-function-fe45d089-6722-4fb3-9379-e1f911d8dc74"
  },
  "try_it": {
    "formula": "=ACCRINT(DATE(2024,1,1),DATE(2024,7,1),DATE(2024,4,1),0.05,1000,2)"
  },
  "url": "https://handbook.dnacalc.com/functions/ACCRINT.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "145,458 captured inputs are indexed for this environment. Capture dates: 2026-07-19 to 2026-07-20. 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.ACCRINT.json"
      ]
    },
    {
      "behaviour": "1,230 captured inputs are indexed for this environment. Capture dates: 2026-08-09 to 2026-08-09. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20228",
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.ACCRINT.json"
      ]
    }
  ]
}