Exchanges set the initial margin, so you don't have to calculate that figure. If you are given the initial margin as a percentage, turn it into a decimal and multiply that by the total position size. For example, if you want to trade $10,000 worth of futures contracts that have an initial margin requirement of 25%, then you multiply 10,000 by 0.25 to arrive at your initial margin requirement of $2,500.