The question is similar to another question posted in the forum. You can check out the link http://tradingqna.com/232/how-to-determine-support-prices-for-stocks?show=232#q232.
As such, there is no need for a formula to calculate S/R levels. One can easily judge it by looking at OHLC in a candlestick chart.