Calculating the margin for a forex deal is straightforward. Simply multiply the trade's value by the margin percentage. Then, subtract the margin used on all trades from your account's remaining equity. The resulting value represents the remaining margin.