How the calculation works
Shares = floor(min(risk budget ÷ (entry − stop-loss price), portfolio value ÷ entry))
Risk budget equals portfolio value multiplied by your chosen percentage. The calculator rounds down to whole shares and caps the position at portfolio value, assuming that amount is available as cash. Your actual available cash may be lower.
Worked example, not a suggested risk level
For an illustrative USD 10,000 portfolio and a user-chosen 1% budget, the budget is USD 100. An entry at USD 50 and assumed exit at USD 45 imply USD 5 per share of modeled loss. Twenty shares cost USD 1,000 and imply USD 100 of loss at that exit.
An assumed exit is not a guaranteed fill
A level identified through technical analysis cannot guarantee where a stop order will execute. Gaps, illiquidity and trading halts can increase losses. Commissions, spreads, slippage, taxes, existing positions and correlated exposures are excluded. This is an arithmetic illustration, not a recommendation or a loss limit.