Margin trading, or “buying on margin,” means borrowing money from your brokerage company, and using that money to buy stocks. Put simply, you’re taking out a loan, buying stocks with the lent money, and repaying that loan — typically with interest — at a later date.

Buying on margin has some serious appeal compared with using cash, but it’s important to understand that with the potential for higher returns, there’s also more risk. Margin trading is a form of leverage, which investors use to magnify their returns. However, if the investment doesn’t go as planned, that means losses can be magnified, too.

Example-

Let’s say an investor wants to purchase 200 shares of a company that’s currently trading for $30 a share, but she only has $3,000 in her brokerage account. She decides to use that cash to pay for half (100 shares) and she buys the other 100 shares on margin by borrowing $3,000 from her brokerage firm, for a total initial investment of $6,000.

Now let's say the share price rises 33% to $40. That means the value of her initial $6,000 investment grew to about $8,000. Even though she has to return the borrowed money, she gets to keep the gains it helped her achieve. In this case, after she returns the $3,000, she's left with $5,000 — a $2,000 profit. Had she invested only her $3,000 in cash, her gains would have been about $1,000.

By trading on margin, the investor doubled her profit with the same amount of cash.

Not every investment is a winner, however. In a losing scenario, the stock takes a hit and the share price drops from $30 to $20. The value of her investment falls from $6,000 to $4,000, and after she repays the loan, she has just $1,000 — a $2,000 loss. Had she invested with only her cash, her losses would only be half that, at $1,000.

And if the stock price spirals even further to, say, $10 a share? The total investment is now worth just $2,000, but the investor needs $3,000 to pay off the loan. Even after she sells the remaining shares to pay down the loan, she still owes an additional $1,000. That amounts to a total loss of $4,000 (her original $3,000 investment plus an additional $1,000 to satisfy the terms of the loan).