Calculator

Forex Lot Size Calculator: How to Size a Trade From Your Risk

A forex lot size calculator works out how many lots to trade so that a full stop-loss hit costs a fixed percentage of your balance, before slippage and costs. Lots equal risk amount ÷ (stop-loss pips × pip value per lot), rounded down to the broker’s lot step. It sizes the position. It does not predict the trade.

Trading forex and CFDs involves substantial risk of loss. Automation applies rules; it does not remove trading risk. Read our risk disclosure.

Lot size calculator

Lot size (rounded down)
0.50
Amount at risk
100.00 USD
Pip value per lot
10.00 USD
Risk at the rounded size
100.00 USD

Formula: lots = risk amount ÷ (stop distance in pips × pip value per lot), rounded down to the lot step. The stop can slip in fast markets, and spread and commission add to the loss. This sizes a position. It does not make a trade safe.

Key takeaways

Forex lot size calculator formula

Position size links the distance to your stop-loss with the amount of money you accept to lose. A forex lot size calculator needs five inputs and returns a lot size.

Balance
The account balance, in the account currency.
Risk %
The share of the balance you accept to lose if the stop-loss is hit.
Stop-loss pips
The distance from entry to stop-loss, counted in pips for the pair.
Pip value per lot
What one pip is worth on one standard lot, in the account currency.
Lot step
The smallest lot increment the broker accepts, often 0.01.
Risk amount = balance × risk %Exact lots = risk amount ÷ (stop-loss pips × pip value per lot)Lots = exact lots, rounded down to the lot step
A flow runs from balance times risk percent to a risk amount, then divides that amount by stop-loss pips times pip value per lot to get exact lots, then rounds down to the lot step. An example strip shows 10,000 times 1 percent equals 100, and 100 divided by 20 times 10 equals 0.50 lots.
Concept diagram, not an app screenshot. Example values are illustrative.

The result is arithmetic on your inputs. It is a plan for the size of a trade, not a limit on what you can lose.

Worked example on EURUSD

This example uses a USD account, EURUSD and a 20-pip stop. The numbers are round figures chosen for clarity. They are not a recommendation or a forecast.

Example: risk = 10,000 × 1% = 100 USDExample: pip value per lot = 0.0001 × 100,000 × 1 = 10 USDExample: lots = 100 ÷ (20 × 10) = 0.50 lots

Check the result. At 0.50 lots, a 20-pip loss is 20 × 10 × 0.50 = 100 USD, which matches the planned 1%. Because the quote currency is already USD, no currency conversion is needed. A non-USD account would need a conversion step, as the pip calculator shows.

Why lots round down

Brokers accept lots only in fixed steps, so the exact result is rarely tradeable. The calculator rounds down to the lot step. Suppose the exact result is 0.537 lots and the lot step is 0.01. Rounding down gives 0.53 lots. Rounding to the nearest step gives 0.54 lots, which carries more risk than the calculated amount.

The calculator does not check the broker’s minimum volume. If the rounded size is below it, you cannot place that size, so the trade is either skipped or sized larger than planned.

Lot types and where to find the lot step

Standard, mini and micro lots on EURUSD, USD account, 0.0001 pip
Lot typeLotsEURUSD unitsValue of one pip
Standard1.00100,00010 USD
Mini0.1010,0001 USD
Micro0.011,0000.10 USD

Lot names are conventions, not broker rules. The figures that matter are the symbol’s contract size and volume limits. Open the Market Watch window, right-click the symbol and choose Specification. The Market Watch help page describes the fields Contract size, Minimal volume and Volume step.

Expert Advisors read the same values in code. The MQL5 symbol properties reference lists SYMBOL_VOLUME_STEP and the other volume properties.

Menu names and specification fields can vary by MT5 build and broker. Check your own terminal before you trust a default.

Fixed-fractional risk is a personal decision

Fixed-fractional sizing means risking the same percentage of the current balance on each trade. The lot size therefore falls after a losing run and rises after a winning one, because the balance itself changes. Many traders choose a small fixed percentage. That is a common practice, not a safe level, and no percentage removes the chance of loss.

Choose your percentage yourself, with your finances, your tolerance for loss and the way your strategy behaves in mind. Review the choice as your balance and circumstances change.

What the calculation does not cover

A stop-loss order does not fix the exit price. Backtests in the Strategy Tester are simulations, and demo results are not proof of live results. For how to read that evidence, see how to verify a trading bot.

Where YO4X fits

YO4X is a Windows desktop workspace for supported MetaTrader 5 strategies, bot configuration and trading journals. It runs on 64-bit Windows 10 and Windows 11. The current desktop workflow is gated to supported MT5 demo accounts, and live-money trading is not released.

Local operation needs the PC awake, YO4X open and the connection active. YO4X is software, not a broker, so your account and funds stay with your broker. Keep your own written record of each trade’s planned risk. The trading journal sits in the same YO4X workspace as the bot settings, and you can download YO4X for Windows to look at it.

Frequently asked questions

What is a forex lot size calculator?

It converts a risk amount into a position size. You enter the balance, the risk percentage, the stop-loss distance in pips and the pair, and it returns lots. It does not predict whether a trade will win, and the result depends entirely on the inputs.

How do I calculate lot size for a 20-pip stop?

Work out the risk amount, then divide it by the stop pips multiplied by the pip value per lot. On EURUSD in a USD account, a standard lot is worth about 10 USD per pip, so 100 USD at risk over a 20-pip stop gives 0.50 lots.

Why does the calculator round lots down?

Brokers accept lots only in fixed steps, often 0.01. Rounding down keeps the rounding itself from pushing the risk above the plan. Slippage and other costs can still produce a larger loss than the calculated one.

Does a lot size calculator include spread and commission?

The basic formula uses pip value only. Spread, commission, swap, slippage and gaps are not included unless you add them yourself. Check your broker’s cost schedule and treat the output as a starting point, not a complete cost estimate.

Which risk percentage should I use?

That is a personal decision. Many traders choose a small fixed percentage of the balance, but no percentage removes the chance of loss. Decide it with your own finances and loss tolerance in mind, and test the approach on a demo account first.

Where do I find the minimum lot and lot step in MT5?

Open Market Watch, right-click the symbol and choose Specification. Look for Minimal volume and Volume step. Menu names can vary by build, so check the window in your own terminal.

Keep reading

Sources: Market Watch - Trading Operations - MetaTrader 5 Help · Strategy Testing - Algorithmic Trading, Trading Robots - MetaTrader 5 Help · Symbol Properties - Environment State - MQL5 Reference

Trading forex and CFDs involves substantial risk of loss. Past performance and backtests do not guarantee future results. Read our risk disclosure before you trade.