Hello, I am trying to build an Excel spreadsheet that will tell me how many shares I can buy given a current Margin Buying Power and Non-Margin Buying power I assume on the non-margin buying power the formula is just (non-margin buying power)/(price per share). However, I get a little confused on the Margin Buying Power calculations, especially when there is an additional maintenance requirement on the underlying at my brokerage. Can anyone help me out with the formula here? Thanks!!