Crypto Position Size Calculator (Risk-Based, Fees Included)
Decide how much you are willing to lose if the stop-loss is hit, then let the calculator size the position. The calculation runs in your browser.
How the position size is calculated
Fix the loss first, then solve for the size. At the stop the trade loses the price move plus the opening and closing fees, so all three go in the denominator:
Leverage does not change the position size here. It only changes how much margin the position ties up, and how close the liquidation price sits to your entry.
Worked examples (balance 2,000 USDT, risk 1.5%, long at 3,000, OKX taker both ways, 3x)
| Stop-loss | Position size (USDT) | Quantity | Margin at 3x (USDT) |
|---|---|---|---|
| 2,970 (−1%) | 2,728.51 | 0.90950 | 909.50 |
| 2,940 (−2%) | 1,429.25 | 0.47642 | 476.42 |
| 2,910 (−3%) | 968.21 | 0.32274 | 322.74 |
| 2,850 (−5%) | 588.52 | 0.19617 | 196.17 |
How much to risk per trade
- Pick a share of the balance you can lose many times in a row. With 1% per trade, ten losses in a row cost about 10% of the account; with 5%, they cost about 40%.
- Place the stop where the trade idea is wrong, then size. Moving the stop closer just to get a bigger position raises the chance of being stopped out by normal price noise.
- Check liquidation after sizing. If the liquidation price sits before the stop, the stop never protects you. Lower the leverage until the warning disappears, or confirm with the liquidation price calculator.
How do I use this with TradingView's Long/Short Position tool?
TradingView's Long Position and Short Position drawings let you mark an entry, a stop and a target on the chart. Take the entry and stop from the drawing, size the trade here with fees included, then set an alert so you hear about it before the stop or the liquidation price is reached.
- 1. Draw the trade. On a TradingView chart, select the Long Position or Short Position drawing and drag the entry, stop and target lines to your levels. Its settings also take an account size, a risk amount (absolute or % of the account), a lot size and leverage (TradingView help).
- 2. Copy the entry and stop into the calculator above. Add your balance, the risk % and the exchange, so the opening and closing fees are counted.
- 3. Compare the two quantities. TradingView's help gives the drawing's quantity as the smaller of a risk-based figure, risk ÷ (entry − stop), and a leverage cap, account size × leverage ÷ entry (shown here for a market where point value and lot size are 1). Neither includes trading fees. With the default example above (30 USDT at risk, entry 3,000, stop 2,880, 3x) that formula gives 0.2500, while this calculator gives 0.2440 after OKX taker fees on both sides. At 0.2500 the loss at the stop would be about 30.74 USDT with fees, not 30.
- 4. Set a price alert. Put one at the stop and one ahead of the estimated liquidation price shown above (2,011.06 in the example). TradingView's pricing page lists 3 active price alerts on the Basic plan (read 2026-11-17), and its alert help says a standard alert lasts two months at most, so check that older alerts are still running.
Frequently asked questions
How do I calculate position size in crypto?
Does leverage change the position size?
What risk percentage should I use?
Why is my real loss larger than the amount at risk?
Why is the quantity here smaller than in TradingView's Long/Short Position tool?
Sources and limits
Fee pages: OKX, Bybit, MEXC, Binance, Bitget, Bitunix, Toobit (presets updated 2026-11-30). The liquidation estimate uses the isolated-margin formulas of our liquidation calculator with the maintenance margin rate you enter. Planning tool, not trading advice. Leveraged futures can lose the whole margin. TradingView section: Long and Short Position drawing tools, leverage in the position tools (Oct 27, 2025), introduction to alerts and the pricing page, read 2026-11-17.