Free strategy check — send your trading rules and we tell you within 24 hours if they can be automated. No obligation. Send your rules →
Risk14 Nov 2026 · Eye Algo

Position size, or lot size, decides how much you lose if your stop loss is hit. Calculating it before every trade keeps the risk the same from trade to trade.

The formula

Lot size = risk amount ÷ (stop loss distance × value of one price unit per lot)

  1. Risk amount = account balance × risk percent. For a 10,000 account risking 1 percent, the risk amount is 100.
  2. Stop loss distance is the distance between entry and stop, in price units.
  3. Value per price unit per lot depends on the symbol's contract size.

Worked example: gold (XAUUSD)

On many brokers 1 lot of XAUUSD is 100 ounces, so a 1 dollar move in price is 100 dollars per lot. Check your broker's contract size, because it can differ.

  • Balance 10,000 and risk 1 percent: risk amount 100.
  • Stop loss 5 dollars away from entry.
  • Loss per lot at the stop: 5 × 100 = 500.
  • Lot size: 100 ÷ 500 = 0.20 lot.

Things to remember

  • Round the lot down to your broker's lot step, and keep it above the minimum lot.
  • Spread and slippage can make the real loss a little larger than planned.
  • For forex pairs and indices, use that symbol's contract size and tick value from the broker's specification.

Automate it

An EA can calculate the lot size from your risk percent on every trade, and a calculator page can do it before you place the order. See trailing, break-even and partial close for managing the trade after entry.

We build position size calculators and other small trader tools as single pages that open in any browser. See Software & web tools.
Have a strategy you want automated?Get a free strategy check
← All articles