How the size is calculated
The calculator starts from what a stop-out may cost and works back to the size. Direction comes from the stop: a stop below the entry makes the trade a long, a stop above it makes it a short.
risk amount = balance × risk %
loss per coin = |entry − stop| + fee × (entry + stop)
position size = risk amount ÷ loss per coin
notional = position size × entry
margin = notional ÷ leverage
The fee term is the entry fee plus the exit fee at the stop, each charged on the notional at that price. Including it makes the size smaller: by about 4% in the example below, and by much more on tight stops (see Common mistakes). A stop-out then costs the amount you set, with the fees already inside it. Slippage is left out: a stop-market order on a fast candle can fill beyond the stop price.
Leverage does not appear in the size formula. It decides how much margin the exchange holds for the position and, on isolated margin, where the position is liquidated. The calculator estimates that price the same way the liquidation price calculator does, entry × (1 − 1/leverage) ÷ (1 − MMR) for a long, and warns you when it lands between the entry and the stop. It also shows the highest leverage that keeps the liquidation estimate beyond the stop, so you can see how much room is left.
A worked example
Illustrative numbers only
A 10,000 USDT account risks 1% per trade. The plan is an ETH long at 2,500 with the stop at 2,440, under the last swing low, on an exchange that charges 0.05% per side.
- Risk amount10,000 × 1% = 100 USDT
- Loss per coin60 + 0.0005 × (2,500 + 2,440) = 62.47
- Position size100 ÷ 62.47 = 1.6008 ETH
- Notionalabout 4,002 USDT
- Margin at 10xabout 400 USDT
- Liquidation at 10x2,500 × (1 − 0.10) ÷ (1 − 0.005) = 2,261.31
At 10x the liquidation estimate sits far below the stop, so the stop at 2,440 closes the trade first. Push the same trade to 50x and the size stays at 1.6008 ETH while the margin drops to about 80 USDT. The liquidation estimate moves up to 2,500 × (1 − 0.02) ÷ (1 − 0.005) = 2,462.31, above the stop. A pullback to 2,460, which the plan allows for, would liquidate the position and cost close to the whole 80 USDT of margin, and the stop at 2,440 would never trade. With these numbers the liquidation estimate reaches the stop at about 34.6x.
Common mistakes
- Choosing the size first and the stop second. A stop pulled closer so the position fits ends up where nothing on the chart says the trade is wrong. Put the stop beyond the invalidation level and let that distance set the size.
- Stops on the obvious low. Equal lows and recent swing lows collect stop orders, and that pool is what a liquidity sweep runs before price turns. A stop a little past it means a wider distance and a smaller size; run both versions here and compare the cost.
- Leaving fees out on tight stops. With the stop 0.3% away, two taker fees of 0.05% add a third to the loss per coin, so a size worked out without them loses about a third more than planned at the stop.
- Rounding up. Exchanges trade in fixed steps, for example 0.001 BTC. Round the size down to the step so the stop-out stays inside the budget.
- Sizing each trade as if it were the only one. Two open trades that each risk 1% of the same balance cost 2% if one move stops both. Size the second trade with the first one in mind.
Questions
Does leverage change my position size?
No. The size comes from your risk and the stop distance. Leverage sets how much margin the exchange holds for that size and, on isolated margin, where the position is liquidated, which is why the calculator checks the liquidation estimate against your stop.
Should fees be part of the risk?
If you want a stop-out to cost what you planned, yes. The calculator adds the entry fee and the exit fee at the stop to the loss per coin, so the size comes out smaller than it would with fees ignored. Slippage on a fast candle is not included.
What does 1R mean?
1R is what you lose if the trade hits the stop. Counting results in R makes trades of different sizes comparable: a target worth 2R pays twice what the stop would cost, whether the position was 50 coins or 0.05 BTC.
Why does the exchange let me open a bigger position than this?
The exchange limit comes from your margin and leverage and knows nothing about your stop. This calculator works from the other end: it starts with what a stop-out should cost and gives the size that matches it.
Other calculators
- Liquidation price calculatorWhere an isolated long or short gets liquidated at your leverage.
- Risk/reward calculatorThe R of each target, the blended R and the break-even rate.
- Futures PnL calculatorNet profit or loss after fees, ROE on margin and the price move.