Ah! You will need slightly different formulas, depending on Dividends (discrete or continuous), and the amount of the dividends. The formula above produces a value which can be put back into the B&S formula in place of underlying price, for continuous dividends, such as SPX, without having to quantify them, by specifying the yield input to B&S as zero. However, this value is not the SPOT, but the SPOT adjusted for dividend, so another step is needed to get the SPOT price. Hopefully JackRab has this already handy, else I can dig up some papers that hopefully will shed some more light.
For accuracy, you must approximate the interest rate adequately!!! I use LIBOR rates, which are close enough for my purposes for options out to about 3 months. If you need to go out to a year or so, you will need better interest rate approximations than LIBOR. -- LIBOR rates avail from FED Reserve. "
https://fred.stlouisfed.org/"