Position Size Calculator
Work out how many units to buy so that being stopped out costs exactly the percentage of your account you chose to risk. Shows stop distance, notional value and the leverage implied.
- Amount at risk
- 100.00 USD
- Stop distance
- 1,200.00 (2.00%)
- Position size
- 0.083333 units
- Notional value
- 5,000.00 USD
- Leverage needed
- 0.50×
Position size = (balance × risk %) ÷ |entry − stop|. Fees, funding and slippage are not included, so treat the result as an upper bound rather than an exact order size.
How the number is worked out
Position sizing inverts the usual question. Instead of deciding how much to buy and discovering afterwards what a stop-out would cost, you fix the cost first and let it determine the size:
risk amount = balance × risk %
stop distance = |entry − stop|
position size = risk amount ÷ stop distance Everything else falls out of those three lines. Notional value is the position size multiplied by the entry price, and the leverage shown is that notional divided by the account balance — which is why it is an output rather than something you type in.
The part worth noticing
Stop distance and position size move in opposite directions. Halving the distance between entry and stop doubles the size the formula returns, for exactly the same risk. That is arithmetically correct and often practically wrong: a stop placed close enough to double the size is also close enough to be hit by ordinary noise, so the trade takes the maximum loss more often. A tight stop does not reduce risk on its own — it relocates it from size to frequency.
The leverage line is worth watching for the same reason. If the implied leverage is high, check the leverage and stop-loss table to see whether liquidation would arrive before your stop does. A stop that sits beyond your liquidation price is decorative.
Enforcing it rather than recalculating it
The calculator is the easy half. The hard half is that the number has to hold at the moment of placing the order, which is exactly when it is most tempting to round up. That is the case for having the limit live in code rather than in intention — a per-trade cap that rejects the order is not subject to the mood you are in when you place it.
CoTrading enforces per-trade and per-account position caps locally as deterministic checks, alongside a daily-loss breaker and a losing-streak cooldown. They run as plain functions on your machine, not as instructions to a language model, so they behave the same on the tenth trade of a bad day as on the first.
FAQ
What percentage of an account should be risked per trade?
There is no universally correct number, and anyone who gives you one without knowing your situation is guessing. The reason small percentages are common is arithmetic rather than opinion: the smaller the fraction risked per trade, the longer a losing streak has to run before the account is materially damaged. Whatever number you settle on, the useful part is applying it consistently rather than re-deciding it trade by trade.
Why does the calculator show leverage I did not enter?
Leverage here is an output, not an input. Once risk percentage and stop distance are fixed, position size is determined — and dividing that notional by the account balance tells you the leverage required to hold it. A tight stop on a large risk budget can imply leverage far higher than expected, which is usually a sign to widen the stop or lower the risk, not to raise the leverage.
Does this account for fees and funding?
No. It sizes the position from the stop distance alone. Taker fees on entry and exit, and funding payments on a perpetual position held across settlement, all come out of the same account. Treat the output as an upper bound and size slightly below it.
Does it work for shorts?
Yes. Only the absolute distance between entry and stop matters, so a stop above the entry works the same as one below it.