Position size turns a dollar risk limit and a stop into a share count, then checks whether cash at the entry can actually fund that count. Wider stops mean fewer shares. A tight stop can imply more shares than the account can buy. Account value sets the risk budget; available cash sets what can be paid for. Those amounts can differ.
Try these example inputs in the Position size calculator.
These figures match this guide's worked example. They are illustrative. They stay on this device and never appear in the URL.
Key takeaways
Risk-only shares = (account size × risk percent) ÷ (entry price − stop price), rounded down
Cash capacity before fees = cash ÷ entry, rounded down
Sized shares = the smaller of those two
The stop can be a price, a percent below the entry, or dollars per share below the entry. All three become a stop price before the division. The stop has to sit below the entry. This page sizes a long position in cash: it does not borrow.
Account $25,000. Risk 2%, so the budget is $500. Entry $50. Stop $47. The gap is $3 a share. Cash is the same $25,000.
An optional target of $56 is $6 of planned profit per share, or 2 times the $3 gap. Planned profit on 166 shares is $996. That ratio says nothing about how often the target is reached. Use the position size calculator for the same inputs.
If the gap per share is wider than the whole budget, the risk-only count is 0. The position does not fit that stop.
Keep the $25,000 account and 2% risk. Change only the stop to $49.99. The gap is $0.01 a share.
The risk arithmetic is still correct. It is not a share count the cash account can fund.
A fill can miss the stop. If those 166 shares are meant to exit at $47 and instead sell at $46, the loss is 166 × $4 = $664, not the $498 scenario. A gap through $47 does the same thing: the share count was sized to a $3 gap, and the actual gap was larger. In the position size calculator, an optional fee reduces cash available for shares. Per-share slippage raises the assumed entry price, reducing cash capacity and increasing the entry-to-stop risk gap. Neither adjustment caps a gap loss.
Sized shares are the largest whole-share position that both fits the risk budget at the stop you typed and can be paid for with the cash you typed, before fees. A tighter stop allows more shares on the risk side. Cash still caps the purchase.
Gaps, halts, and a fill past the stop can make the loss larger than the scenario. Fees reduce available cash; entry slippage also changes the modeled risk per share. Neither caps a gap. The price that covers fees on a round trip is the break-even price. The ratio to a target is a plan, not a probability. Leverage, margin, and options overlay are outside this cash mode.
The inputs describe a hypothetical long position paid for in cash; they are not suggested trade settings.
For general education only. Nothing here is investment advice.
References explain the concepts; MarketCapLens supplies the examples and calculator assumptions. See who checks the numbers.