Gold & XAUUSD

How to calculate XAUUSD lot size in MT5 (with worked examples)

By TradingAIGuide Editorial TeamPublished: Last updated: 4 min read
A balance scale weighing a crystal cube against gold bars

Quick answer

Lot size = risk amount ÷ (stop distance in dollars × contract size). Then round down to your broker's volume step. Example with a 100 oz contract: risking $50 with a $5.00 stop gives 50 ÷ (5 × 100) = 0.10 lot. Check the contract size in MT5's Specification window first, because it varies by broker.

Choosing a lot size by feel ("0.05 looks fine") is one of the quickest ways to lose more than you planned on gold. A better order is: decide how much you can afford to lose on this trade, decide where your stop goes, then let simple arithmetic choose the lot size. This guide shows the formula, how to apply it in MetaTrader 5, and three worked examples.

What you need before you calculate

  • Your account balance and currency. The examples below assume a USD account.
  • Your risk per trade, in money. This is your own decision. This guide uses 1% of the balance purely as an example, not as a recommendation.
  • Your stop-loss distance in price, for example $5.00 between entry and stop.
  • Your broker's Contract size, Minimal volume and Volume step for XAUUSD, from the MT5 Specification window.[2] Many brokers use 100 oz per lot,[3] but not all.

The formula

MT5's Forex calculation mode works out profit or loss as (close − open) × contract size × lots.[1] Turn that around and you get the lot size for a planned loss:

Lots = Risk amount ÷ (Stop distance × Contract size)

If you prefer ticks, the same idea is Lots = Risk amount ÷ ((Stop distance ÷ Tick size) × Tick value). With a tick size of 0.01 and a tick value of $1, a $5.00 stop is 500 ticks, so risking $50 gives 50 ÷ 500 = 0.10 lot: the same answer.

The pip convention does not matter here, because the stop is measured in dollars. If you are unsure what "pip" means on gold, read what is a pip in gold (XAUUSD)?

Step by step in MT5

  1. Work out your risk amount: balance × your chosen risk percentage.
  2. Mark your entry and stop on the chart and measure the distance in price. The crosshair tool helps.
  3. Read Contract size: Market Watch → right-click XAUUSD → Specification.
  4. Calculate with the formula above.
  5. Round down to the Volume step (often 0.01). Rounding up quietly increases your risk.
  6. Check Minimal volume. If the result is below it, see example 3 before trading.
  7. Enter the volume in the order window and set the stop loss at the same price you used in step 2.

Worked examples

Assumptions: USD account, contract size 100 oz, volume step 0.01, minimal volume 0.01, risk of 1% used only as an example.

BalanceRisk (1%)Stop distanceRaw resultOrder sizePlanned risk
$5,000$50$5.0050 ÷ 500 = 0.100.10 lot$50
$1,000$10$8.0010 ÷ 800 = 0.01250.01 lot$8
$200$2$5.002 ÷ 500 = 0.004Below minimum0.01 lot would risk $5 (2.5%)

Example 3 is common for small accounts. The smallest order the broker allows would risk more than planned. Moving the stop closer only to make the numbers fit changes the trade idea itself. The honest choices are to skip the trade, to accept the higher risk knowingly, or to look at an account type with a smaller contract size (check its Specification first).

Margin is not risk

In MT5's Forex mode, margin is calculated as Lots × Contract size ÷ Leverage × Margin rate, using the current price.[1] One broker's published example uses lots × contract size × price × margin percentage.[3] For instance, 0.10 lot at an example price of $4,000 with 1:100 leverage needs about 0.10 × 100 × 4,000 ÷ 100 = $400 of margin.

That $400 is the deposit needed to hold the position. Your risk is what you lose if the stop is hit: $50 in example 1. Higher leverage lowers the margin, but it does not change how much a $1 move costs you. Leverage limits differ by broker, account type and jurisdiction.

Why the real loss can be bigger than planned

  • Spread and commission are paid on top of the price move.
  • Slippage: in fast markets, such as around major US data releases, a stop can fill at a worse price.
  • Gaps: when the market reopens after a weekend or a break, price can jump past your stop.

A normal stop loss is not a guaranteed exit price. Leave a buffer in your planning.

Using a spreadsheet or an AI assistant

You can put the formula in a spreadsheet. With balance in B1, risk percentage in B2 (for example 0.01), stop distance in B3, contract size in B4 and volume step in B5:

=ROUNDDOWN(B1*B2/(B3*B4)/B5, 0)*B5

With 5000, 0.01, 5, 100 and 0.01 this returns 0.1. An AI assistant can build or explain a sheet like this, but test it against a hand-worked example (like the table above) before you trust it. AI tools can make arithmetic and unit mistakes.

Practise before risking money

Run through the calculation on a demo account until it is routine: risk amount, stop distance, contract size, round down, check the minimum. The order matters more than speed.

Keep learning

Next, learn how to set stop loss and take profit in MT5 (including why gold stops can trigger early) and the 1% risk rule with its drawdown tables. More guides are in the Gold and Risk management sections.

Frequently asked questions

How do I calculate lot size for gold in MT5?

Divide the amount you are willing to lose by the stop distance in dollars multiplied by the contract size: lots = risk ÷ (stop distance × contract size). Round down to the broker's volume step and check the minimum volume.

What lot size is 1 ounce of gold?

If your broker's XAUUSD contract size is 100 oz per lot, 0.01 lot is 1 oz. Check the Contract size field in MT5, because some accounts use a different size.

Is 0.01 lot safe for a small account?

A lot size is not safe or unsafe by itself. Risk depends on the stop distance too: with a 100 oz contract, 0.01 lot and a $10 stop risks about $10, which is 5% of a $200 account. Leveraged trading can lose money at any size.

Does MT5 calculate lot size from my risk automatically?

The standard MT5 order window asks you for the volume in lots; it does not size the trade from your risk for you. Some brokers and third-party tools add calculators. Check how they define contract size before relying on them.

Sources

  1. MQL5 Reference: Symbol Properties (profit and margin formulas, Forex mode)
  2. MetaTrader 5 Help: Market Watch, Viewing Symbol Specification
  3. FXCC: Gold contract specifications and margin example (example broker page)

Sources were checked on the date shown above. Broker pages, where cited, are examples of published specifications only, not recommendations. Regulator lists change often, so always check the official portal directly.

TradingAIGuide Editorial Team

Articles are researched and written by the TradingAIGuide editorial team, checked against primary sources such as MetaTrader documentation and official regulator pages, and updated when facts change.

How we write and review →

Further reading