How margin get calculated in options selling?

suppose if am buying PE of a stoct at 10 rupees premium with a lot size of 100 then amount i have to pay here is 10×100=1000, then how much i have to pay if am selling PE of same strike price?

You easily can calculate the margin requirements for Shorting Options here.

yeah i know that, just want know how does it calculated? for buying its clear that premium×lot size= amount that i have to pay for that contract, but what for selling?