Black-Scholes calculator
Price a European call or put and read off every Greek. Change any input and the results update instantly.
How it works
Black-Scholes prices an option as the discounted expected payoff under the risk-neutral measure, assuming the stock follows geometric Brownian motion with constant volatility. The two probabilities and do the work: is the risk-neutral probability the call finishes in the money, and is the call's delta.
The Greeks are the partial derivatives of the price. Vega is shown per 1 volatility point, theta per calendar day and rho per 1 percentage point of rate, the way trading screens quote them.
Assumptions
- European exercise only: the option can be exercised at expiry and nowhere else.
- Constant volatility and interest rate over the option's life.
- Rates and dividend yield are continuously compounded.
- Theta uses a 365-day year.
Show the codePython, runs in the playground
import numpy as np
from scipy.stats import norm
def black_scholes(S, K, r, sigma, T, q=0.0):
d1 = (np.log(S / K) + (r - q + 0.5 * sigma**2) * T) / (sigma * np.sqrt(T))
d2 = d1 - sigma * np.sqrt(T)
call = S * np.exp(-q * T) * norm.cdf(d1) - K * np.exp(-r * T) * norm.cdf(d2)
put = K * np.exp(-r * T) * norm.cdf(-d2) - S * np.exp(-q * T) * norm.cdf(-d1)
delta_call = np.exp(-q * T) * norm.cdf(d1)
gamma = np.exp(-q * T) * norm.pdf(d1) / (S * sigma * np.sqrt(T))
vega = S * np.exp(-q * T) * norm.pdf(d1) * np.sqrt(T) / 100 # per vol point
return call, put, delta_call, gamma, vega, d1, d2
call, put, delta, gamma, vega, d1, d2 = black_scholes(S=100, K=100, r=0.05, sigma=0.20, T=1.0)
print(f"Call price: {call:.6f}")
print(f"Put price: {put:.6f}")
print(f"Delta (call): {delta:.6f}")
print(f"Gamma: {gamma:.6f}")
print(f"Vega per vol point: {vega:.6f}")
print(f"d1: {d1:.6f} d2: {d2:.6f}")
Questions
What does the Black-Scholes calculator need?
Spot price, strike, time to expiry in years, the risk-free rate, volatility and, optionally, a continuous dividend yield. Rates and volatility are entered in percent.
Is this the same as the price my broker shows?
Only if the inputs match. Brokers back out the volatility from market prices (implied volatility), and listed US equity options are American, which can be worth slightly more than the European value for puts and for calls on dividend-paying stocks.
Why does theta show per day?
The formula gives theta per year. Dividing by 365 gives the time decay for one calendar day, which is how most screens show it.
What is a quick sanity check?
Spot 100, strike 100, one year, 5% rate and 20% volatility gives a call of about 10.45 and a put of about 5.57. The difference equals S minus the discounted strike, which is put-call parity.
Educational use only, not investment advice. Results depend on the model's assumptions listed above and on your inputs. Calculations run in your browser and nothing you enter is sent to a server.