{
  "category": "Financial functions",
  "display_name": "TBILLPRICE",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.TBILLPRICE",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 3600,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 3600,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 3,600 in the answer bank and 11 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 3,611 recorded answers",
    "workbook_corpus": {
      "cells": 11,
      "matched": 11
    }
  },
  "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#L211-L214",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/discount_bill_yearfrac_family.rs#L310-L334"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/bonds::bill_arguments",
        "catalogue/bonds::bill_out",
        "catalogue/financial::required_number",
        "catalogue/financial::date_1900",
        "locale::days_from_civil",
        "locale::civil_from_days",
        "locale::excel_serial_from_ymd",
        "locale::ymd_from_excel_serial",
        "ported/discount_bill_yearfrac_family::max_excel_serial",
        "ported/discount_bill_yearfrac_family::parse_date_serial",
        "ported/discount_bill_yearfrac_family::actual_days",
        "ported/discount_bill_yearfrac_family::tbill_days",
        "ported/discount_bill_yearfrac_family::map_discount_bill_yearfrac_error_to_ws"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/bonds.rs#L211-L214",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 3,611 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.TBILLPRICE.json",
  "name": "TBILLPRICE",
  "notes": [
    {
      "basis": "8 recorded readings with an empty B1, one per function, each paired with a reading with TRUE in B1.",
      "documentation": null,
      "evidence": [
        {
          "commit": "c4c5dde7e2dcf735d2849835fc49769e2ab67ba7",
          "locator": "delivered_fn4_blank_date_references_read_serial_zero",
          "note": "recorded answers pinned",
          "path": "apps/dna-onecalc/tests/acceptance.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": "sheets qa031 and qa032, and the like pairs of each function",
          "note": "recorded readings",
          "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-arguments.capture.json",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.NETWORKDAYS",
        "FUNC.NETWORKDAYS.INTL",
        "FUNC.TBILLEQ",
        "FUNC.TBILLPRICE",
        "FUNC.TBILLYIELD",
        "FUNC.WORKDAY",
        "FUNC.WORKDAY.INTL",
        "FUNC.YEARFRAC"
      ],
      "inferred": null,
      "kind": "quirk",
      "note_id": "FN-WORKDAY-001",
      "open": [
        "An argument left empty in the call was not read here for YEARFRAC and the T-bill functions."
      ],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "=NETWORKDAYS(B1,5)",
          "correct": null,
          "excel": {
            "bits": "0x4010000000000000",
            "display": "4",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "(empty cell)",
                "kind": "blank"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qa032, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-arguments.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=NETWORKDAYS(B1,5)",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "TRUE",
                "kind": "logical"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qa031, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-arguments.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=WORKDAY(B1,2)",
          "correct": null,
          "excel": {
            "bits": "0x4008000000000000",
            "display": "3",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "(empty cell)",
                "kind": "blank"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qa054, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-arguments.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=WORKDAY(B1,2)",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "TRUE",
                "kind": "logical"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qa053, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-arguments.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=NETWORKDAYS.INTL(B1,5,1)",
          "correct": null,
          "excel": {
            "bits": "0x4010000000000000",
            "display": "4",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "(empty cell)",
                "kind": "blank"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qa040, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-arguments.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=WORKDAY.INTL(B1,2,1)",
          "correct": null,
          "excel": {
            "bits": "0x4008000000000000",
            "display": "3",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "(empty cell)",
                "kind": "blank"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qa062, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-arguments.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=YEARFRAC(B1,5,0)",
          "correct": null,
          "excel": {
            "bits": "0x3f8c71c71c71c71c",
            "display": "0.013888888888888888",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "(empty cell)",
                "kind": "blank"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qa072, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-arguments.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=TBILLEQ(B1,5,0.1)",
          "correct": null,
          "excel": {
            "bits": "0x3fb9fddd1b6a757f",
            "display": "0.10152990264255911",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "B1",
              "value": {
                "bits": null,
                "display": "(empty cell)",
                "kind": "blank"
              }
            }
          ],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qa082, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-arguments.capture.json",
            "repository": "DnaCalc"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "A reference to an empty cell as the first date of these functions reads as serial 0 and gives a normal answer: NETWORKDAYS(B1,5) is 4 and WORKDAY(B1,2) is 3. YEARFRAC(B1,5,0) is 5/360. TRUE in the same cell gives #VALUE!, as a direct TRUE does, so a blank is not treated as the logical FALSE either.",
      "status": "measured",
      "title": "An empty cell as a first date is serial 0, but a logical in that cell is #VALUE!"
    }
  ],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[TBILLYIELD](FUNC.TBILLYIELD.md) computes a bill investment yield; [TBILLEQ](FUNC.TBILLEQ.md) computes its specified equivalent yield; [PRICEDISC](FUNC.PRICEDISC.md) accepts a general basis.\n\n\n\n\n",
    "how-to-implement": "\n1. Coerce the date arguments through the workbook’s date system and truncate their serial values. Validate the discount as finite and positive. Keep the date coercion layer separate: the notes below record a blank reference reading as serial zero, while a logical reference gives `#VALUE!`.\n2. Require settlement before maturity. Convert settlement to year, month and day; construct the next-year date with Excel’s day rollover. Reject maturity beyond that serial date. In the current helper this uses the 1900 date-system conversion functions, including their treatment of Excel’s fictitious leap day.\n3. Let `days=maturity-settlement`. These are actual serial days, without a 30/360 adjustment.\n4. With `D` meaning one nearest/even binary64 rounding, calculate `product=D(discount*days)`, `fraction=D(product/360)`, `remaining=D(1-fraction)`, then `price=D(100*remaining)`. Keep these separate stores and disable contraction into fused operations.\n5. Return `#NUM!` for a nonpositive calculated price; otherwise pass the result through the worksheet’s numeric publisher.\n\nFor the thirty-day example, the mathematical discount fraction is `0.06*30/360=0.005`, so the price is `100*(1-0.005)=99.5`. A discount of twelve over thirty days instead consumes the full face value and reaches the nonpositive-price guard.\n\nThis is the current code’s ordinary binary64 graph. The security functions beside it use other stored arithmetic sites, and [PRICEDISC](FUNC.PRICEDISC.md) subtracts a redemption discount using a different association. An algebraically identical formula does not settle their last bits.\n\n\n",
    "quirks": "\nDate values are truncated. Invalid dates give `#VALUE!`; a nonpositive discount or an invalid/too-long settlement-to-maturity interval gives `#NUM!`. There is no optional basis argument.\n\nThe one-year limit follows calendar rollover, rather than a fixed 365-day cap or an end-of-month clamp. The cited build-20430 controls admit settlement 29 February 2044 with maturity 1 March 2045, but reject settlement 28 February 1991 with maturity 29 February 1992. The first limit is the result of `DATE(2045,2,29)`, which rolls into March.\n\nThe current helper rejects equal settlement and maturity, and also rejects a calculated price at or below zero. The opened Microsoft remarks explicitly mention settlement later than maturity and nonpositive discount; they do not spell out those two additional guards. A positive discount alone does not ensure a positive price.\n\n\n",
    "sources": "\n- [Microsoft: TBILLPRICE function](https://support.microsoft.com/en-us/excel/functions/tbillprice-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/discount_bill_yearfrac_family.rs); implementation steps and the limits identified in the text.\n\n",
    "try-it": "\n`=TBILLPRICE(DATE(2027,1,1),DATE(2027,1,31),0.06)` returns about `99.5`. Thirty days at a six-percent annual discount remove `100*0.06*30/360=0.5` from par.\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| 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.TBILLPRICE.json).",
    "what-it-does": "\n`TBILLPRICE(settlement,maturity,discount)` returns a Treasury bill price per 100 face value using an annual discount rate and an actual-day, 360-day denominator.\n\n\n"
  },
  "signature": {
    "display": "TBILLPRICE(settlement, maturity, discount)",
    "parameters": [
      {
        "description": null,
        "name": "settlement",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "maturity",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "discount",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 3,
        "min": 3
      },
      "category": "Financial functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "None",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Treasury bill price per 100 of face value, from its discount rate",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the price per $100 face value for a Treasury bill",
        "microsoft_url": "https://support.microsoft.com/en-us/office/tbillprice-function-eacca992-c29d-425a-9eb8-0513fe6035a2"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "TBILLPRICE"
        },
        {
          "locale": "bg-BG",
          "name": "TBILLPRICE"
        },
        {
          "locale": "cs-CZ",
          "name": "TBILLPRICE"
        },
        {
          "locale": "da-DK",
          "name": "STATSOBLIGATION.KURS"
        },
        {
          "locale": "de-DE",
          "name": "TBILLPRICE"
        },
        {
          "locale": "el-GR",
          "name": "TBILLPRICE"
        },
        {
          "locale": "en-AU",
          "name": "TBILLPRICE"
        },
        {
          "locale": "en-GB",
          "name": "TBILLPRICE"
        },
        {
          "locale": "en-US",
          "name": "TBILLPRICE"
        },
        {
          "locale": "es-ES",
          "name": "LETRA.DE.TES.PRECIO"
        },
        {
          "locale": "et-EE",
          "name": "TBILLPRICE"
        },
        {
          "locale": "fi-FI",
          "name": "OBLIG.HINTA"
        },
        {
          "locale": "fr-FR",
          "name": "PRIX.BON.TRESOR*"
        },
        {
          "locale": "he-IL",
          "name": "TBILLPRICE"
        },
        {
          "locale": "hr-HR",
          "name": "TBILLPRICE"
        },
        {
          "locale": "hu-HU",
          "name": "KJEGY.ÁR"
        },
        {
          "locale": "id-ID",
          "name": "TBILLPRICE"
        },
        {
          "locale": "it-IT",
          "name": "TBILLPRICE"
        },
        {
          "locale": "ja-JP",
          "name": "TBILLPRICE"
        },
        {
          "locale": "ko-KR",
          "name": "TBILLPRICE"
        },
        {
          "locale": "lt-LT",
          "name": "TBILLPRICE"
        },
        {
          "locale": "lv-LV",
          "name": "TBILLPRICE"
        },
        {
          "locale": "nb-NO",
          "name": "TBILLPRIS"
        },
        {
          "locale": "nl-NL",
          "name": "SCHATK.PRIJS"
        },
        {
          "locale": "pl-PL",
          "name": "CENA.BS"
        },
        {
          "locale": "pt-BR",
          "name": "TBILLPRICE"
        },
        {
          "locale": "pt-PT",
          "name": "OTNVALOR"
        },
        {
          "locale": "ro-RO",
          "name": "TBILLPRICE"
        },
        {
          "locale": "ru-RU",
          "name": "ЦЕНАКЧЕК"
        },
        {
          "locale": "sk-SK",
          "name": "TBILLPRICE"
        },
        {
          "locale": "sl-SI",
          "name": "TBILLPRICE"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "TBILLPRICE"
        },
        {
          "locale": "sv-SE",
          "name": "SSVXPRIS"
        },
        {
          "locale": "th-TH",
          "name": "TBILLPRICE"
        },
        {
          "locale": "tr-TR",
          "name": "HTAHDEĞER işlevi"
        },
        {
          "locale": "uk-UA",
          "name": "TBILLPRICE"
        },
        {
          "locale": "vi-VN",
          "name": "TBILLPRICE"
        },
        {
          "locale": "zh-CN",
          "name": "TBILLPRICE"
        },
        {
          "locale": "zh-HK",
          "name": "TBILLPRICE"
        },
        {
          "locale": "zh-TW",
          "name": "TBILLPRICE"
        }
      ],
      "signature": {
        "display": "TBILLPRICE(settlement, maturity, discount)",
        "parameters": [
          {
            "description": null,
            "name": "settlement",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "maturity",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "discount",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "TBILLPRICE",
      "version_marker": null,
      "xlcall": {
        "code": "439",
        "symbol": "xlfTbillprice"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/tbillprice-function-eacca992-c29d-425a-9eb8-0513fe6035a2"
  },
  "try_it": {
    "formula": "=TBILLPRICE(DATE(2027,1,1),DATE(2027,1,31),0.06)"
  },
  "url": "https://handbook.dnacalc.com/functions/TBILLPRICE.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "2,400 captured inputs are indexed for this environment. Capture dates: 2026-09-24 to 2026-09-25. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20430",
      "platform": "Windows, 64-bit, AMD Ryzen 7 4800H with Radeon Graphics",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.TBILLPRICE.json"
      ]
    }
  ]
}