PositionSizeTool
Forex · Stocks · Crypto — size every trade from your risk, not from hope

How Many Shares Should I Buy?

Last updated 19 September 2026

The share version of the same formula

Stock position sizing is the same calculation as forex or crypto, minus the pip and contract-size conversions. You know the money you are willing to lose and you know how far the price has to fall before you accept being wrong. Dividing one by the other gives the number of shares, and nothing else.

risk budget = account balance x risk % stop per share = entry price - stop-loss price shares = (risk budget - commission) / stop per share tradable size = floor(shares / share step) x share step

Note what is not in the formula: your opinion about the company, the share price itself, or how much cash you happen to have. Those decide whether the trade is a good idea or whether you can afford the position; they do not decide the risk-limited size. A 500 USD stock and a 20 USD stock can carry identical risk if the stop distances are set so the arithmetic says so.

Worked example with whole shares

A 25,000 USD account, risking 1% per trade, buying a stock at 42.50 with a stop at 40.75, paying 2.00 USD in total commission on the round turn, with no fractional shares available.

Inputs for the worked example.
InputValue
Account balance25,000.00 USD
Risk per trade1% = 250.00 USD
Entry price42.50
Stop-loss price40.75
Commission (round turn)2.00 USD
Share step1 whole share
  1. Stop distance per share: 42.50 - 40.75 = 1.75 USD per share.
  2. Budget after commission: 250.00 - 2.00 = 248.00 USD.
  3. Shares: 248.00 / 1.75 = 141.71.
  4. Round down: 141 shares.
  5. Check the worst case: 141 x 1.75 = 246.75, plus 2.00 commission = 248.75 USD. Inside the 250.00 budget.
  6. Position value: 141 x 42.50 = 5,992.50 USD.
Result against the version that ignores commission.
Including commissionIgnoring commission
Shares141142
Real loss at stop248.75 USD250.50 USD
Against a 250.00 budgetunder by 1.25over by 0.50

Here commission is a 2 USD rounding detail. On a tighter stop or a larger budget it stops being one: the tighter the stop, the more shares you hold for the same risk, and every per-share or per-trade fee scales with the share count. This is the same mechanism the forex guide shows with pip spreads.

Stop distance moves the share count more than anything else

Fix the budget at 250.00 USD, the entry at 100.00 USD, ignore commission for clarity, and vary only where the stop goes:

Same 250.00 USD risk budget, same entry price, different stops.
Stop distanceStop priceSharesPosition value
1% (1.00)99.0025025,000.00 USD
2% (2.00)98.0012512,500.00 USD
4% (4.00)96.00626,200.00 USD
8% (8.00)92.00313,100.00 USD

Halving the stop distance doubles the shares and doubles the position value, while the money at risk stays exactly 250.00. This surprises people who read position value as a proxy for risk. A 25,000 USD position with a 1% stop and a 3,100 USD position with an 8% stop risk the same amount; the second one simply uses eight times less capital to do it.

It is also why widening a stop after the trade is open is quietly dangerous. If you bought 250 shares for a 1.00 stop and then move the stop to 4.00 without reducing size, the position that risked 250.00 now risks 1,000.00.

Fractional shares: small accounts get precision back

Whole-share rounding hurts most when the share price is high relative to the risk budget. Take a 2,000 USD account risking 1% (20.00 USD) on a stock trading at 318.40 with a stop at 311.00.

  1. Stop distance per share: 318.40 - 311.00 = 7.40 USD.
  2. Shares: 20.00 / 7.40 = 2.702 shares (fractional, to three decimals).
  3. Check the worst case: 2.702 x 7.40 = 19.99 USD. Inside the budget.
  4. Position value: 2.702 x 318.40 = 860.32 USD.

Without fractional shares you would round down to 2 shares, risking only 14.80 USD — about 26% less than planned. Being under your budget sounds safe, and mostly it is a silent performance leak: your winners are also 26% smaller, and every result you track is distorted by a rounding error rather than by your actual edge.

Availability depends on your broker and jurisdiction, and some platforms allow fractional quantities only on certain order types. Check what yours supports before assuming you can place 2.702.

What does not belong in the calculation

And one honest limitation: the formula sizes a single position. It does not know you already hold three correlated names in the same sector, and it will happily size each one to 1% of the account. Portfolio-level exposure is a separate calculation on top of this one.

Do it once, then automate

Work the example through with your own numbers on the next trade you take. Once your result matches what the platform will accept, you have confirmed your share step and fee assumptions.

Open the position size calculator

Related guides