Edgoro
Gold and silver · Free calculator

XAUUSD (gold) lot size calculator

On XAUUSD one lot is 100 ounces at the brokers we checked, so every $1.00 move in gold is $100 per lot: a pip (0.10) is $10 and a 2-digit point (0.01) is $1. Risking 1% of $10,000 with a 300-point stop ($3.00) gives 0.33 lots.

Risk per trade
Position size (rounded down to 0.01 lot)
0.33 lots
Risk amount$100.00
Exact size0.3333 lots
Mini lots (0.10)3.33
Micro lots (0.01)33.3
Units33.3333 oz
Value of 1 pip per lot$10.00

USD account. 1 lot = 100 oz; 1 pip = a 0.1 move. Spread and commission not included.

The calculator opens on the worked example below: a USD account, 1% of $10,000. Trading involves substantial risk of loss and is not suitable for every investor. Edgoro is a software tool, not a broker or financial adviser: nothing it produces is investment advice, and past or backtested performance does not guarantee future results.

What 1 pip is on XAUUSD

Gold is priced in US dollars per troy ounce, and Capital.com, BlackBull Markets and Purple Trading all publish a contract size of 100 for it (table below). Profit = price move × 100 × lots, already in dollars.

What traders call a gold pip varies. The calculator, like most position size tools, counts 0.10 as a pip, so a $3.00 stop is 30 pips. MetaTrader counts in points, the last digit of the quote: 0.01 on a 2-digit feed (4000.25) and 0.001 on a 3-digit feed (4000.255). The money doesn't change, $3.00 × 100 oz = $300 per lot, only the number you type does.

XAUUSD pip value per lot

Value of one pip (0.10 in price): 0.1 × 100 = $10 per 1.00 lot, with a contract size of 100.

Position1 pip30 pips (3.00)
1.00 lot$10.00$300.00
0.10 lot$1.00$30.00
0.01 lot$0.10$3.00

Worked example: 1% of $10,000

  1. Risk: 1% × $10,000 = $100.00.
  2. Stop: 30 pips = 3.00 in price.
  3. Value of 1 pip per 1.00 lot: $10.00.
  4. Lot size = $100.00 ÷ (30 × $10.00) = 0.3333, rounded down to the 0.01 step: 0.33 lots.

On a 2-digit quote, 300 points = $3.00 = 30 pips in the calculator. The exact size is 0.3333 lots, rounded down to 0.33.

"300 points" on a 3-digit quote: a $0.30 stop: $100.00 ÷ (3 × $10.00) = 3.33 lots.

Contract size and tick value in MT5

In MetaTrader 5, right-click XAUUSD in Market Watch and choose Specification: it shows Contract size, Digits, Profit currency and the volume limits. Tick size and tick value are what MQL5 reads with SYMBOL_TRADE_TICK_SIZE and SYMBOL_TRADE_TICK_VALUE; the script below prints them for your account.

Contract size100 (troy ounces) at the three brokers below
Digits2 at the three brokers below (4000.25); a 3-digit quote is possible, so check yours
Tick size (SYMBOL_TRADE_TICK_SIZE)0.01 on a 2-digit quote, 0.001 on a 3-digit quote
Profit currencyUSD
Tick value, 1.00 lot (SYMBOL_TRADE_TICK_VALUE)$1.00 per 0.01 tick with 100 oz ($0.10 per 0.001 tick)
Loss per lot at the stopstop in dollars × contract size

Published values, checked on 2026-11-12. Specifications change and can differ by account type: your own Specification window is the reference.

SourceSymbol thereContract sizePrice step
Capital.comGold1002 digits
BlackBull MarketsXAUUSD1000.01
Purple TradingXAUUSD1000.01

MQL5: lot size from a money risk

A script that sends no order: it reads the contract size, tick size, tick value and volume limits your broker sets for XAUUSD, then prints the lot size that risks 1% of the balance at the stop. The stop is a price distance (3.00), so the result is the same on 2-, 3- or 5-digit quotes. Save it as MQL5/Scripts/LotSize_XAUUSD.mq5 and compile it in MetaEditor (F7): 0 errors, 0 warnings.

MQL5
//+------------------------------------------------------------------+
//| LotSize_XAUUSD.mq5                                             |
//| Lot size that risks a % of the balance at a given stop distance|
//+------------------------------------------------------------------+
#property script_show_inputs

input string InpSymbol       = "XAUUSD"; // Symbol, exactly as in Market Watch
input double InpRiskPercent  = 1.0;      // Risk per trade, % of balance
input double InpStopDistance = 3.00;     // Stop-loss distance in price (3.00 = 30 pips)

// Lots that lose about riskMoney at the stop, rounded down to the volume step.
// Returns 0 when even the minimum volume would risk more than riskMoney.
double LotsForRisk(const string symbol, const double riskMoney, const double stopDistance)
  {
   double tickSize  = SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_SIZE);
   double tickValue = SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_VALUE); // 1.00 lot, one tick, account currency
   double step      = SymbolInfoDouble(symbol, SYMBOL_VOLUME_STEP);
   double minLot    = SymbolInfoDouble(symbol, SYMBOL_VOLUME_MIN);
   double maxLot    = SymbolInfoDouble(symbol, SYMBOL_VOLUME_MAX);
   if(tickSize <= 0.0 || tickValue <= 0.0 || step <= 0.0 || stopDistance <= 0.0)
      return 0.0;
   double lossPerLot = stopDistance / tickSize * tickValue;            // money lost by 1.00 lot at the stop
   double lots       = MathFloor(riskMoney / lossPerLot / step + 1e-9) * step;
   if(lots < minLot)
      return 0.0;
   int volumeDigits = (int)MathMax(0.0, MathCeil(-MathLog10(step) - 1e-9));
   return NormalizeDouble(MathMin(lots, maxLot), volumeDigits);
  }

void OnStart()
  {
   if(!SymbolSelect(InpSymbol, true))
     {
      PrintFormat("%s not found: use the exact name from Market Watch (some brokers add a suffix)", InpSymbol);
      return;
     }
   int    digits   = (int)SymbolInfoInteger(InpSymbol, SYMBOL_DIGITS);
   double point    = SymbolInfoDouble(InpSymbol, SYMBOL_POINT);
   double contract = SymbolInfoDouble(InpSymbol, SYMBOL_TRADE_CONTRACT_SIZE);
   double tickSize = SymbolInfoDouble(InpSymbol, SYMBOL_TRADE_TICK_SIZE);
   double tickVal  = SymbolInfoDouble(InpSymbol, SYMBOL_TRADE_TICK_VALUE);
   string currency = AccountInfoString(ACCOUNT_CURRENCY);
   double risk     = AccountInfoDouble(ACCOUNT_BALANCE) * InpRiskPercent / 100.0;
   double lots     = LotsForRisk(InpSymbol, risk, InpStopDistance);

   PrintFormat("%s: contract size %g, %d digits, tick size %s, tick value %g %s per lot",
               InpSymbol, contract, digits, DoubleToString(tickSize, digits), tickVal, currency);
   PrintFormat("Stop %s = %.0f points. Risk %.2f %s",
               DoubleToString(InpStopDistance, digits), InpStopDistance / point, risk, currency);
   if(lots > 0.0)
      PrintFormat("Lot size: %g", lots);
   else
      Print("Even the minimum volume risks more than that: widen the risk or tighten the stop");
  }

The key line is stopDistance / tickSize * tickValue: the money one lot loses at the stop, already converted to your account currency by the terminal. Dividing the risk by it and flooring to SYMBOL_VOLUME_STEP gives the volume to pass to CTrade::Buy() or CTrade::Sell().

Pine Script v6 equivalent

The same sizing on a TradingView chart, from syminfo.pointvalue (money per 1.0 of price per unit) and syminfo.mintick (the chart's tick). Checked by Edgoro Pine Check; paste it into TradingView's Pine Editor to add it to a chart.

Pine Script v6
//@version=6
indicator("XAUUSD lot size for a money risk", overlay = true)

riskMoney    = input.float(100.0, "Risk per trade (account currency)", minval = 0.01)
accountCcy   = input.string("USD", "Account currency")
stopDistance = input.float(3.00, "Stop-loss distance (price)", minval = 0.0)
contractSize = input.float(100.0, "Units per 1.00 lot at your broker", minval = 0.0)

// One unit of the symbol gains or loses syminfo.pointvalue (in syminfo.currency) per 1.0 of price
fx          = request.currency_rate(syminfo.currency, accountCcy)
lossPerUnit = stopDistance * syminfo.pointvalue * fx
units       = lossPerUnit > 0 ? riskMoney / lossPerUnit : na
lots        = contractSize > 0 ? math.floor(units / contractSize * 100) / 100 : na

var table info = table.new(position.top_right, 2, 3, bgcolor = color.new(color.gray, 80))
if barstate.islast
    table.cell(info, 0, 0, "Stop")
    table.cell(info, 1, 0, str.tostring(stopDistance / syminfo.mintick, "#") + " ticks of " + str.tostring(syminfo.mintick))
    table.cell(info, 0, 1, "Units")
    table.cell(info, 1, 1, str.tostring(units, "#.####"))
    table.cell(info, 0, 2, "Lots (rounded down)")
    table.cell(info, 1, 2, str.tostring(lots, "#.##"))

On a CFD chart syminfo.pointvalue is usually 1, so units is the number of ounces: set the contract size input to your broker's value. On a futures chart, syminfo.pointvalue already includes the contract multiplier, so units are contracts and the contract size input should be 1.

Common mistakes on XAUUSD

  • Points on a 3-digit quote. "300 points" on a 3-digit feed is $0.30, not $3.00, and sizing for it gives 3.33 lots for a $100 risk: ten times the intended position, losing about $1,000 at a real $3.00 stop. Read Digits in the Specification window, or think in dollars.
  • Forex pips on gold. Gold has no 0.0001 pip. Counting a $3.00 move as "300 pips" at $10 a pip sizes 0.03 lots instead of 0.33: the trade risks a tenth of what you planned.
  • Another contract size. 100 oz is what the brokers below publish, but a mini, micro or cent account can differ. If Contract size says something else, the value per lot changes in proportion.
  • Spread inside a short stop. If your spread is $0.30, it is a tenth of a $3.00 stop. Size for the stop plus the spread.

Lot size sets how much a trade loses if the stop is hit at its price. It doesn't make a trade a good one, and gaps or slippage can make the loss larger. Trading involves substantial risk of loss and is not suitable for every investor. Edgoro is a software tool, not a broker or financial adviser: nothing it produces is investment advice, and past or backtested performance does not guarantee future results.

All 34 symbols

Tools and code for the same job

Want the sizing inside an Expert Advisor?

Describe your XAUUSD strategy in plain English and Edgoro's MT5 EA generator writes the MQL5 Expert Advisor, with risk-based lot sizing like the script above, and compiles it in MetaEditor before you get it. Test it on a demo account: a clean build isn't proof that a strategy works.