Position size calculator: how many shares to buy based on your stop and risk
Quantity = (Capital × Risk percentage) ÷ (Entry price minus stop price). That's the whole formula. The calculator below does the calculation, adds a cap to the position size, and translates the target into risk units (R). The values you enter are saved only in your browser.
Why you start from the stop and not from the price: Quantity is the only thing in the trade that is completely under your control. Not where the price will go, not when, just how much you'll lose if you're wrong, less than what you hoped. Whoever sets quantity based on "how much money I have" risks a different amount in every trade, without knowing it.
The Calculator
Enter four numbers. The calculator works in the same currency as the prices (shekels for Tel Aviv stocks, dollars for US stocks), and rounds the quantity down to whole units.
Enter capital, risk percentage, entry and stop to get quantity.
The calculation is done in the browser only; the capital and risk percentage are saved on your device. This is not investment advice and not an instruction to execute.
How to use it, step by step
- Capital: The amount in the trading account allocated for this trade, not all your savings. If you trade with part of the portfolio, enter only that part.
- Risk percentage per trade: How much of the capital you're allowed to lose if the stop is hit. The common rule is 0.25% up to 1%. Our virtual bot runs on 0.35%, after measuring a full percent with ten parallel positions turned that exact same list of trades into a loss.
- Entry and stop: The stop is derived from the structure (below support, below the base's low) or fromATRnot from an amount that's comfortable to lose. If you set a stop and then find the quantity is "too small," the solution is not to bring the stop closer.
- Target (optional): Allows you to see the ratio between potential profit and risk. A target of 2R means you earn double what you risk, and only then Win Rate , of 40% is enough to stay profitable.
- Position cap: Maximum percentage of capital for a single asset, regardless of the stop. When the stop is very tight, the formula can return a quantity equal to half the portfolio, and an opening gap below the stop will turn that into a loss you didn't plan for. The calculator reduces the quantity to the cap and flags it.
Two examples showing why the stop determines the quantity
Three times the quantity, thanks to a tight stop. In example B the position is a quarter of the portfolio, and an opening gap of 4% below the stop will cause 1,000 instead of 500. That's why the position cap exists: it doesn't protect you from the stop, it protects you from what happens when the stop isn't filled at its price.
| Example A | Example in | |
|---|---|---|
| Capital | 100,000 | 100,000 |
| Risk per trade | 0.5% = 500 | 0.5% = 500 |
| Entry | 50 | 50 |
| stop | 47 | 49 |
| Distance to stop | 3 | 1 |
| Quantity | 166 Stocks | 500 Stocks |
| Position value | 8,300 (8.3% of capital) | 25,000 (25% of capital) |
| Loss if the stop is hit | 498 | 500 |
What is R, and why does the calculator show the target in R units
R is the risk in a single trade: the distance from entry to stop multiplied by the quantity. A full loss is -1R, a target at double the distance is +2R. In these units, you can compare trades across different stocks, prices and sizes, and see the only question that matters over time: how many R you earned on average per trade after costs. The public track record of our engine is kept in these exact units, including the losses. More inPosition Sizing and R Guide.
The mistakes the calculator can't prevent
- "Mental" stop: A quantity calculated for a stop that wasn't entered with the broker is the quantity for a different trade. The stop needs to be an order. How to place it.
- Gaps and leverage: The formula assumes you'll exit at the stop price. In a stock reporting results overnight, or with aleveraged instrument, the actual loss can be much bigger. In such trades, reduce the risk percentage, don't just hope.
- Minimum commission: On a position of 800 shekels, a commission of 20 shekels per side is 5% of the trade, more than any edge you could hope for. If the quantity comes out too small relative to the broker's commissions, it's not a trade worth doing at this size.
- Cumulative open risk: The calculator works on a single trade. Ten trades of 1% are 10% open risk, and the market drops on all of them in one day. Set a cap on the number of positions too.
- Duplicates: Two chip stocks and a Nasdaq ETF are one position with three names. The real open risk is bigger than what the table shows.
Frequently asked questions
- What percentage should you risk per trade? A number you could lose ten times in a row without changing the rules. For beginners, 0.25% up to 0.5%. A whole percent sounds small, but a streak of ten losses is almost 10% of capital, and such streaks happen with every method.
- The quantity came out to zero, what should I do? The distance to the stop is too large relative to the capital and risk percentage. The honest options are: knowingly increase the risk percentage (and understand what that does to a losing streak), or skip the trade. Moving the stop closer to a point that isn't justified by the structure is the most common solution, and also the worst.
- Does the formula also work for crypto and forex? Yes, as long as the entry and stop are in the same currency. In crypto the quantity can be fractional, so it isn't rounded there; the calculator also shows the exact quantity when it's less than one unit.
- How does this connect to the analysis on the site? All Analysis report With an active setup, it shows entry, stop and target, and below them the exact same calculator, pre-filled from the setup. The capital and risk percentage you save here are also saved there.
Want to see this on a real chart?
TechAnalyzer Pro analyzes every stock or cryptocurrency and marks for you the levels, patterns and indicators — with an explanation in simple Hebrew next to every term. No credit card.
📈 Stock before breakout, once a week by email
Every Friday morning: one stock with a market cap above $5 billion converging below resistance, explained in simple Hebrew — and what happened to last week's pick, even when it didn't work.
Free. One-click unsubscribe. Not investment advice.