how margin calculated on sold calls or puts

How the margin is calculated on sold calls and sold puts.
I got that shares are transferred into broker a/c and still they charged interest charges because of cash ledger has not sufficient amount.
so for sold calls and sold puts margin must be in cash amount or share margin is valid.
If cash margin is mandatory then which is the formula to calculate margin amount for sold calls and sold puts.

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Are you a day trader?