A 200-day average is centered almost 100 trading days in the past, and that lag shapes everything it shows. The guide treats a moving average as what it is, a smoothing filter, and works through the simple, exponential and weighted formulas with their weights shown side by side. Synthetic price series show how many days a 20-, 50- and 200-day average needs to catch up with a jump or a trend, and ten years of S&P 500 closes from FRED show how often the index sat above its 200-day line and when the 50/200 crosses arrived relative to market highs and lows. It closes with what peer-reviewed studies found about moving-average rules, and the checks to run on any backtest.
Position size & risk calculator
How many shares can you buy if you only want to risk a set share of your account on one trade?
Loss if stopped out $250Gain at target $600
Assumptions & limits
What the calculator takes as given, what it leaves out, and where the rules it relies on come from.
- 01
Shares are rounded down to a whole number.
- 02
The position is capped at the account size (account ÷ entry). Larger positions would require margin.
- 03
A stop below entry is treated as a long trade and a stop above entry as a short trade. The target must be on the other side of entry.
- 04
Loss if stopped out = shares × |entry − stop|. Slippage, commissions and price gaps can make the real loss larger.
- 05
The break-even win rate ignores costs.
- 06
The result is an illustration of the arithmetic, not a forecast and not a trading recommendation.
How it works
The logic behind the result, step by step, with the formula the calculator uses.
Shares = ⌊(account × risk %) ÷ |entry − stop|⌋, capped at ⌊account ÷ entry⌋
R:R = |target − entry| ÷ |entry − stop|
Break-even win rate = 1 ÷ (1 + R:R)
Gain to recover a loss L = 1 ÷ (1 − L) − 1
- risk %
- Share of the account you accept losing on the trade
- entry, stop, target
- Planned entry, stop-loss and target prices
- R:R
- Reward-to-risk ratio
- L
- Loss as a fraction of the account
- ⌊ ⌋
- Rounded down to a whole number
- 01
Fixed-fractional position sizing starts from the loss you are willing to accept, not from the number of shares you would like to own. You choose a share of the account to risk on one trade, for example 1%. On a $25,000 account that is $250.
- 02
The distance between the entry price and the stop-loss is the loss per share if the stop is hit. Dividing the amount at risk by that distance gives the number of shares. A wider stop means fewer shares; a tighter stop means more. The calculator rounds down, so the actual loss at the stop is never more than the amount you chose, and caps the position at the account size, because a larger position would need borrowed money.
- 03
Reward-to-risk compares the distance to the target with the distance to the stop. It only makes sense when the target is on the profitable side of entry, so the calculator reads the direction of the trade from the stop and flags a target on the wrong side.
- 04
The break-even win rate follows from reward-to-risk. If a win pays R times the loss, you need to win more than 1 ÷ (1 + R) of the time for the results to be positive before costs. The last tile shows why limiting losses matters: after a 30% loss, the account needs a 43% gain to get back to where it started.
Worked example
One full calculation with the default inputs, so you can check each step against the calculator.
Your account is $25,000 and you risk 1% per trade. You plan to buy at $100 with a stop at $95 and a target at $112.
| STEP | CALCULATION | RESULT |
|---|---|---|
| 01 | Amount at risk | $25,000 × 1% = $250 |
| 02 | Loss per share | $100 − $95 = $5.00 |
| 03 | Shares | $250 ÷ $5 = 50 |
| 04 | Position value | 50 × $100 = $5,000 (20% of the account) |
| 05 | Reward per share | $112 − $100 = $12.00 |
| 06 | Reward : risk | $12 ÷ $5 = 2.40 : 1 |
| 07 | Break-even win rate | 1 ÷ 3.4 = 29.4% |
| 08 | Gain at target | 50 × $12 = $600 |
| 09 | Gain to recover a 30% loss | 1 ÷ 0.7 − 1 = 42.9% |
Buying 50 shares limits the loss at the stop to $250 while the position uses $5,000 of the account. At 2.4 : 1, the trade idea has to work more than about 29 times in 100 to break even before costs.
Questions and answers
Short answers to the questions readers ask most about this calculation.
The calculator does not recommend a figure. Many educational sources discuss 1–2% as a common range, but the right level depends on your strategy, costs and tolerance for drawdowns.
If the risk-based size costs more than the account is worth, buying it would require margin. The calculator caps the position at the account size and tells you how many shares the full risk would have needed.
No. A stop order becomes a market order when triggered, and prices can gap past it, especially overnight or around news. The real loss can be larger than planned.
Yes. If the stop is above entry, the calculator treats the trade as short and expects the target below entry.
More from Trading
Browse TradingIf a 2-cent spread widens to 20 cents, a round trip on a $10,000 stock position costs $40 instead of $4. Behind that jump sit inventory risk, orders from traders who already know where the price is heading, and quoted size that shrinks even when the spread looks normal. A simple break-even formula shows how these push quotes apart. The guide separates quoted, effective and realized spreads as SEC rules define them, shows how ETFs drifted from their baskets on August 24, 2015 and in March 2020, compares market and limit orders when the offer jumps, and explains why a one-cent tick weighs 100 times more on a $2 stock than on a $200 one, with the half-penny tick now delayed to 2027.
A stock sale on Friday, October 9, 2026 settles on Tuesday, because Columbus Day is not a settlement day. Most US stock, ETF and bond trades now settle one business day after the trade, but that single day is counted on a settlement calendar, not a trading calendar, and it decides when a sale's cash can pay for something else, when it can leave the account, and whether a quick resale in a cash account breaks Regulation T. This guide works through computed 2026 dates, including Veterans Day and the New Year boundary, and explains what the 90-day freeze actually restricts, why the dividend ex-date now equals the record date, and why taxes follow the trade date instead.