{
  "category": "Financial functions",
  "display_name": "DISC",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.DISC",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 2400,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 2400,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 2,400 in the answer bank and 66 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 2,466 recorded answers",
    "workbook_corpus": {
      "cells": 66,
      "matched": 66
    }
  },
  "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#L191-L194",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/discount_bill_yearfrac_family.rs#L179-L204"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/bonds::basis",
        "catalogue/bonds::bill_out",
        "catalogue/financial::date_1900",
        "locale::days_from_civil",
        "locale::civil_from_days",
        "locale::excel_serial_from_ymd",
        "locale::ymd_from_excel_serial",
        "ported/day_count_common::days_in_month",
        "ported/day_count_common::us_30_360",
        "ported/day_count_common::real_days_in_year",
        "ported/day_count_common::excel_actual_actual_year",
        "ported/discount_bill_yearfrac_family::max_excel_serial",
        "ported/discount_bill_yearfrac_family::parse_basis",
        "ported/discount_bill_yearfrac_family::parse_date_serial",
        "ported/discount_bill_yearfrac_family::actual_days",
        "ported/discount_bill_yearfrac_family::days360_us",
        "ported/discount_bill_yearfrac_family::days360_eu",
        "ported/discount_bill_yearfrac_family::security_days_and_year",
        "ported/discount_bill_yearfrac_family::map_discount_bill_yearfrac_error_to_ws",
        "ported/excel_numeric::binary_with",
        "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::sub",
        "ported/excel_numeric/x87::div"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/bonds.rs#L191-L194",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 2,466 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.DISC.json",
  "name": "DISC",
  "notes": [
    {
      "basis": "2,400 of 2,400 rows for each function with stored precision-64 arithmetic. Plain binary64 matches 2,398 to 2,399 of the same rows, so few rows separate the two; keeping intermediates in 80-bit registers without stores loses 475 to 1,335.",
      "documentation": null,
      "evidence": [
        {
          "commit": "26bb1800d3b349e44d594bed5f8bb589b528ef10",
          "locator": "lines 435-466",
          "note": "recorded answers pinned",
          "path": "crates/calc-func/tests/f3_financial.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "f1774082865e3a5ab7dec27ead7aeebb73b078c2",
          "locator": "counts",
          "note": "stored-PC64 against other precisions",
          "path": "evidence/round23/security-1900-hard/summary.json",
          "repository": "DnaCalc-Research"
        },
        {
          "commit": "f1774082865e3a5ab7dec27ead7aeebb73b078c2",
          "locator": "recorded_completed_groups",
          "note": "18,040 of 18,040 outcomes",
          "path": "round23-result.json",
          "repository": "DnaCalc-Research"
        }
      ],
      "functions": [
        "FUNC.DISC",
        "FUNC.INTRATE",
        "FUNC.PRICEDISC",
        "FUNC.RECEIVED",
        "FUNC.TBILLYIELD"
      ],
      "inferred": null,
      "kind": "bit-matching-detail",
      "note_id": "FN-DISC-001",
      "open": [],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "DISC(37655, 38261, 94.87631295104353, 102.73579504052532, 3)",
          "correct": {
            "bits": "0x3fa79784b622b019",
            "display": "0.04607786868413672",
            "how": "Exact rational value of the same formula from the binary64 inputs, correctly rounded.",
            "kind": "number"
          },
          "excel": {
            "bits": "0x3fa79784b622b014",
            "display": "0.046077868684136686",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x40e262e000000000",
                "display": "37655",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x40e2aea000000000",
                "display": "38261",
                "kind": "number"
              }
            },
            {
              "name": "pr",
              "value": {
                "bits": "0x4057b81582ea72c4",
                "display": "94.87631295104353",
                "kind": "number"
              }
            },
            {
              "name": "redemption",
              "value": {
                "bits": "0x4059af174414e760",
                "display": "102.73579504052532",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x4008000000000000",
                "display": "3",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H",
          "source": {
            "commit": "4d5320dfdc385354469b4d506153357bb932ab08",
            "locator": "line 1458, key DISC|0x40e262e000000000|0x40e2aea000000000|0x4057b81582ea72c4|0x4059af174414e760|0x4008000000000000",
            "note": null,
            "path": "cache/oracle-20430/build-20430/DISC.jsonl.gz",
            "repository": "CalcFunc-Evidence"
          }
        },
        {
          "call": "TBILLYIELD(47701, 47702, 2.279784366464575)",
          "correct": {
            "bits": "0x40ce237bcaff5178",
            "display": "15430.967132487087",
            "how": "Exact rational value of the same formula from the binary64 inputs, correctly rounded.",
            "kind": "number"
          },
          "excel": {
            "bits": "0x40ce237bcaff517a",
            "display": "15430.96713248709",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x40e74aa000000000",
                "display": "47701",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x40e74ac000000000",
                "display": "47702",
                "kind": "number"
              }
            },
            {
              "name": "pr",
              "value": {
                "bits": "0x40023cff95ff2def",
                "display": "2.279784366464575",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H",
          "source": {
            "commit": "4d5320dfdc385354469b4d506153357bb932ab08",
            "locator": "line 413, key TBILLYIELD|0x40e74aa000000000|0x40e74ac000000000|0x40023cff95ff2def",
            "note": null,
            "path": "cache/oracle-20430/build-20430/TBILLYIELD.jsonl.gz",
            "repository": "CalcFunc-Evidence"
          }
        },
        {
          "call": "INTRATE(58548, 58599, 428532.13421818457, 6.805737049418593, 0)",
          "correct": null,
          "excel": {
            "bits": "0xc01cccaed31c9766",
            "display": "-7.199885653133469",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x40ec968000000000",
                "display": "58548",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x40ec9ce000000000",
                "display": "58599",
                "kind": "number"
              }
            },
            {
              "name": "investment",
              "value": {
                "bits": "0x411a27d089707de5",
                "display": "428532.13421818457",
                "kind": "number"
              }
            },
            {
              "name": "redemption",
              "value": {
                "bits": "0x401b39132211b6ad",
                "display": "6.805737049418593",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x0000000000000000",
                "display": "0",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H",
          "source": {
            "commit": "4d5320dfdc385354469b4d506153357bb932ab08",
            "locator": "line 2326, key INTRATE|0x40ec968000000000|0x40ec9ce000000000|0x411a27d089707de5|0x401b39132211b6ad|0x0000000000000000",
            "note": null,
            "path": "cache/oracle-20430/build-20430/INTRATE.jsonl.gz",
            "repository": "CalcFunc-Evidence"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "With B the year basis and D the day count, Excel evaluates DISC = (1 - pr/red) * (B/D); INTRATE = ((red - inv)/inv) * (B/D); RECEIVED = inv / (1 - (disc*D)/B); PRICEDISC = red - ((disc*red)*D)/B; TBILLYIELD = ((100 - pr)/pr) * (360/D), each + - * / taken from the x87 unit at precision 64 and stored to binary64. Results can sit several units from the exact value: the DISC row below is 5 units below it.",
      "status": "measured",
      "title": "The discount-security functions run a fixed formula order on the x87 unit"
    },
    {
      "basis": "19 YEARFRAC readings around serial 60 and the 1904, 2000 and 2004 leap days, 35 readings with serial 0 on all five bases, and 3 readings each from five financial functions.",
      "documentation": null,
      "evidence": [
        {
          "commit": "c4c5dde7e2dcf735d2849835fc49769e2ab67ba7",
          "locator": null,
          "note": "the leap-day test as implemented",
          "path": "crates/calc-func/src/ported/day_count_common.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": "delivered_scalar_readings_follow_the_application_route",
          "note": "recorded answers pinned",
          "path": "apps/dna-onecalc/tests/acceptance.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": null,
          "note": "87 recorded readings",
          "path": "crates/calc-func/tests/captures/fn4_questions/YEARFRAC.reading.json",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.ACCRINTM",
        "FUNC.DISC",
        "FUNC.INTRATE",
        "FUNC.PRICEDISC",
        "FUNC.RECEIVED",
        "FUNC.YEARFRAC"
      ],
      "inferred": null,
      "kind": "quirk",
      "note_id": "FN-YEARFRAC-001",
      "open": [
        "An argument left empty in the call, as in YEARFRAC(,5), has not been read."
      ],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "YEARFRAC(59, 60, 1)",
          "correct": null,
          "excel": {
            "bits": "0x3f66719f3601671a",
            "display": "0.0027397260273972603",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "start_date",
              "value": {
                "bits": "0x404d800000000000",
                "display": "59",
                "kind": "number"
              }
            },
            {
              "name": "end_date",
              "value": {
                "bits": "0x404e000000000000",
                "display": "60",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-YEARFRAC-fictitious-leap-day-3",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/YEARFRAC.reading.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "YEARFRAC(1520, 1521, 1)",
          "correct": null,
          "excel": {
            "bits": "0x3f6661ec6a5122f9",
            "display": "0.00273224043715847",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "start_date",
              "value": {
                "bits": "0x4097c00000000000",
                "display": "1520",
                "kind": "number"
              }
            },
            {
              "name": "end_date",
              "value": {
                "bits": "0x4097c40000000000",
                "display": "1521",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-YEARFRAC-fictitious-leap-day-9",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/YEARFRAC.reading.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "YEARFRAC(0, 5, 0)",
          "correct": null,
          "excel": {
            "bits": "0x3f8c71c71c71c71c",
            "display": "0.013888888888888888",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "start_date",
              "value": {
                "bits": "0x0000000000000000",
                "display": "0",
                "kind": "number"
              }
            },
            {
              "name": "end_date",
              "value": {
                "bits": "0x4014000000000000",
                "display": "5",
                "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-YEARFRAC-calendar-zero-11",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/YEARFRAC.reading.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "YEARFRAC(0, 60, 1)",
          "correct": null,
          "excel": {
            "bits": "0x3fc50a8542a150a8",
            "display": "0.1643835616438356",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "start_date",
              "value": {
                "bits": "0x0000000000000000",
                "display": "0",
                "kind": "number"
              }
            },
            {
              "name": "end_date",
              "value": {
                "bits": "0x404e000000000000",
                "display": "60",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-YEARFRAC-fictitious-leap-day-1",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/YEARFRAC.reading.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "DISC(59, 60, 99, 100, 1)",
          "correct": null,
          "excel": {
            "bits": "0x400d33333333333a",
            "display": "3.650000000000003",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x404d800000000000",
                "display": "59",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x404e000000000000",
                "display": "60",
                "kind": "number"
              }
            },
            {
              "name": "pr",
              "value": {
                "bits": "0x4058c00000000000",
                "display": "99",
                "kind": "number"
              }
            },
            {
              "name": "redemption",
              "value": {
                "bits": "0x4059000000000000",
                "display": "100",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-DISC-fictitious-leap-day-1",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/DISC.reading.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "DISC(1520, 1521, 99, 100, 1)",
          "correct": null,
          "excel": {
            "bits": "0x400d47ae147ae14f",
            "display": "3.6600000000000033",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x4097c00000000000",
                "display": "1520",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x4097c40000000000",
                "display": "1521",
                "kind": "number"
              }
            },
            {
              "name": "pr",
              "value": {
                "bits": "0x4058c00000000000",
                "display": "99",
                "kind": "number"
              }
            },
            {
              "name": "redemption",
              "value": {
                "bits": "0x4059000000000000",
                "display": "100",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-DISC-fictitious-leap-day-2",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/DISC.reading.json",
            "repository": "DnaCalc"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "Excel's calendar holds a 29 February 1900, serial 60, that never existed. On basis 1 (actual/actual) it does not make 1900 a leap year: YEARFRAC(59,60,1) is 1/365, where the real 1904-02-29 gives YEARFRAC(1520,1521,1) = 1/366. Serial 0 is accepted as a date: YEARFRAC(0,5,0) is 5/360 and YEARFRAC(0,60,1) is 60/365. Reversed dates give the same answer as in order. ACCRINTM, DISC, INTRATE, PRICEDISC and RECEIVED take the same 365 and 366 on those dates: DISC(59,60,99,100,1) is about 3.65 and DISC(1520,1521,99,100,1) about 3.66.",
      "status": "measured",
      "title": "On basis 1 the fictitious 1900-02-29 is not a leap day, and YEARFRAC takes serial 0 as a date"
    }
  ],
  "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- **[INTRATE](FUNC.INTRATE.md)** — the same trade quoted on the investment instead of the\n  redemption, with the exact conversion given above. The pair is the single most useful thing to\n  keep straight in this family.\n- **`PRICEDISC`** — the inverse: given `DISC`'s rate, recover `pr`. `PRICEDISC(DISC(...))` should\n  round-trip up to floating-point rounding.\n- **`YIELDDISC`** — the *yield* of a discounted security, which is the `INTRATE`-side quotation of\n  the same instrument; do not read it as an inverse of `DISC`.\n- **`TBILLYIELD` / `TBILLPRICE` / `TBILLEQ`** — the same discount arithmetic hard-wired to the\n  Treasury-bill Actual/360 convention, with no `basis` argument and their own 182-day rules.\n- **`YEARFRAC`** — the year-fraction machinery `DISC` depends on, exposed directly. If a `DISC`\n  answer looks wrong, evaluating `YEARFRAC(settlement, maturity, basis)` is the fastest way to\n  find out whether the day count or the price ratio is the culprit.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\n`DISC` is arithmetically trivial and definitionally hard. Almost all of the difficulty is in `T`.\n\n**Day counts are integer arithmetic on a calendar, and the calendar rules are the algorithm.** The\n30/360 conventions are not approximations of the actual calendar; they are separate, exactly\nspecified counting rules, and the US (NASD) and European variants differ precisely in how they\ntreat the 31st and the end of February. An implementation that gets the price ratio right to the\nlast bit and the end-of-month adjustment wrong is wrong by cents, not by ULPs.\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns `Number` — an annualized rate expressed as a decimal fraction, so 5.34% comes back as\n`0.0534`.\n\n- **`settlement ≥ maturity`** is a domain error, not a negated result. There is no\n  \"reversed-dates\" reading; see Errors below.\n- **`pr > redemption`** is admissible and returns a negative rate.\n- **Basis choice changes the answer materially**, not marginally: a 91-day bill priced on\n  Actual/360 and on Actual/365 differ in the fourth significant figure of the rate. The basis is\n  part of the quotation, not a rounding preference.\n- **Non-integer `basis`** is truncated toward zero before the range check, so `basis = 4.9` reads\n  as `4`.\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\nAs documented on Microsoft's `DISC` page:\n\n| Error | Condition |\n|---|---|\n| `#VALUE!` | `settlement` or `maturity` is not a valid serial date number |\n| `#NUM!` | `pr ≤ 0`, or `redemption ≤ 0` |\n| `#NUM!` | `basis < 0` or `basis > 4` |\n| `#NUM!` | `settlement ≥ maturity` |\n\nNon-numeric text in any slot and error values in any argument surface under the shared coercion\nrules.\n\n\n",
    "sources": "- Microsoft, \"DISC function\" —\n  <https://support.microsoft.com/en-us/office/disc-function-71fce9f3-3f05-4acf-a5a3-eac6ef4daa53>\n  (syntax, argument meanings, the day-count basis table, the serial-date and truncation remarks,\n  and the `#VALUE!` and `#NUM!` conditions listed above).\n- Handbook, [The value universe](../model/01-value-universe.md) and\n  [Coercion and lifting](../model/02-coercion-and-lifting.md) — argument kinds, numeric coercion\n  and error propagation.\n- Handbook, [Claim language and honesty](../model/06-claim-language.md) — the scoping rules this\n  page's claims are written under.\n- Handbook projections `data/functions/FUNC.DISC.json` and `data/presence/FUNC.DISC.json`\n  (arity, classification axes, implementing module and sibling set).\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 | 2,400 |\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.DISC.json).",
    "what-it-does": "\n`DISC(settlement, maturity, pr, redemption, [basis])` returns the **discount rate** of a security\nbought at price `pr` per 100 of face value and redeemed at `redemption` per 100 at maturity.\n\nThe underlying model is *simple bank discount*, not compound interest. Let\n\n- `T` = the year fraction from settlement to maturity under the chosen day-count `basis`,\n- `d` = the discount rate the function returns.\n\nThe model is the linear price relation\n\n    pr = redemption × (1 − d × T)\n\nand `DISC` inverts it:\n\n    d = (redemption − pr) / redemption × 1/T\n      = (1 − pr/redemption) / T\n\nWritten the way Microsoft's page writes it, with `B` the number of days in the year implied by\nthe basis and `DSM` the number of days from settlement to maturity, `T = DSM/B` and\n\n    DISC = (redemption − pr) / redemption × B / DSM\n\nThe defining feature — and the reason `DISC` and `INTRATE` are not the same function with the\narguments renamed — is the **denominator of the yield fraction**. `DISC` divides the gain by the\n*redemption* value, the amount you get back. `INTRATE` divides it by the *investment*, the amount\nyou put in. Money-market instruments are quoted both ways, and swapping them is a real pricing\nerror, not a rounding one.\n\nThe two are related exactly: with `r` the `INTRATE` figure on the same dates and amounts,\n\n    r = d / (1 − d·T)        and        d = r / (1 + r·T)\n\nDomain and range: `d` is unbounded above as `T → 0` (a security maturing tomorrow at any discount\nimplies a huge annualized rate), and `d < 0` whenever `pr > redemption` — a premium purchase gives\na negative discount rate. The function has a pole at `T = 0`, which the settlement-before-maturity\nrequirement removes from the admissible domain.\n\nNothing here is compounded. `DISC` is a first-order quotation convention; over long horizons it is\nnot a rate of return in any compounding sense.\n\n\n\n### Arguments\n\n\n| Argument | Meaning | Default |\n|---|---|---|\n| `settlement` | The settlement date — when the security trades to the buyer. Required. | — |\n| `maturity` | The maturity date — when the security expires. Required. | — |\n| `pr` | The security's price per $100 face value. Required. | — |\n| `redemption` | The security's redemption value per $100 face value. Required. | — |\n| `basis` | The day-count basis. Optional. | 0 |\n\nMicrosoft's page documents the basis values as:\n\n| `basis` | Method |\n|---|---|\n| 0 or omitted | US (NASD) 30/360 |\n| 1 | Actual/actual |\n| 2 | Actual/360 |\n| 3 | Actual/365 |\n| 4 | European 30/360 |\n\nTwo documented rules that matter more than they look:\n\n1. **Dates are Excel serial numbers**, and `settlement`, `maturity` and `basis` are **truncated to\n   integers**. A date-with-time argument therefore loses its time part silently.\n2. **`pr` and `redemption` are per 100 of face value**, not amounts. A bill with 1,000,000 face\n   bought for 987,500 is `pr = 98.75`, not `987500`. Because both appear only in the ratio\n   `pr/redemption`, passing both as raw amounts happens to give the same answer — but mixing one\n   raw amount with one per-100 quote does not, and the function cannot detect it.\n\nThe argument slots are numeric and subject to ordinary to-number coercion; see\n[Coercion and lifting](../model/02-coercion-and-lifting.md).\n\n\n"
  },
  "signature": {
    "display": "DISC(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": "None",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Yearly discount rate implied by a security's price and redemption value",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the discount rate for a security",
        "microsoft_url": "https://support.microsoft.com/en-us/office/disc-function-71fce9f3-3f05-4acf-a5a3-eac6ef4daa53"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "DISC"
        },
        {
          "locale": "bg-BG",
          "name": "DISC"
        },
        {
          "locale": "cs-CZ",
          "name": "DISC"
        },
        {
          "locale": "da-DK",
          "name": "DISKONTO"
        },
        {
          "locale": "de-DE",
          "name": "RABATT"
        },
        {
          "locale": "el-GR",
          "name": "DISC"
        },
        {
          "locale": "en-AU",
          "name": "DISC"
        },
        {
          "locale": "en-GB",
          "name": "DISC"
        },
        {
          "locale": "en-US",
          "name": "DISC"
        },
        {
          "locale": "es-ES",
          "name": "DISC"
        },
        {
          "locale": "et-EE",
          "name": "DISC"
        },
        {
          "locale": "fi-FI",
          "name": "DISKONTTOKORKO"
        },
        {
          "locale": "fr-FR",
          "name": "DISQUE"
        },
        {
          "locale": "he-IL",
          "name": "DISC"
        },
        {
          "locale": "hr-HR",
          "name": "DISC"
        },
        {
          "locale": "hu-HU",
          "name": "LESZÁM"
        },
        {
          "locale": "id-ID",
          "name": "DISC"
        },
        {
          "locale": "it-IT",
          "name": "DISC"
        },
        {
          "locale": "ja-JP",
          "name": "DISC"
        },
        {
          "locale": "ko-KR",
          "name": "구역"
        },
        {
          "locale": "lt-LT",
          "name": "DISC"
        },
        {
          "locale": "lv-LV",
          "name": "DISC"
        },
        {
          "locale": "nb-NO",
          "name": "DISC"
        },
        {
          "locale": "nl-NL",
          "name": "DISCONTO"
        },
        {
          "locale": "pl-PL",
          "name": "STOPA.DYSK"
        },
        {
          "locale": "pt-BR",
          "name": "DESC."
        },
        {
          "locale": "pt-PT",
          "name": "DESC"
        },
        {
          "locale": "ro-RO",
          "name": "DISC"
        },
        {
          "locale": "ru-RU",
          "name": "СКИДКА"
        },
        {
          "locale": "sk-SK",
          "name": "DISC"
        },
        {
          "locale": "sl-SI",
          "name": "DISC"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "DISC"
        },
        {
          "locale": "sv-SE",
          "name": "DISK"
        },
        {
          "locale": "th-TH",
          "name": "DISC"
        },
        {
          "locale": "tr-TR",
          "name": "İNDİRİM işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "DISC"
        },
        {
          "locale": "vi-VN",
          "name": "DISC"
        },
        {
          "locale": "zh-CN",
          "name": "圆盘"
        },
        {
          "locale": "zh-HK",
          "name": "DISC"
        },
        {
          "locale": "zh-TW",
          "name": "DISC"
        }
      ],
      "signature": {
        "display": "DISC(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": "DISC",
      "version_marker": null,
      "xlcall": {
        "code": "435",
        "symbol": "xlfDisc"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/disc-function-71fce9f3-3f05-4acf-a5a3-eac6ef4daa53"
  },
  "try_it": {
    "formula": "=DISC(37655, 38261, 94.87631295104353, 102.73579504052532, 3)"
  },
  "url": "https://handbook.dnacalc.com/functions/DISC.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "DISC(37655, 38261, 94.87631295104353, 102.73579504052532, 3) returned 0.046077868684136686 (0x3fa79784b622b014). 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 build 20430",
      "observations": [
        {
          "call": "DISC(37655, 38261, 94.87631295104353, 102.73579504052532, 3)",
          "excel": {
            "bits": "0x3fa79784b622b014",
            "display": "0.046077868684136686",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x40e262e000000000",
                "display": "37655",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x40e2aea000000000",
                "display": "38261",
                "kind": "number"
              }
            },
            {
              "name": "pr",
              "value": {
                "bits": "0x4057b81582ea72c4",
                "display": "94.87631295104353",
                "kind": "number"
              }
            },
            {
              "name": "redemption",
              "value": {
                "bits": "0x4059af174414e760",
                "display": "102.73579504052532",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x4008000000000000",
                "display": "3",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800H"
        }
      ],
      "platform": "Windows 64-bit, AMD Ryzen 7 4800H",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/3345a87/content/notes/FN-DISC-001.json"
      ]
    },
    {
      "behaviour": "DISC(59, 60, 99, 100, 1) returned 3.650000000000003 (0x400d33333333333a). DISC(1520, 1521, 99, 100, 1) returned 3.6600000000000033 (0x400d47ae147ae14f). 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": "DISC(59, 60, 99, 100, 1)",
          "excel": {
            "bits": "0x400d33333333333a",
            "display": "3.650000000000003",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x404d800000000000",
                "display": "59",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x404e000000000000",
                "display": "60",
                "kind": "number"
              }
            },
            {
              "name": "pr",
              "value": {
                "bits": "0x4058c00000000000",
                "display": "99",
                "kind": "number"
              }
            },
            {
              "name": "redemption",
              "value": {
                "bits": "0x4059000000000000",
                "display": "100",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file"
        },
        {
          "call": "DISC(1520, 1521, 99, 100, 1)",
          "excel": {
            "bits": "0x400d47ae147ae14f",
            "display": "3.6600000000000033",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "settlement",
              "value": {
                "bits": "0x4097c00000000000",
                "display": "1520",
                "kind": "number"
              }
            },
            {
              "name": "maturity",
              "value": {
                "bits": "0x4097c40000000000",
                "display": "1521",
                "kind": "number"
              }
            },
            {
              "name": "pr",
              "value": {
                "bits": "0x4058c00000000000",
                "display": "99",
                "kind": "number"
              }
            },
            {
              "name": "redemption",
              "value": {
                "bits": "0x4059000000000000",
                "display": "100",
                "kind": "number"
              }
            },
            {
              "name": "basis",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "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-YEARFRAC-001.json"
      ]
    },
    {
      "behaviour": "2,400 captured inputs are indexed for this environment. Capture dates: 2026-09-25 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.DISC.json"
      ]
    }
  ]
}