Option calculator

Choose the option and set its inputs. The price, the chart and the Greeks change as you type, and the last part shows every step of the calculation with your numbers.

European options: the Black-Scholes-Merton formula

A European option can be exercised only at expiry. Its price comes from the Black-Scholes-Merton formula, here with a dividend yield (Level 7 explains the formula step by step):

\[ \begin{aligned} c &= S e^{-qT} N(d_1) - K e^{-rT} N(d_2),\\ p &= K e^{-rT} N(-d_2) - S e^{-qT} N(-d_1), \end{aligned} \]

\[ \begin{aligned} d_1 &= \frac{\ln(S/K) + (r - q + \sigma^2/2)\,T}{\sigma\sqrt{T}},\\ d_2 &= d_1 - \sigma\sqrt{T}, \end{aligned} \]

where \(c\) and \(p\) are the prices of a call and a put, \(S\) is the share price today, \(K\) the strike price, \(T\) the time to expiry in years, \(r\) the risk-free rate and \(q\) the dividend yield, both yearly rates with continuous compounding, and \(\sigma\) the volatility, the standard deviation of the share’s yearly return; the last three are decimals, so 4% is 0.04. \(N(x)\) is the probability that a standard normal variable is below \(x\), and \(\ln\) is the natural logarithm.

American options: a binomial tree

An American option can also be exercised on any day before expiry, and there is no general formula for its price. The calculator divides the time to expiry into 1,000 steps of length \(\Delta t = T/1000\). In each step the share price moves up by the factor \(u = e^{\sigma\sqrt{\Delta t}}\) or down by \(d = 1/u\), and an up move has the risk-neutral probability

\[ p = \frac{e^{(r - q)\Delta t} - d}{u - d}, \]

the probability at which the tree prices the option without arbitrage. At expiry the option’s payoff is \(\max(S_T - K, 0)\) for a call and \(\max(K - S_T, 0)\) for a put, where \(S_T\) is the share price at expiry. Going back one step at a time, each node of the tree is worth the larger of its intrinsic value, the payoff from exercising there, and the value of keeping the option:

\[ V = \max\Big(\text{intrinsic value},\ e^{-r\Delta t}\big[p\, V_u + (1 - p)\, V_d\big]\Big), \]

where \(V\) is the option’s value at a node, and \(V_u\) and \(V_d\) are its values one step later, after an up and after a down move. The calculator values the same tree twice, with and without early exercise. Their difference estimates the extra value of being able to exercise early, which is never negative. The calculator adds this estimate to the European price from the formula, then takes the larger of that result and the intrinsic value; where the tree says to exercise at once, the American price is the intrinsic value itself. This correction, known as the control variate technique, often reduces the tree’s error, but it does not remove all numerical error. When interest rates are zero or positive, a call on a share without dividends is never worth exercising early, so its American and European prices are equal.

The Greeks

For a European option the Greeks come from the Black-Scholes-Merton formula. For an American option, delta, gamma and theta are the formula’s European values plus the difference between the American and the European tree’s estimates of the same Greek, from their first steps (where the tree says to exercise at once, the American tree’s own estimates), and vega and rho come from pricing the option again with the volatility or the risk-free rate one percentage point higher and lower. These are numerical estimates. Theta is per calendar day, and vega and rho per percentage point.

What the calculator assumes

The risk-free rate and the dividend yield are yearly rates with continuous compounding, and the volatility is the standard deviation of the share’s yearly return; a rate quoted another way is converted first, as in Level 3. All three stay the same until expiry, and the dividends are paid as a steady yield rather than as cash amounts on set dates. Prices are per share; an exchange-traded option contract usually covers 100 shares.

How the calculator is checked

Automated tests compare the calculator with prices computed separately in Python. In every tested case, the American price is within half a cent of the value from trees of 10,000 steps, and it is never below the European price or the option’s intrinsic value.