curatedapi
Browse the docs

Guides

Finance

Excel functions

Late payments

E-invoices

Accounting

Number checks

VAT and GST

Billing and pricing

Money and currencies

Dates and time

Math

Unit conversion

Everyday

Health

Excel PRICE function: bond price per 100 face value API

The clean price per 100 of a bond paying periodic coupons, from its yield, as Excel's PRICE.

POST https://api.curatedapi.com/v1/calc/excel/price

PRICE(settlement, maturity, rate, yld, redemption, frequency, [basis]). Coupon dates count back from maturity in steps of 12/frequency months (a month-end maturity keeps every coupon on a month end). The accrued interest is subtracted, so this is the clean price.

Formula

Σ discounted coupons + discounted redemption − accrued interest
  • Arguments are named and ordered as in Excel. Excel computes in binary floating point; this API computes the exact value of the same formula and rounds it once, so it agrees with Excel to the digits Excel can show, and where Excel's own rounding error reaches the 15th digit this answer is the correct one.
  • Dates are ISO 8601 (YYYY-MM-DD) from 1900-03-01 to 9999-12-31, so Excel's fictional 29 February 1900 never comes into play. Each date result also gives Excel's serial number (1900 date system).

Inputs

Send numbers as strings to keep every digit. options sets precision and rounding (see numbers and rounding).

InputTypeDescription
settlement required date (YYYY-MM-DD) Settlement date (when the buyer gets the bond).
maturity required date (YYYY-MM-DD) Maturity date.
rate required decimal (string) Annual coupon rate as a decimal. A ratio of two decimals such as "0.08/12" is accepted. Allowed: >= 0 and <= 100.
yld required decimal (string) Annual yield as a decimal. A ratio of two decimals such as "0.08/12" is accepted. Allowed: >= 0 and <= 100.
redemption required decimal (string) Redemption value per 100 of face value. A ratio of two decimals such as "0.08/12" is accepted. Allowed: > 0 and <= 1000000.
frequency required integer Coupons per year: 1, 2 or 4. Allowed: >= 1 and <= 4.
basis integer
default 0
Day count basis: 0 US (NASD) 30/360; 1 Actual/actual; 2 Actual/360; 3 Actual/365; 4 European 30/360. Allowed: >= 0 and <= 4.
options.rounding half_even | half_up | half_down | up | down | ceiling | floor Rounding mode applied once to each result. Default half_even.
options.decimals integer Round results to this many digits after the decimal point.
options.significant_digits integer Round results to this many significant digits.

Result

Under result in the answer, next to exactness, precision, inputs, formula, references and warnings.

ResultTypeDescription
pricedecimal (string)Clean price per 100 of face value.
coupons_remainingintegerCoupons from settlement to maturity (N).

Examples

Microsoft's example: 5.75% semiannual coupon at a 6.5% yield

Requestcurl
curl https://api.curatedapi.com/v1/calc/excel/price \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "settlement": "2008-02-15",
    "maturity": "2017-11-15",
    "rate": "0.0575",
    "yld": "0.065",
    "redemption": "100",
    "frequency": 2,
    "basis": 0,
    "options": {"decimals": 4}
  }'
200 OKResponse
{
  "calculator": "excel/price@2",
  "result": {
    "price": "94.6344",
    "coupons_remaining": 20
  },
  "exactness": {
    "price": "rounded"
  },
  "precision": {
    "rounding": "half_even",
    "decimals": 4
  },
  "inputs": {
    "settlement": "2008-02-15",
    "maturity": "2017-11-15",
    "rate": "0.0575",
    "yld": "0.065",
    "redemption": "100",
    "frequency": 2,
    "basis": 0
  },
  "formula": "Σ discounted coupons + discounted redemption − accrued interest",
  "references": [
    {
      "title": "Microsoft Excel PRICE function",
      "url": "https://support.microsoft.com/en-us/excel/functions/price-function"
    },
    {
      "title": "Microsoft PRICE function formulas (DAX reference, same definition as Excel)",
      "url": "https://learn.microsoft.com/en-us/dax/price-function-dax"
    }
  ],
  "warnings": []
}

References

Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.

Errors share one format; see errors. Billing, retries and batches work the same for every endpoint.