Basis for calculating Margin for option selling

Would like to know the basis for margin calculator for option selling. pls help

This should help you.