The formula
Contracts = floor( (Account Balance × Risk %) ÷ (Stop-Loss Ticks × Tick Value) )
Position sizing answers one question: given how much you're willing to lose on this trade, how many contracts does your stop-loss distance actually allow? Fixing your risk in dollars first — rather than picking a contract count and hoping the stop fits — is what keeps a single bad trade from doing disproportionate damage to your account.
A note on scope
This calculator is built for futures — it uses standard CME/CBOT/NYMEX/COMEX tick values for common contracts (ES, MES, NQ, MNQ, RTY, M2K, YM, MYM, and more), or a custom tick value for anything else. It doesn't cover stock or options position sizing.
This calculator uses numbers you type in. ExpectancyIQ tracks your actual risk-per-trade and R-multiples from your real, imported trades — see it on your own account free to start.
Once you know your position size, see whether the resulting trades actually pay over time with the expectancy calculator.