{
  "category": "Financial functions",
  "display_name": "PRICE",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.PRICE",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20131",
        "20228",
        "?"
      ],
      "larger_numeric": 0,
      "last_bit": 50,
      "matched": 9103,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 9153,
      "unread": 0,
      "worst_ulp": 1
    },
    "detail": "Everything else matches (9,153 in the answer bank and 7 workbook cells). Last-bit means a finite number within 16 ULP of Excel's.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "close",
    "state_label": "Close: last-bit deviations remain",
    "summary": "Close: 50 of 9,160 recorded answers differ in the last bits, worst 1 ULP",
    "workbook_corpus": {
      "cells": 7,
      "matched": 7
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/bonds.rs#L124-L127",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/bond_core_family.rs#L542-L557"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/bonds::or",
        "catalogue/bonds::bond_out",
        "catalogue/financial::date_1900",
        "locale::days_from_civil",
        "locale::civil_from_days",
        "locale::excel_serial_from_ymd",
        "locale::ymd_from_excel_serial",
        "ported/bond_core_family::max_serial",
        "ported/bond_core_family::derr",
        "ported/bond_core_family::dyear",
        "ported/bond_core_family::dim",
        "ported/bond_core_family::act",
        "ported/bond_core_family::basis",
        "ported/bond_core_family::freq",
        "ported/bond_core_family::dser",
        "ported/bond_core_family::pos",
        "ported/bond_core_family::rate",
        "ported/bond_core_family::addm",
        "ported/bond_core_family::d360us",
        "ported/bond_core_family::d360eu",
        "ported/bond_core_family::dc",
        "ported/bond_core_family::dd",
        "ported/bond_core_family::ctx",
        "ported/bond_core_family::period",
        "ported/bond_core_family::excel_bond_pow",
        "ported/bond_core_family::pcomp_disc",
        "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_pow_chain",
        "ported/excel_numeric::excel_x87_mul",
        "ported/excel_numeric/x87::mul",
        "ported/excel_numeric/x87_chains::pow2_positive",
        "ported/excel_numeric/x87_chains::pow2",
        "ported/excel_numeric/x87_chains::exp_ext",
        "ported/excel_numeric/x87_chains::exp_with",
        "ported/excel_numeric/x87_chains::excel_exp",
        "ported/excel_numeric/x87_chains::log_with",
        "ported/excel_numeric/x87_chains::excel_log"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/bonds.rs#L124-L127",
      "state": "close",
      "suite": null,
      "summary": "Close: 50 of 9,160 recorded answers differ in the last bits, worst 1 ULP"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.PRICE.json",
  "name": "PRICE",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n[YIELD](FUNC.YIELD.md) performs the inverse calculation; [ODDFPRICE](FUNC.ODDFPRICE.md) and [ODDLPRICE](FUNC.ODDLPRICE.md) handle irregular coupons.\n\n\n",
    "how-to-implement": "\nThe current code keeps coupon scheduling, the settlement fraction, discount powers and accumulation as separate stages. Unless R is named, the arithmetic below is ordinary binary64 with a store after each operation.\n\n1. Truncate and validate dates, frequency and basis. Build coupon dates backward from maturity in steps of `12/frequency` months, retaining the source’s month-end rules. Stop with previous coupon <= settlement < next coupon and count N remaining coupons.\n2. Set `C=(100*rate)/frequency`. Obtain coupon denominator E and accrued span A from the selected day-count helpers. The current denominator is 360/frequency for bases 0,2,4, 365/frequency for basis 3 and the actual coupon-period length for basis 1.\n3. Set the **internal** remaining span `DSC=E-A`, then `off=DSC/E`. Do not replace it with a fresh day count from settlement to next coupon. In particular, public COUPDAYSNC at bases 2 and 3 can differ from this derived complement; the retained coupon note records that discrepancy.\n4. If N=1, compute `den=1+(yld/frequency)*(DSC/E)`, dirty price `(redemption+C)/den`, and clean price `dirty-(C*A)/E`. Validate the positive denominator.\n5. If N>1, form `base=1+yld/frequency`. In forward coupon order, accumulate `C/discount(base,off+k)` for k=0 through N-1. Add redemption as a **separate** final term divided by `discount(base,off+N-1)`. Finally subtract accrued `(C*A)/E`.\n\nThe current discount helper uses square-and-multiply for a nonnegative integer exponent below 1024, with binary64 multiplication after each selected product and square. For other exponents it obtains stored public LN(base), forms `R(exponent*LN(base))`, then calls public EXP on that stored product. This is distinct from blindly calling a host pow or substituting the public POWER wrapper’s root shortcuts.\n\nFor the short-bond example, C=3, E=180, A=90 and DSC=90. The denominator is `1+(0.08/2)*0.5=1.02`. Dirty price is `103/1.02`, about 100.9803921569; accrued is `3*90/180=1.5`, giving clean price about 99.4803921569.\n\nThe calendar helpers include a credited, changed translation of ExcelFinancialFunctions; the project’s pricing stages are separately constrained by recorded answers. The source retains 25 integer-discount controls over five bonds and two 315-row fractional-discount holdouts on their stated scopes. Calendar seams, unmeasured route boundaries, LN/EXP internals and remaining numerical mismatches stay open. [YIELD](FUNC.YIELD.md) currently retains a different forward-power path for its solver.\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. Settlement must precede maturity; negative coupon rate, invalid frequency/basis or nonpositive redemption gives `#NUM!`. The documented PRICE domain rejects negative yield. Clean price excludes accrued coupon interest.\n\n\n",
    "sources": "\n- [Microsoft: PRICE function](https://support.microsoft.com/en-us/excel/functions/price-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- [Stored LN/product/EXP discount chain](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/ported/excel_numeric/mod.rs); `excel_pow_chain`, separate from runtime pow.\n- [COUPDAYSNC’s retained internal/public difference](FUNC.COUPDAYSNC.md); the published coupon-day quantity is not an unconditional replacement for PRICE’s internal complement.\n\n",
    "try-it": "\n`=PRICE(DATE(2027,1,1),DATE(2028,1,1),0.06,0.06,100,2,0)` is about `100`. Settlement is on a coupon date, the annual coupon and yield are both six percent, and redemption is par.\n\n`=PRICE(DATE(2027,4,1),DATE(2027,7,1),0.06,0.08,100,2,0)` is about `99.4803921569`. Only one coupon remains. The clean price subtracts 1.5 of accrued coupon interest from a dirty price about 100.9803921569.\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 | 8,417 |\n| 20228 | Windows, 64-bit, CPU not recorded | 208 |\n\n- XC-PRICE-001: build 20131 versus build 20228; 2 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.\n\nAgreement on these compared inputs does not establish agreement on unmeasured inputs.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.PRICE.json).",
    "what-it-does": "\n`PRICE(settlement,maturity,rate,yld,redemption,frequency,[basis])` returns a coupon security’s clean price per 100 face value from an annual yield. Rate is the annual coupon rate; frequency is one, two or four payments per year.\n\n\n"
  },
  "signature": {
    "display": "PRICE(settlement, maturity, rate, yld, redemption, frequency, [basis])",
    "parameters": [
      {
        "description": null,
        "name": "settlement",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "maturity",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "rate",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "yld",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "redemption",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "frequency",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "basis",
        "optional": true,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 7,
        "min": 6
      },
      "category": "Financial functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Price per 100 face value of a security with periodic coupons",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the price per $100 face value of a security that pays periodic interest",
        "microsoft_url": "https://support.microsoft.com/en-us/office/price-function-3ea9deac-8dfa-436f-a7c8-17ea02c21b0a"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "السعر"
        },
        {
          "locale": "bg-BG",
          "name": "PRICE"
        },
        {
          "locale": "cs-CZ",
          "name": "PRICE"
        },
        {
          "locale": "da-DK",
          "name": "KURS"
        },
        {
          "locale": "de-DE",
          "name": "PRICE"
        },
        {
          "locale": "el-GR",
          "name": "PRICE"
        },
        {
          "locale": "en-AU",
          "name": "PRICE"
        },
        {
          "locale": "en-GB",
          "name": "PRICE"
        },
        {
          "locale": "en-US",
          "name": "PRICE"
        },
        {
          "locale": "es-ES",
          "name": "PRECIO"
        },
        {
          "locale": "et-EE",
          "name": "PRICE"
        },
        {
          "locale": "fi-FI",
          "name": "HINTA"
        },
        {
          "locale": "fr-FR",
          "name": "PRIX.TITRE*"
        },
        {
          "locale": "he-IL",
          "name": "PRICE"
        },
        {
          "locale": "hr-HR",
          "name": "PRICE"
        },
        {
          "locale": "hu-HU",
          "name": "ÁR"
        },
        {
          "locale": "id-ID",
          "name": "PRICE"
        },
        {
          "locale": "it-IT",
          "name": "PRICE"
        },
        {
          "locale": "ja-JP",
          "name": "PRICE"
        },
        {
          "locale": "ko-KR",
          "name": "PRICE"
        },
        {
          "locale": "lt-LT",
          "name": "PRICE"
        },
        {
          "locale": "lv-LV",
          "name": "PRICE"
        },
        {
          "locale": "nb-NO",
          "name": "PRIS"
        },
        {
          "locale": "nl-NL",
          "name": "PRIJS"
        },
        {
          "locale": "pl-PL",
          "name": "CENA"
        },
        {
          "locale": "pt-BR",
          "name": "PREÇO"
        },
        {
          "locale": "pt-PT",
          "name": "PREÇO"
        },
        {
          "locale": "ro-RO",
          "name": "PRICE"
        },
        {
          "locale": "ru-RU",
          "name": "ЦЕНА"
        },
        {
          "locale": "sk-SK",
          "name": "CENA"
        },
        {
          "locale": "sl-SI",
          "name": "PRICE"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "CENA"
        },
        {
          "locale": "sv-SE",
          "name": "PRIS"
        },
        {
          "locale": "th-TH",
          "name": "PRICE"
        },
        {
          "locale": "tr-TR",
          "name": "DEĞER"
        },
        {
          "locale": "uk-UA",
          "name": "PRICE"
        },
        {
          "locale": "vi-VN",
          "name": "PRICE"
        },
        {
          "locale": "zh-CN",
          "name": "PRICE"
        },
        {
          "locale": "zh-HK",
          "name": "PRICE"
        },
        {
          "locale": "zh-TW",
          "name": "PRICE"
        }
      ],
      "signature": {
        "display": "PRICE(settlement, maturity, rate, yld, redemption, frequency, [basis])",
        "parameters": [
          {
            "description": null,
            "name": "settlement",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "maturity",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "rate",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "yld",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "redemption",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "frequency",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "basis",
            "optional": true,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "PRICE",
      "version_marker": null,
      "xlcall": {
        "code": "441",
        "symbol": "xlfPrice"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/price-function-3ea9deac-8dfa-436f-a7c8-17ea02c21b0a"
  },
  "try_it": {
    "formula": "=PRICE(DATE(2027,1,1),DATE(2028,1,1),0.06,0.06,100,2,0)"
  },
  "url": "https://handbook.dnacalc.com/functions/PRICE.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "8,417 captured inputs are indexed for this environment. Capture dates: 2026-07-19 to 2026-07-19. 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.PRICE.json"
      ]
    },
    {
      "behaviour": "208 captured inputs are indexed for this environment. Capture dates: 2026-08-09 to 2026-08-09. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20228",
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.PRICE.json"
      ]
    }
  ]
}