{
  "category": "Financial functions",
  "display_name": "YIELDMAT",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.YIELDMAT",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20131",
        "?"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1085,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 1085,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 1,085 in the answer bank and 6 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,091 recorded answers",
    "workbook_corpus": {
      "cells": 6,
      "matched": 6
    }
  },
  "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#L149-L152",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/bond_core_family.rs#L479-L515"
      ],
      "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::dser",
        "ported/bond_core_family::pos",
        "ported/bond_core_family::rate",
        "ported/bond_core_family::d360us",
        "ported/bond_core_family::d360eu",
        "ported/bond_core_family::less_or_equal_to_a_year_apart",
        "ported/bond_core_family::consider_as_bisestile",
        "ported/bond_core_family::days_in_year_for_mat",
        "ported/bond_core_family::dd",
        "ported/bond_core_family::map_bond_core_error_to_ws",
        "ported/day_count_common::days_in_month",
        "ported/day_count_common::us_30_360",
        "ported/excel_numeric::binary_with",
        "ported/excel_numeric::excel_x87_add",
        "ported/excel_numeric::excel_x87_sub",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric::excel_x87_div",
        "ported/excel_numeric/x87::mul",
        "ported/excel_numeric/x87::add",
        "ported/excel_numeric/x87::sub",
        "ported/excel_numeric/x87::div"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/bonds.rs#L149-L152",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,091 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.YIELDMAT.json",
  "name": "YIELDMAT",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[PRICEMAT](FUNC.PRICEMAT.md) solves price; [YIELD](FUNC.YIELD.md) handles periodic coupons; [YIELDDISC](FUNC.YIELDDISC.md) handles a discounted redemption without this accrued-interest model.\n\n\n",
    "how-to-implement": "\nThe current recovered arithmetic keeps normalized price and interest terms separate. Use [R](../model/09-staged-arithmetic.md) at every named operation below.\n\n1. Validate dates in the order required by the host and require `issue<settlement<maturity`. Admit nonnegative rate and positive price.\n2. Compute `DIM=days(issue,maturity,basis)` and `A=days(issue,settlement,basis)` with the source’s day-count helper. Set `DSM=R(DIM-A)`. Obtain B from `days_in_year_for_mat(issue,settlement,basis)`, using that interval’s calendar rules.\n3. Calculate `interest=R(R(DIM/B)*rate)`, `accrued=R(R(A/B)*rate)` and `price_norm=R(price/100)`.\n4. Store `invested=R(price_norm+accrued)`. Reuse this stored value in `gain=R(R(1+interest)-invested)`.\n5. Return `R(R(gain/invested)*R(B/DSM))`. The gain division and year-ratio division are separate stores before multiplication.\n\nFor the example, `DIM=180,A=90,DSM=90,B=360`. The reconstructed stored stages are:\n\n| Stage | Binary64 value |\n|---|---:|\n| Interest | 0.03 |\n| Accrued | 0.015 |\n| Invested | 1.015 |\n| Gain | 0.015000000000000124 |\n| Gain / invested | 0.014778325123152834 |\n| B / DSM | 4 |\n| Yield | 0.059113300492611334 |\n\nThe mathematical expression can also be written `(103/101.5-1)*4`, but that expression does not preserve the identified subtraction and reuse of invested. The table evaluates the reconstruction; it is not a new Excel reading. The source records a 1,250-input control, including a held-out sweep, for its stored graph. Calendar helpers, publication and environment transfer retain their own scope.\n\n\n",
    "quirks": "\nBasis defaults to zero: 0 US 30/360, 1 actual/actual, 2 actual/360, 3 actual/365, 4 European 30/360. Dates and selectors are truncated under their documented rules. Use DATE values rather than locale-dependent date text.\n\nMicrosoft documents `#VALUE!` for invalid dates and `#NUM!` for a negative interest rate, nonpositive price, invalid basis or settlement at/after maturity. The current helper additionally requires issue strictly before settlement. Accrued interest changes the invested amount; using clean price alone in the denominator is a different calculation.\n\nThe current remaining day count is the difference between its issue-to-maturity and issue-to-settlement day counts. Recomputing a fresh settlement-to-maturity 30/360 count can change calendar-boundary behaviour.\n\n\n",
    "sources": "\n- [Microsoft: YIELDMAT function](https://support.microsoft.com/en-us/excel/functions/yieldmat-function), opened 6 November 2026; syntax, documented argument rules and errors.\n- [DnaCalc implementation](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/ported/bond_core_family.rs); implementation steps and the limits identified in the text.\n\n",
    "try-it": "\n`=YIELDMAT(DATE(2027,4,1),DATE(2027,7,1),DATE(2027,1,1),0.06,100,0)` is about `0.0591133005`. Under 30/360, interest from issue to maturity is three and accrued interest at settlement is 1.5.\n\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,085 |\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.YIELDMAT.json).",
    "what-it-does": "\n`YIELDMAT(settlement,maturity,issue,rate,pr,[basis])` returns the annual yield of a security that pays its interest at maturity. Rate is the interest rate from issue and pr the clean purchase price per 100 face value.\n\n\n"
  },
  "signature": {
    "display": "YIELDMAT(settlement, maturity, issue, rate, pr, [basis])",
    "parameters": [
      {
        "description": null,
        "name": "settlement",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "maturity",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "issue",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "rate",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "pr",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "basis",
        "optional": true,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 6,
        "min": 5
      },
      "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": "Yearly yield of a security whose interest is all paid at maturity",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the annual yield of a security that pays interest at maturity",
        "microsoft_url": "https://support.microsoft.com/en-us/office/yieldmat-function-ba7d1809-0d33-4bcb-96c7-6c56ec62ef6f"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "YIELDMAT"
        },
        {
          "locale": "bg-BG",
          "name": "YIELDMAT"
        },
        {
          "locale": "cs-CZ",
          "name": "YIELDMAT"
        },
        {
          "locale": "da-DK",
          "name": "AFKAST.UDLØBSDATO"
        },
        {
          "locale": "de-DE",
          "name": "YIELDMAT"
        },
        {
          "locale": "el-GR",
          "name": "YIELDMAT"
        },
        {
          "locale": "en-AU",
          "name": "YIELDMAT"
        },
        {
          "locale": "en-GB",
          "name": "YIELDMAT"
        },
        {
          "locale": "en-US",
          "name": "YIELDMAT"
        },
        {
          "locale": "es-ES",
          "name": "RENDTO.VENCTO"
        },
        {
          "locale": "et-EE",
          "name": "YIELDMAT"
        },
        {
          "locale": "fi-FI",
          "name": "TUOTTO.ERÄP"
        },
        {
          "locale": "fr-FR",
          "name": "RENDEMENT.TITRE.ECHEANCE*"
        },
        {
          "locale": "he-IL",
          "name": "YIELDMAT"
        },
        {
          "locale": "hr-HR",
          "name": "YIELDMAT"
        },
        {
          "locale": "hu-HU",
          "name": "HOZAM.LEJÁRAT"
        },
        {
          "locale": "id-ID",
          "name": "YIELDMAT"
        },
        {
          "locale": "it-IT",
          "name": "YIELDMAT"
        },
        {
          "locale": "ja-JP",
          "name": "YIELDMAT"
        },
        {
          "locale": "ko-KR",
          "name": "YIELDMAT"
        },
        {
          "locale": "lt-LT",
          "name": "YIELDMAT"
        },
        {
          "locale": "lv-LV",
          "name": "YIELDMAT"
        },
        {
          "locale": "nb-NO",
          "name": "YIELDMAT"
        },
        {
          "locale": "nl-NL",
          "name": "REND.VERVAL"
        },
        {
          "locale": "pl-PL",
          "name": "RENT.WYKUP"
        },
        {
          "locale": "pt-BR",
          "name": "YIELDMAT"
        },
        {
          "locale": "pt-PT",
          "name": "LUCROVENC"
        },
        {
          "locale": "ro-RO",
          "name": "YIELDMAT"
        },
        {
          "locale": "ru-RU",
          "name": "ДОХОДПОГАШ"
        },
        {
          "locale": "sk-SK",
          "name": "YIELDMAT"
        },
        {
          "locale": "sl-SI",
          "name": "YIELDMAT"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "YIELDMAT"
        },
        {
          "locale": "sv-SE",
          "name": "NOMAVKFÖRF"
        },
        {
          "locale": "th-TH",
          "name": "YIELDMAT"
        },
        {
          "locale": "tr-TR",
          "name": "ÖDEMEVADE işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "YIELDMAT"
        },
        {
          "locale": "vi-VN",
          "name": "YIELDMAT"
        },
        {
          "locale": "zh-CN",
          "name": "YIELDMAT"
        },
        {
          "locale": "zh-HK",
          "name": "YIELDMAT"
        },
        {
          "locale": "zh-TW",
          "name": "YIELDMAT"
        }
      ],
      "signature": {
        "display": "YIELDMAT(settlement, maturity, issue, rate, pr, [basis])",
        "parameters": [
          {
            "description": null,
            "name": "settlement",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "maturity",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "issue",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "rate",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "pr",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "basis",
            "optional": true,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "YIELDMAT",
      "version_marker": null,
      "xlcall": {
        "code": "432",
        "symbol": "xlfYieldmat"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/yieldmat-function-ba7d1809-0d33-4bcb-96c7-6c56ec62ef6f"
  },
  "try_it": {
    "formula": "=YIELDMAT(DATE(2027,4,1),DATE(2027,7,1),DATE(2027,1,1),0.06,100,0)"
  },
  "url": "https://handbook.dnacalc.com/functions/YIELDMAT.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "1,085 captured inputs are indexed for this environment. Capture dates: 2026-07-11 to 2026-07-11. 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.YIELDMAT.json"
      ]
    }
  ]
}