When you buy an option, this hedges your short option position and minimises the losses, due to this exchanges give margin benefits, which reduces the margin requirement.
Apologies for the delayed response. You don’t have to calculate the margins manually. You can use our margin calculator or use the Basket order feature on Kite to easily calculate the margins for any strategy.