How the position size calculator works
The sum starts from the loss, not from the money you have. First it works out the amount at risk: account size times the risk per trade. Then it works out what one coin loses if the stop is hit: the distance between entry and stop, plus the fee on the way in and on the way out. The position size is the first number divided by the second.
Leverage does not change the size. It only changes how much margin the exchange sets aside for it. A position sized this way loses the same amount at the stop with 1x or with 20x; what leverage adds is the danger of being liquidated before the stop if the stop is far.
The formula
size = (account × risk %) ÷ (|entry − stop| + (entry + stop) × fee per side)
A worked example
Account 1,000 dollars, risk 1%, entry 60,000, stop 58,800, fee 0.055% per side. The amount at risk is 10 dollars. One coin loses 1,200 plus 65.34 in fees, 1,265.34 in all. Size: 10 ÷ 1,265.34 = 0.0079 BTC, worth about 474 dollars. With 5x leverage the margin is about 95 dollars; the loss at the stop is still 10.
Questions
How much should I risk per trade?
That is your decision and this page does not make it for you. The calculator only shows what a given percentage means: at 1% per trade, twenty losses in a row leave about 82% of the account; at 5% they leave about 36%.
Does leverage change my position size?
No. The size comes from the loss you accept and the distance to the stop. Leverage changes the margin needed, and how close the liquidation price is.
Why are fees part of the sum?
Because a stopped trade pays a fee to open and a fee to close. On a tight stop the fees can be a large part of the loss, so leaving them out makes the position too large.
Does a stop guarantee the loss?
No. In a fast market a stop can fill at a worse price than the one you set, and the loss is then larger than planned.
After the sum
A calculator answers one trade. To see whether a way of trading works, try it without money and keep the record: paper trading on a live chart with virtual funds, and a journal that fills itself in with every practice trade. Both are free.