{
  "category": "Financial functions",
  "display_name": "YIELDDISC",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.YIELDDISC",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Recorded: 31 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 31 recorded answers",
    "workbook_corpus": {
      "cells": 31,
      "matched": 31
    }
  },
  "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#L153-L156",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/bond_core_family.rs#L516-L541"
      ],
      "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::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"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/bonds.rs#L153-L156",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 31 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.YIELDDISC.json",
  "name": "YIELDDISC",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[DISC](FUNC.DISC.md) uses a discount-on-redemption rate; [PRICEDISC](FUNC.PRICEDISC.md) solves price; [TBILLYIELD](FUNC.TBILLYIELD.md) applies its bill-specific convention.\n\n\n",
    "how-to-implement": "\n1. Truncate the dates and basis, validate the workbook dates, require positive price and redemption and settlement before maturity.\n2. Obtain the numerator day count `days` for the selected basis. Bases 0 and 4 use their respective 30/360 rules; bases 1, 2 and 3 use actual serial days.\n3. Obtain the year denominator B: 360 for bases 0, 2 and 4; 365 for basis 3; the source’s calendar-dependent `days_in_year_for_mat` for basis 1. The latter can use 365, 366 or a multi-year average. Do not silently substitute a fixed 365 or call a different YEARFRAC algorithm.\n4. Using ordinary binary64 stores D, form `gain=D(redemption-price)`, `relative_gain=D(gain/price)`, `year_scale=D(B/days)` and `yield=D(relative_gain*year_scale)`.\n\nFor the example the gain is four, relative gain is about `0.041666666666666664`, and year scale is `360/30=12`. Their product is one half. The year ratio is computed separately: `((red-price)/price)*B/days` is another association with potentially different low bits.\n\nThe retained source records 25 of 25 readings distinguishing this grouped year ratio; the left-to-right candidate matched 17. Its calendar scaffolding and initial formula include a credited, changed translation of the Apache-licensed ExcelFinancialFunctions project, alongside project-owned changes guided by recorded answers. This scope does not establish every date seam or whole-function numerical agreement.\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. Price and redemption must be positive and settlement before maturity. Invalid dates give `#VALUE!`; invalid amounts, date order or basis give `#NUM!`. This is yield on purchase price, not the discount rate on redemption.\n\n\n",
    "sources": "\n- [Microsoft: YIELDDISC function](https://support.microsoft.com/en-us/excel/functions/yielddisc-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`=YIELDDISC(DATE(2027,1,1),DATE(2027,1,31),96,100,2)` is about `0.5`. The gain is four on a price of 96, annualized from thirty actual days using a 360-day year.\n\n\n",
    "version-differences": "\nNo same-input comparison between named Excel builds is recorded for this function here. The documented behaviour below is not a measurement of every Excel release.\n\n\n",
    "what-it-does": "\n`YIELDDISC(settlement,maturity,pr,redemption,[basis])` returns the annual investment yield of a discounted security. Both amounts are expressed per the same face-value unit.\n\n\n"
  },
  "signature": {
    "display": "YIELDDISC(settlement, maturity, pr, redemption, [basis])",
    "parameters": [
      {
        "description": null,
        "name": "settlement",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "maturity",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "pr",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "redemption",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "basis",
        "optional": true,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 5,
        "min": 4
      },
      "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": "Annual yield of a discounted security",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the annual yield for a discounted security; for example, a Treasury bill",
        "microsoft_url": "https://support.microsoft.com/en-us/office/yielddisc-function-a9dbdbae-7dae-46de-b995-615faffaaed7"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "YIELDDISC"
        },
        {
          "locale": "bg-BG",
          "name": "YIELDDISC"
        },
        {
          "locale": "cs-CZ",
          "name": "YIELDDISC"
        },
        {
          "locale": "da-DK",
          "name": "AFKAST.DISKONTO"
        },
        {
          "locale": "de-DE",
          "name": "YIELDDISC"
        },
        {
          "locale": "el-GR",
          "name": "YIELDDISC"
        },
        {
          "locale": "en-AU",
          "name": "YIELDDISC"
        },
        {
          "locale": "en-GB",
          "name": "YIELDDISC"
        },
        {
          "locale": "en-US",
          "name": "YIELDDISC"
        },
        {
          "locale": "es-ES",
          "name": "RENDTO.DESC"
        },
        {
          "locale": "et-EE",
          "name": "YIELDDISC"
        },
        {
          "locale": "fi-FI",
          "name": "TUOTTO.DISK"
        },
        {
          "locale": "fr-FR",
          "name": "RENDEMENT.SIMPLE*"
        },
        {
          "locale": "he-IL",
          "name": "YIELDDISC"
        },
        {
          "locale": "hr-HR",
          "name": "YIELDDISC"
        },
        {
          "locale": "hu-HU",
          "name": "HOZAM.LESZÁM"
        },
        {
          "locale": "id-ID",
          "name": "YIELDDISC"
        },
        {
          "locale": "it-IT",
          "name": "YIELDDISC"
        },
        {
          "locale": "ja-JP",
          "name": "YIELDDISC"
        },
        {
          "locale": "ko-KR",
          "name": "YIELDDISC"
        },
        {
          "locale": "lt-LT",
          "name": "YIELDDISC"
        },
        {
          "locale": "lv-LV",
          "name": "YIELDDISC"
        },
        {
          "locale": "nb-NO",
          "name": "YIELDDISC"
        },
        {
          "locale": "nl-NL",
          "name": "REND.DISCONTO"
        },
        {
          "locale": "pl-PL",
          "name": "RENT.DYSK"
        },
        {
          "locale": "pt-BR",
          "name": "YIELDDISC"
        },
        {
          "locale": "pt-PT",
          "name": "LUCRODESC"
        },
        {
          "locale": "ro-RO",
          "name": "YIELDDISC"
        },
        {
          "locale": "ru-RU",
          "name": "ДОХОДСКИДКА"
        },
        {
          "locale": "sk-SK",
          "name": "YIELDDISC"
        },
        {
          "locale": "sl-SI",
          "name": "YIELDDISC"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "YIELDDISC"
        },
        {
          "locale": "sv-SE",
          "name": "NOMAVKDISK"
        },
        {
          "locale": "th-TH",
          "name": "YIELDDISC"
        },
        {
          "locale": "tr-TR",
          "name": "ÖDEMEİND işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "YIELDDISC"
        },
        {
          "locale": "vi-VN",
          "name": "YIELDDISC"
        },
        {
          "locale": "zh-CN",
          "name": "YIELDDISC"
        },
        {
          "locale": "zh-HK",
          "name": "YIELDDISC"
        },
        {
          "locale": "zh-TW",
          "name": "YIELDDISC"
        }
      ],
      "signature": {
        "display": "YIELDDISC(settlement, maturity, pr, redemption, [basis])",
        "parameters": [
          {
            "description": null,
            "name": "settlement",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "maturity",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "pr",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "redemption",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "basis",
            "optional": true,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "YIELDDISC",
      "version_marker": null,
      "xlcall": {
        "code": "437",
        "symbol": "xlfYielddisc"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/yielddisc-function-a9dbdbae-7dae-46de-b995-615faffaaed7"
  },
  "try_it": {
    "formula": "=YIELDDISC(DATE(2027,1,1),DATE(2027,1,31),96,100,2)"
  },
  "url": "https://handbook.dnacalc.com/functions/YIELDDISC.html",
  "variants": [],
  "versions": []
}