ACADEMY / BACKTESTING

Position size calculator: lots and contracts from risk and stop

Divide the money you accept losing by the stop distance times the value of one point, then round down. Check the result against backtest drawdown and against losses that gaps and slippage can cause.

By · Published · updated · Editorial policy

Contents
  1. How do you calculate position size from risk and stop distance?
  2. How do you calculate lot size in forex?
  3. How many ES, MES or Mini-TAIEX (小台) contracts should you trade?
  4. Why do you round down, and what does it do to your real risk?
  5. Should you size from risk per trade or from backtest drawdown?
  6. When can a loss be bigger than the planned risk?
  7. Frequently asked questions
  8. References

How do you calculate position size from risk and stop distance?

Position size is the number of lots or contracts you trade on one position. Divide the money you accept losing by the loss on one contract at your stop, which is the stop distance times the value of one point. Then round down to a whole contract or your broker's smallest lot step.

Think of a lift with a weight limit. The limit is your risk amount. Each passenger's weight is the loss on one contract. You divide the limit by the weight per person, and you never squeeze in one extra person.

Written as one formula:

Position size = Risk amount ÷ (Stop distance × Value per point)

  • Risk amount is the money you accept losing on this one trade, often a fixed percentage of the account, such as 1%.
  • Stop distance is the distance between your entry price and your stop price, measured in points, ticks or pips.
  • Value per point is the money one contract or one lot gains or loses when price moves by one unit of that same measure.

Every position size calculator, for forex or futures, does these steps:

  1. Set the risk amount: account size times your risk percentage.
  2. Measure the stop distance from your planned entry to your stop.
  3. Look up the value per point (or per tick, or per pip) for the contract.
  4. Multiply stop distance by value per point. This is the loss per contract.
  5. Divide the risk amount by the loss per contract.
  6. Round down to what you can actually trade.

A frequent mistake is mixing units. If the stop is in ticks, use the value per tick. If it is in points, use the value per point. On ES, 8 points is 32 ticks, so mixing the two gives a size four times too large or too small. Many traders set the stop distance as a multiple of the Average True Range (ATR) indicator, which measures how far price typically moves in one bar. The formula works the same way whatever sets the stop.

Position size as a flow, hypothetical ES example: a risk amount of 500 dollars divided by a loss of 400 dollars per contract (8 points times 50 dollars) gives 1.25, which is rounded down to 1 contract How many contracts fit? Hypothetical ES example, 8-point stop $500 Risk ÷ $400 8 pts × $50 = 1.25 Size Round down 1 contract Size = risk ÷ loss per contract. So: round down, never up.
The position size formula as a flow, using the hypothetical ES example from this article.

How do you calculate lot size in forex?

In forex, the calculation is the same, but you measure the stop in pips and use the pip value per lot. A lot is a standard trade size in currency units. A pip is the smallest usual price step: the fourth decimal place for most pairs, such as 0.0001 on EUR/USD, and the second decimal place for yen pairs, such as 0.01 on USD/JPY.

Lot typeUnits of base currencyPip value on EUR/USD (USD account)
Standard lot (1.00)100,000$10
Mini lot (0.10)10,000$1
Micro lot (0.01)1000$0.10

Hypothetical example

Account: $20,000. Risk per trade: 1%, so the risk amount is $200. You buy EUR/USD with a stop 25 pips below entry. One standard lot is worth $10 per pip. Loss per standard lot = 25 × $10 = $250. Lot size = $200 ÷ $250 = 0.80 lots, which is 80,000 units. Your broker accepts steps of 0.01 lot, so you trade 0.80 lots and your real risk stays at $200.

When the quote currency (the second currency in the pair) is not your account currency, convert the pip value first. On USD/JPY, one standard lot moves a thousand yen per pip. You divide that by the current USD/JPY rate to get the pip value in dollars. A good forex position size calculator does this conversion for you, which is the main reason to use one.

Measure the stop from the price you will actually get, not the mid price. A buy fills at the ask, and a stop on a long position exits at the bid. A wide spread therefore adds to the real stop distance.

How many ES, MES or Mini-TAIEX (小台) contracts should you trade?

For futures, the value per point is fixed by the exchange's contract specification, so the calculation is simple and the only extra step is rounding to whole contracts.

ContractValue per index pointMinimum price step (tick)
E-mini S&P 500 (ES)$500.25 point = $12.50
Micro E-mini S&P 500 (MES)$50.25 point = $1.25
Mini-TAIEX futures (小台, MTX)NT$501 point = NT$50

Hypothetical example

ES: Account $50,000, risk 1% = $500. Stop 8 points below entry. Loss per contract = 8 × $50 = $400. Size = $500 ÷ $400 = 1.25, so 1 contract. Real risk: $400.

MES: Same account, same stop. Loss per contract = 8 × $5 = $40. Size = $500 ÷ $40 = 12.5, so 12 contracts. Real risk: $480.

小台: Account NT$1 million, risk 1% = NT$10,000. Stop 80 points. Loss per contract = 80 × NT$50 = NT$4,000. Size = NT$10,000 ÷ NT$4,000 = 2.5, so 2 contracts. Real risk: NT$8,000.

Add expected costs to the loss per contract. A stop order usually fills a little beyond its price, and commission is paid on every round trip (entry plus exit). These costs are a larger share of the loss on small contracts, so they change the micro count more often. For a fuller treatment, see trading costs in backtests: commission, slippage and the average trade.

Hypothetical example

MES again, stop 8 points, plus 0.5 point of expected slippage on the exit and $1.50 commission per round trip. Loss per contract = 8.5 × $5 + $1.50 = $44. Size = $500 ÷ $44 = 11.4, so 11 contracts instead of 12. Real risk: $484.

After sizing by risk, check the result against margin. Margin is the deposit the broker holds for each open contract. If the margin for the risk-based size is more than your account allows, the margin sets your size. Do not widen the risk to fill the margin.

Why do you round down, and what does it do to your real risk?

Always round down, because rounding up makes the real loss at the stop larger than the amount you planned to risk. Rounding down makes the real risk smaller than planned. With large contracts, the gap between planned and real risk can be wide.

Hypothetical example

Case (from the examples)Calculated sizeTraded sizeReal riskShare of account
ES, 8-point stop1.251$4000.80%
MES, 8-point stop12.512$4800.96%
小台, 80-point stop2.52NT$8,0000.80%
ES, 12-point stop0.830$0Trade does not fit

The last row matters. A 12-point stop on ES means $600 of loss per contract, which is more than the $500 limit. The result rounds down to zero. You have three honest choices: switch to the smaller contract (8 MES, $480 at risk), accept a higher risk percentage on purpose, or skip the trade. Moving the stop closer just to make one contract fit changes the trade idea, and the stop then sits where normal noise can hit it.

Real risk as a share of the account after rounding down, hypothetical examples: against a 1 percent target, 1 ES contract risks 0.80 percent, 12 MES contracts risk 0.96 percent and 2 Mini-TAIEX contracts risk 0.80 percent Rounding down stays under 1% Real risk per trade, hypothetical Target 1% ES ×1 0.80% MES ×12 0.96% 小台 ×2 0.80% Real risk lands below the target. So: micros land closer to 1%.
Rounding down keeps real risk under the 1% target. Smaller contracts land closer to the target.

Should you size from risk per trade or from backtest drawdown?

Use both: risk per trade sets the size for one trade, and backtest drawdown tells you whether that size survives a bad run. Maximum drawdown is the largest fall in account equity from a peak to a later low. A risk-per-trade calculator does not see losing streaks, and losing streaks are what end trading accounts.

Hypothetical example

You risk 1% per trade. Ten losses in a row, each hitting the full stop, take the account down about 9.6% (each loss is 1% of a slightly smaller account). If your strategy's losses are often larger than planned, because of gaps or slippage, the fall is deeper.

Drawdown sizing starts from the strategy's history instead of one trade:

  1. Backtest the strategy with one contract, with costs included.
  2. Read the maximum drawdown for one contract.
  3. Multiply it by a safety factor, because the future drawdown can be larger than the past one.
  4. Decide the largest drawdown you would accept in money.
  5. Divide that amount by the adjusted drawdown per contract and round down.

Hypothetical example

Backtest maximum drawdown on 1 MES: $2,000. You assume the future could be twice as bad: $4,000 per contract. You accept a drawdown of $20,000 on a $100,000 account. Size = $20,000 ÷ $4,000 = 5 MES.

Risk per tradeBacktest drawdown
Question it answersHow much can I lose on this trade?How deep can a bad run go at this size?
InputsAccount, risk %, stop distance, value per pointDrawdown per contract, safety factor, accepted drawdown
Changes per trade?Yes, with each stop distanceNo, set per strategy
Blind spotLosing streaksDrawdowns worse than the tested history

Use the smaller of the two sizes. The backtest drawdown needs a safety factor for two reasons. It is only one order of trades, and a different order of the same trades can produce a deeper fall. Also, if you picked the strategy as the best of many variants, its backtest tends to look better than its future results, including its drawdown (Bailey et al., 2014). For more detail, see why the best backtest is usually inflated. MultiAlphas (Valynox) shows maximum drawdown, the equity curve and every trade in its Performance Report, which gives you the per-contract inputs for this calculation.

When can a loss be bigger than the planned risk?

A loss exceeds the planned risk when price jumps past your stop or when the stop fills worse than its price. A stop order becomes a market order when it is triggered. It then fills at the next available price, not at the stop price.

  • A gap is a jump in price between one trade and the next, with no trading in between. Gaps happen at the weekend reopening and after the daily break. On TAIEX futures they also happen between the night session (15:00–05:00 Taiwan time) and the day session (08:45–13:45). See night sessions in futures backtests.
  • Slippage is the difference between the price you planned and the price you got. It grows around news releases, at the open and in thin markets.
  • Price limits on some exchanges can halt or lock trading at the limit price, so a stop may not fill until trading resumes.

Hypothetical example

You hold 1 ES long with a stop 8 points below entry, a planned loss of $400. The market reopens 20 points below your entry. The stop fills near the open price. Loss = 20 × $50 = $1000, two and a half times the planned risk.

A gap through the stop, hypothetical: a long ES position has its stop 8 points below entry for a planned loss of 400 dollars, but after a session break the market opens 20 points below entry and the stop fills there for a loss of 1000 dollars A gap skips your stop 1 ES long, hypothetical Break Entry Stop −$400 Fill −$1000 Planned −$400, filled −$1000. So: size for the gap, too.
A gap through the stop: the stop sets the exit trigger, but the fill comes at the first available price after the gap.

Handle this in the sizing, not after the fact:

  1. Look up the largest single loss in your backtest and compare it with your planned stop loss. If it is several times larger, size from that larger loss.
  2. Include slippage in every backtest trade, and test the sessions you will actually hold through.
  3. Decide whether the strategy holds through weekends, session breaks and scheduled news. If it does, size for a gap.
  4. Use smaller contracts (MES instead of ES) when you need finer steps to keep stress losses inside your limit.

GPU backtesting in MultiAlphas includes fees and slippage, next-bar execution and trading sessions in each test. The largest losses and drawdowns in the results therefore already reflect costs and the hours you trade.

What this means if you use MultiAlphas: run the strategy on one contract with realistic costs and your real sessions, then take maximum drawdown and the largest single loss from the Performance Report as inputs for sizing. Use the per-trade formula for each trade and the drawdown check for the strategy as a whole.

Frequently asked questions

What percentage of my account should I risk per trade?

A common convention among traders is 1% or less per trade, but no number is right for everyone. Work backwards from the drawdown you would accept: estimate a long losing streak, multiply by your risk per trade, and check that the total is a fall you can live with. Then confirm the size against your backtest's maximum drawdown.

How do I calculate lot size in forex?

Divide your risk amount by the stop distance in pips times the pip value of one standard lot. On EUR/USD with a USD account, one standard lot is worth $10 per pip. Risking $200 with a 25-pip stop gives $200 ÷ $250 = 0.80 lots. For pairs where the quote currency differs from your account currency, convert the pip value first.

What if the position size calculator gives less than one futures contract?

The result rounds down to zero, so one full contract would risk more than your limit. Switch to a smaller contract, such as MES instead of ES, raise your risk on purpose, or skip the trade. Do not move the stop closer only to make the size fit.

Should position size include commission and slippage?

Yes. Add expected slippage to the stop distance and add the round-trip commission to the loss per contract. On small contracts like MES, these costs can reduce the number of contracts by one or more. Leaving them out makes your real risk larger than planned.

Is sizing from backtest maximum drawdown enough?

No, because the future drawdown can be deeper than the one in your history. The backtest shows only one order of trades, and a strategy picked as the best of many variants usually looks better in its backtest than it will trade. Apply a safety factor and use the smaller of the drawdown-based size and the per-trade size.

References

  • Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.