To calculate the put-call ratio one needs to check the open interst of puts and calls and divide it! But we have different puts and different calls so how it is calculated?

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.

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.

Also, there are several types of PCR.

Not OI . .volume.