Black and Scholes Calculator

Black-Scholes Option Pricing Calculator

Calculate Theoretical European Call and Put Option Prices

Call Option Price
$0.00
Put Option Price
$0.00
d1: | d2:

Understanding the Black-Scholes Model

The Black-Scholes model is a mathematical framework used to determine the theoretical fair value of European-style options. Developed by Fischer Black, Myron Scholes, and Robert Merton in 1973, it remains the standard tool for financial market participants to estimate how option prices react to changes in market conditions.

Key Input Parameters

  • Stock Price (S): The current market price of the underlying asset.
  • Strike Price (K): The pre-determined price at which the option holder can buy (Call) or sell (Put) the asset.
  • Time to Expiration (T): The remaining life of the option, usually expressed in years (or days converted to years).
  • Volatility (σ): A measure of how much the stock price is expected to fluctuate. This is the most critical and subjective input.
  • Risk-Free Rate (r): The theoretical rate of return on an investment with zero risk, typically represented by government bond yields.

Example Calculation

Suppose a stock is trading at $100, and you are looking at a call option with a strike price of $100 expiring in 30 days. If the risk-free rate is 5% and the volatility is 20%, the Black-Scholes model would estimate the call price at approximately $2.32 and the put price at $1.91.

Disclaimer: This calculator is for educational purposes only. Theoretical prices may differ from market prices due to liquidity, dividends, and market sentiment.

function calculateBlackScholes() { var s = parseFloat(document.getElementById('underlyingPrice').value); var k = parseFloat(document.getElementById('strikePrice').value); var days = parseFloat(document.getElementById('timeToExpiry').value); var r = parseFloat(document.getElementById('riskFreeRate').value) / 100; var v = parseFloat(document.getElementById('volatility').value) / 100; var t = days / 365.0; if (isNaN(s) || isNaN(k) || isNaN(days) || isNaN(r) || isNaN(v) || s <= 0 || k <= 0 || t <= 0) { alert("Please enter valid positive numbers for all fields."); return; } // d1 formula: [ln(S/K) + (r + v^2/2)T] / [v * sqrt(T)] var d1 = (Math.log(s / k) + (r + Math.pow(v, 2) / 2) * t) / (v * Math.sqrt(t)); // d2 formula: d1 – v * sqrt(T) var d2 = d1 – v * Math.sqrt(t); // Cumulative Normal Distribution function approximation (Abramowitz and Stegun) function cnd(x) { var a1 = 0.31938153; var a2 = -0.356563782; var a3 = 1.781477937; var a4 = -1.821255978; var a5 = 1.330274429; var l = Math.abs(x); var k = 1.0 / (1.0 + 0.2316419 * l); var w = 1.0 – 1.0 / Math.sqrt(2.0 * Math.PI) * Math.exp(-l * l / 2.0) * (a1 * k + a2 * Math.pow(k, 2) + a3 * Math.pow(k, 3) + a4 * Math.pow(k, 4) + a5 * Math.pow(k, 5)); if (x < 0) { return 1.0 – w; } else { return w; } } // Call Price: S * N(d1) – K * e^(-rT) * N(d2) var callPrice = s * cnd(d1) – k * Math.exp(-r * t) * cnd(d2); // Put Price: K * e^(-rT) * N(-d2) – S * N(-d1) var putPrice = k * Math.exp(-r * t) * cnd(-d2) – s * cnd(-d1); // Display Results document.getElementById('callPriceResult').innerText = "$" + callPrice.toFixed(2); document.getElementById('putPriceResult').innerText = "$" + putPrice.toFixed(2); document.getElementById('d1Result').innerText = d1.toFixed(4); document.getElementById('d2Result').innerText = d2.toFixed(4); document.getElementById('bs-results').style.display = "block"; }

Leave a Comment