How it's calculated
Risk limit (B) = account size × risk % ÷ 100 (or the fixed $ amount you enter)
Risk per share (r) = |entry price − stop price|
Shares = B ÷ r, rounded DOWN to a whole share
Position value = shares × entry price
Position % of account = position value ÷ account size
Loss if stopped = shares × r (never more than B)
- Long or short. For a long trade the stop is below the entry; for a short trade it is above. Either way the risk per share is the distance between the two prices. A stop equal to the entry is rejected, because the risk per share would be zero.
- Rounded down, exactly. Shares are always rounded down so the loss at your stop stays within your limit. The division is done in exact decimal arithmetic: ordinary floating-point math says 10 ÷ (10.30 − 10.20) = 99.9999999999986, which would wrongly round down to 99 shares instead of 100.
- No margin. If the position value is larger than your account, you would need borrowed money (margin) to open it. The calculator warns you and shows the largest size you could open with cash: account size ÷ entry price, rounded down. Short selling is typically done in a margin account and is subject to margin rules; your broker sets the collateral it requires, which isn't modeled here.
- The loss is the planned loss, not a guaranteed maximum. It assumes you exit exactly at your stop. A price gap (for example overnight or after news) or slippage can fill a stop order at a worse price. Commissions and fees are not included.
- Stocks and ETFs only: one share moves one dollar per dollar of price. Options and futures have contract multipliers and are not handled.
- Verified two ways: hand-worked examples in our automated tests, and a separate Python program that recomputes thousands of random trades with decimal arithmetic and requires an exact match on the share count.
Worked examples
1. Risking 1% of a $25,000 account
Risk limit = 25,000 × 1% = $250.00. Buying at $50 with a stop at $48 risks $2 a share, so shares = 250 ÷ 2 = 125 shares. The position is worth $6,250.00, which is 25% of the account, but only $250.00 (1%) is lost if the stop is hit. Load this example
2. Rounding down
$10,000 account, 1% risk = $100.00. Entry $23.40, stop $22.75: risk per share = $0.65, and 100 ÷ 0.65 = 153.846, rounded down to 153 shares. Position value $3,580.20 (35.80% of the account); loss at the stop $99.45, just under the $100 limit. Load this example
3. A short trade
$50,000 account, 0.5% risk = $250.00. Selling short at $80 with a stop above at $82.50 risks $2.50 a share: 250 ÷ 2.50 = 100 shares sold short, a $8,000.00 position. Load this example
4. A tight stop can need more money than you have
$5,000 account, 2% risk = $100.00. Entry $40, stop $39.80: only $0.20 of risk per share, so the formula gives 500 shares, a $20,000.00 position, 400% of the account. Without margin that isn't possible; with cash alone you could buy at most 5,000 ÷ 40 = 125 shares, risking $25.00. The calculator flags this with a warning. Load this example
5. A fixed dollar risk
Risking a flat $150 per trade, entry $12.50, stop $11.90: 150 ÷ 0.60 = 250 shares, a $3,125.00 position. Load this example
Frequently asked questions
How do I calculate position size for a stock trade?
Decide how much you are willing to lose if your stop is hit (for example 1% of a $25,000 account = $250). Divide that by the distance between your entry and stop (entry $50, stop $48 = $2 a share). $250 ÷ $2 = 125 shares. Round down if it is not a whole number.
What is the 1% rule in trading?
A rule of thumb often cited in trading education: limit the loss on any single trade to about 1% of your account (some use 2%). It caps the planned loss if the stop is hit, not the size of the position. It is a convention, not a guarantee or a recommendation; this calculator works with whatever percentage you choose.
Why is my position so much bigger than the amount I am risking?
Because you only lose the distance to your stop, not the whole position. In example 1, a $6,250 position risks $250 because the stop is $2 below a $50 entry. The tighter the stop, the bigger the position for the same risk.
Does this work for short selling?
Yes. Choose "Short": the stop must be above your entry, and the risk per share is stop minus entry. Short selling is typically done in a margin account and is subject to margin rules, and your broker sets the collateral it requires; this calculator doesn't model that.
Is the loss at my stop guaranteed to be the maximum?
No. The calculation assumes you exit exactly at the stop price. Prices can gap past a stop (for example overnight or on news), and a stop order may fill at a worse price. Commissions are also not included.
What if the position is bigger than my account?
Then you would need margin (borrowed money) to open it. This calculator assumes no margin, shows a warning, and tells you the largest number of shares you could buy with cash, along with the dollar risk at that size.
Can I use this for options, futures or forex?
Not directly. It assumes one share moves one dollar for each dollar the price moves, which is true for stocks and ETFs. Options and futures contracts have multipliers, and forex uses lots and pip values.
Spotted an error?
Accuracy matters more than anything else here. If a number, formula or explanation on this page looks wrong, please email a correction. The email opens with this page's link, including your current inputs, already filled in. What to include in a report.