Position size calculator: how many shares to buy based on your stop and risk
Shares = (Account size × Risk %) ÷ (Entry price − Stop price). That is the entire formula. The calculator below runs it for you, applies a cap on position size, and expresses your target in units of risk (R). Whatever you enter is stored only in your browser.
Why start from the stop rather than the price? Position size is the only part of a trade that is entirely under your control. Not where the price goes, not when, only how much you lose if you turn out to be wrong. If you size positions by "how much money I have," you risk a different amount on every trade without ever knowing what it is.
The calculator
Enter four numbers (target and position cap are optional). The calculator works in whatever currency your prices are in (dollars for US stocks, shekels for Tel Aviv stocks, and so on) and rounds the share count down to whole shares.
Enter account size, risk %, entry and stop to see how many shares to buy.
Everything is calculated in your browser; your account size and risk % are saved on your device only. Not investment advice and not an instruction to trade.
How to use it, step by step
- Account size: the money in your trading account set aside for this kind of trading, not your entire savings. If you trade only part of your portfolio, enter only that part.
- Risk per trade: how much of your account you are willing to lose if the stop is hit. The common rule of thumb is 0.25% to 1%. Our virtual bot runs at 0.35%, after testing showed that risking a full 1% with ten positions open at once turned the very same list of trades into a net loss.
- Entry and stop: the stop comes from the chart structure (below support, below the low of the base) or from ATR, not from an amount you'd be comfortable losing. If you set the stop and then find the share count is "too small," the answer is not to move the stop closer.
- Target (optional): shows the ratio of potential reward to risk. A 2R target means you stand to make twice what you risk, and only then is a 40% win rate enough to stay profitable.
- Position cap: the maximum share of your account in any single asset, regardless of the stop. With a very tight stop, the formula can return a position worth half your portfolio, and a gap below the stop would turn that into a loss you never planned for. The calculator scales the size down to the cap and flags it.
Two examples that show why the stop determines position size
Same account, same risk, same stock; the only difference is where the stop sits. With the tighter stop, example B buys three times as many shares. But in example B the position is a quarter of the portfolio, so a 4% gap down through the stop would cost 1,000 instead of 500. That is what the position cap is for: it doesn't protect you from the stop, it protects you from what happens when the stop doesn't fill at its price.
| Example A | Example B | |
|---|---|---|
| Account size | 100,000 | 100,000 |
| Risk per trade | 0.5% = 500 | 0.5% = 500 |
| Entry | 50 | 50 |
| Stop | 47 | 49 |
| Distance to stop | 3 | 1 |
| Shares | 166 shares | 500 shares |
| Position value | 8,300 (8.3% of account) | 25,000 (25% of account) |
| Loss if the stop is hit | 498 | 500 |
What R is, and why the calculator shows the target in R
R is the risk on a single trade: the distance from entry to stop times the number of shares. A full loss is -1R; a target twice as far away as the stop is +2R. In these units you can compare trades across different stocks, prices and sizes, and answer the only question that matters over time: how many R you made per trade, on average, after costs. More in the guide to position sizing and R.
Mistakes the calculator can't prevent
- A "mental" stop: a share count calculated for a stop you never entered with your broker belongs to a different trade. The stop needs to be an actual order. How to place it.
- Gaps and leverage: the formula assumes you get out at the stop price. In a stock reporting earnings tonight, or in a leveraged instrument, the real loss can be much larger. In those trades you cut your risk percentage; you don't just hope.
- Minimum commissions: on a position of about $200, a $5 commission each way adds up to 5% of the trade, more than any edge you could hope for. If the share count comes out too small relative to your broker's fees, the trade isn't worth taking at that size.
- Total open risk: the calculator handles one trade at a time. Ten trades at 1% each are 10% open risk, and the market can drop on all of them in a single day. Set a cap on the number of positions too.
- Overlapping positions: two chip stocks and a Nasdaq ETF are really one position under three names. Your true open risk is larger than the table suggests.
Frequently asked questions
- How much should I risk per trade? An amount you could lose ten times in a row without changing your rules. For beginners, 0.25% to 0.5%. A full 1% sounds small, but ten losses in a row add up to almost 10% of your account, and streaks like that happen with every method.
- The share count came out to zero. What now? The distance to your stop is too large for your account size and risk percentage. The honest options: deliberately raise your risk percentage (knowing what that does to a losing streak), or pass on the trade. Moving the stop closer to a spot the chart structure doesn't justify is the most common fix, and the worst one.
- Does the formula work for crypto and forex too? Yes, as long as entry and stop are in the same currency. Crypto can be bought in fractions, so no rounding is applied there; the calculator also shows the exact quantity when it is less than one unit.
- How does this tie into the analysis on the site? Every analysis report with an active setup shows an entry, stop and target, and below them this exact calculator, pre-filled from the setup. The account size and risk % you save here carry over there as well.
Want to see this on a real chart?
TechAnalyzer Pro analyzes any stock or cryptocurrency and marks the levels, patterns and indicators for you, with a plain-English explanation next to every term. No credit card required.
📈 One stock before a breakout, weekly by email
Each week, one stock with an interesting technical setup, and a simple explanation of what to check on the chart.
Free. Unsubscribe in one click. Not investment advice.