Do not do so much math, just type nifty put call ratio live on google even in live market, iifl site came , open it , there the ratio
Sum of the total OI of different Put and calls. An excel sheet for OI analysis with realtime update from NSE.
https://www.facebook.com/download/1623525171256576/NIFTYmain.xlsm
PCR is a ratio of Traded contracts, i.e, it is ratio of Put volume by Call Volume (not Open Interest). Also, multiple strikes of Puts + Calls, as well as different calender month contracts are taken for calculating PCR.
http://www.investopedia.com/ask/answers/06/putcallratio.asp
Also, there are several types of PCR.
Not OI . .volume.