Traders use implied volatility (IV) to quote an option's price. Unfortunately, no equation exists to explicitly calculate this value so we instead use numerical methods.
First, we estimate the option's IV and then plug that estimate into an equation. This equation measures the error in our estimate and returns a better approximation of implied volatility. We repeat this process until our guess is equal to the option's IV.
There are two methods that we can use to initially estimate the option's IV. The first method comes from Bharadia, Christopher and Salkin and the second comes from Corrado and Miller. The first model offers a quicker approximation while the Corrado-Miller offers a more accurate approximation.
The Bharadia, Christopher and Salkin model is given by:
Here, T is the time to maturity, P is the current market price of the option, S is the stock price, K is the strike price, and r is the risk-free discount rate.
Alternatively, the Corrado-Miller model is given by:
I know, that's quite intimidating. If you are only working with near-the-money options, use Bharadia, Christopher and Salkin's model. Otherwise, you should use the Corrado-Miller approximation.
There are two methods that we can use to calculate the option's IV. The first method comes from Sir Isaac Newton and should be used if you have a well-defined vega. Otherwise, you should use the secant method.
The Newton-Raphson method is given by:
The process in words:
1) Set your initial σ equal to your initial IV approximation.
2) Find the Black-Scholes option price based on σ.
3) Take the value you calculated in step 2 and subtract the option's
current market price.
4) Calculate the option's Black-Scholes vega V(σ)
5) Multiply the values from step 3 and step 4: (BS(σ) - P)(V(σ))
6) Add the values from step 1 and step 5. This gives you a new estimate
7) Repeat 1-6 using the value from step 6.
8) Repeat this process until Step 5 equals 0. then your value from step 6           is the IV.
9) If Step 8 is true, then your most recent σ is your option's IV.
Alternatively, the secant method is given by:
You can see that the Secant method is identical to the Newton-Raphson method, except that the Secant method's last term is an approximation of vega.
The process in words:
1) Set σ zero equal to zero.
2) Set σ one equal to your initial IV approximation plus 0.5
(to be conservative).
3) Use the Secant equation to complete steps 2-9 of the Newton-Raphson
There you have it! Step by step instructions of how to calculate an option's implied volatility.