How does this calculator work?
For USD-quoted pairs, each pip on 1 lot is worth $10. For USDJPY and USDCAD the pip value depends on the current price, so enter the price. For gold, silver, indices and crypto, enter the stop loss as the dollar move in price (e.g. gold from 2400 to 2395 = 5). Contract sizes for these symbols differ between brokers; read the real number in MetaTrader by right-clicking the symbol → Specification.
The size is always rounded down so your actual loss never exceeds the risk you chose. Full explanation with examples in the lot size article.