curatedapi

Black-Scholes option price and Greeks calculator

The Black-Scholes-Merton price of a European call or put with delta, gamma, vega, theta and rho, correct to the last digit shown.

The underlying's price now. A ratio of two decimals such as "0.08/12" is accepted.
The option's strike price. A ratio of two decimals such as "0.08/12" is accepted.
Time to expiry in years. Write days as a ratio, such as "30/365". A ratio of two decimals such as "0.08/12" is accepted.
Volatility per year in percent (20 for 20%).
Risk-free interest rate per year in percent, continuously compounded.
Dividend yield per year in percent, continuously compounded.
Call or put. Options: call: the right to buy; put: the right to sell
More options: rounding and decimals
Precision and rounding
Rounding mode applied once to each result. Default half_even.
Round results to this many digits after the decimal point.
Round results to this many significant digits.

Examples

Result: A six-month call: stock at 42, strike 40, 10% rate, 20% volatility

Price
The option's value.
4.759422 rounded
Delta
Change in the price for a change of 1 in the underlying price.
0.779131 rounded
Gamma
Change in delta for a change of 1 in the underlying price.
0.049963 rounded
Vega
Change in the price for one percentage point more volatility.
0.088134 rounded
Theta
Change in the price over one calendar day, other things equal.
-0.012491 rounded
Rho
Change in the price for one percentage point more interest.
0.139820 rounded
D1
The model's d1.
0.769263 rounded
D2
The model's d2.
0.627841 rounded

Rounding: Half even, 6 decimal places. Calculator finance/black-scholes@1.

How it is calculated

call = S·e^(−qT)·Φ(d1) − K·e^(−rT)·Φ(d2); put = K·e^(−rT)·Φ(−d2) − S·e^(−qT)·Φ(−d1); d1 = (ln(S/K) + (r − q + σ²/2)·T) / (σ·√T), d2 = d1 − σ·√T

Values a European option on a stock, index or currency with the Black-Scholes formula, with Merton's extension for a continuous dividend yield. The answer has the price and the five Greeks, and d1 and d2 for checking by hand. The normal distribution is evaluated with proven error bounds, so every digit returned is correct, including for options far in or out of the money where spreadsheet formulas lose digits.

  • The model is for European options, which can be exercised only at expiry. An American option is worth at least as much, and more when early exercise can pay.
  • Rates are continuously compounded and per year, and time is in years. A rate quoted with annual compounding, R, is ln(1 + R) continuously compounded.
  • vega and rho are the change for a move of one percentage point in volatility or the rate; theta is the change over one calendar day (the yearly figure divided by 365).

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.

Use it from your code

POST /v1/calc/finance/black-scholesVersion 1
curl https://api.curatedapi.com/v1/calc/finance/black-scholes \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "spot": "42",
    "strike": "40",
    "time_to_expiry_years": "0.5",
    "volatility_percent": "20",
    "risk_free_rate_percent": "10",
    "option_type": "call"
  }'
The same call in Python
import os

import requests

payload = {
    "spot": "42",
    "strike": "40",
    "time_to_expiry_years": "0.5",
    "volatility_percent": "20",
    "risk_free_rate_percent": "10",
    "option_type": "call",
}
response = requests.post(
    "https://api.curatedapi.com/v1/calc/finance/black-scholes",
    headers={"Authorization": f"Bearer {os.environ['CURATEDAPI_KEY']}"},
    json=payload,
    timeout=10,
)
print(response.json()["result"])
The same call in JavaScript
const payload = {
    "spot": "42",
    "strike": "40",
    "time_to_expiry_years": "0.5",
    "volatility_percent": "20",
    "risk_free_rate_percent": "10",
    "option_type": "call",
};
const response = await fetch("https://api.curatedapi.com/v1/calc/finance/black-scholes", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CURATEDAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});
console.log((await response.json()).result);

MCP tool calc_finance_black_scholes at https://mcp.curatedapi.com. Inputs, outputs and errors in the API reference.

Put it on your website

<div data-curatedapi-widget="finance/black-scholes" data-key="capi_public_…"></div>
<script src="https://widgets.curatedapi.com/v1/widget.js" async></script>

Use a public key registered for your site. Calculations are billed like API calls. How widgets work.

Related calculators

Add this calculator to your website

Paste two lines into your page and your visitors get this calculator. Each use counts as one call on your plan, the same as the API.

Free for up to 1,000 uses a month. 50,000 uses a month cost $9.00 on the Starter plan.