How to calculate position size: the formula step by step

Position sizing turns your stop into a share count. You decide how much of the account one trade may cost, then divide that by what you lose per share if the stop is hit. The calculator runs these five steps for you:

  1. Dollar risk = account size × risk %. A $25,000 account at 0.5% gives $125.
  2. Risk per share = entry − stop for a long, or stop − entry for a short.
  3. Shares = dollar risk ÷ risk per share, rounded down to a whole share.
  4. Position value = shares × entry. This is the cash or buying power the trade needs.
  5. Risk/reward = distance to target ÷ distance to stop, if you have a target.

Worked examples: a long and a short trade

Long. Your account is $25,000 and you risk 0.5%, so $125. You plan to buy at $42.80 with a stop at $41.95, just below the swing low. Risk per share is $0.85, and $125 ÷ $0.85 = 147.06, so you buy 147 shares, a $6,291.60 position. If the stop is hit, you lose about $124.95 plus costs. A target at $44.50 is $1.70 away, twice the risk, so the calculator shows 2R, often written 1:2.

Short. Same account, same $125. You plan to short at $187.40 with a stop at $189.10, just above the swing high. Risk per share is $1.70, and $125 ÷ $1.70 = 73.53, so you short 73 shares, a $13,680.20 position. A target at $184.00 is $3.40 away, again 2R. In the calculator, type the stop above the entry.

Short selling needs a margin account and shares your broker can borrow, so check both first.

Turn your phone sideways to read the drawing. Tap to close.

Two hand-drawn calculation cards for a $25,000 account risking 0.5%, or $125. Long: 42.80 − 41.95 = 0.85, 125 ÷ 0.85 = 147.06, rounded down to 147 shares worth $6,291.60, and a target at 44.50 for 1.70 = 2R. Short: 189.10 − 187.40 = 1.70, 125 ÷ 1.70 = 73.53, rounded down to 73 shares worth $13,680.20, and a target at 184.00 for 3.40 = 2R.

Why the share count should change with every stop

Take a $60 stock and the same $125 risk. With a stop $0.40 away you can buy 312 shares, an $18,720 position. With a stop $1.60 away you buy 78 shares, a $4,680 position. Both lose $124.80 at the stop. The tight stop needs more buying power and gives price less room. The wide stop needs a farther target to reach 2R. Where the stop belongs is a chart question, covered in where to put your stop loss and take profit. The calculator turns that answer into a size.

Now buy 100 shares every time instead. A $0.40 stop risks $40 and a $1.60 stop risks $160, four times as much on trades you rate the same. Results then track stop distance instead of your setups, and one wide-stop loss erases several small wins. A fixed dollar amount, such as $5,000 of stock per trade, has the same flaw: a 1% stop risks $50 and a 3% stop risks $150.

Fixed risk keeps every full loss close to 1R, which makes a journal kept in R a fair measure of your method.

Turn your phone sideways to read the drawing. Tap to close.

Hand-drawn bars of the loss if the stop is hit on a $60 stock. Left, the same $125 risk: a $0.40 stop with 312 shares and a $1.60 stop with 78 shares both lose $124.80. Right, always 100 shares: the $0.40 stop risks $40 and the $1.60 stop risks $160, four times as much on trades you rate the same.

What if the position is bigger than your buying power?

A tight stop on a pricier stock often produces a size the account cannot hold. Say you have $5,000 in a cash account and risk 1%, or $50. You plan to buy at $80.00 with a stop at $79.70. $50 ÷ $0.30 = 166 shares, a $13,280 position. Your cash covers 62 shares, or $4,960.

The usual answer is to buy what you can afford. At 62 shares, your loss at the stop is $18.60, about 0.37% of the account. Taking less risk than planned is fine. The rules for this case:

  • Buy the smaller size and accept the smaller risk.
  • Leave the stop where the chart puts it. Widening it only so the share count fits your cash changes the trade.
  • Margin can reach the full size, but it adds leverage. Buying power differs by broker and account type, so check your broker's current rules first.
  • A stop this small compared with the price can sit inside normal noise. Compare it with ATR before you trade.

How much should you risk per trade?

A common practice is 0.5% to 1% of the account per trade, and many beginners start lower. It is a practice, and the right number depends on you. The point is to get through losing streaks, which every method has, without breaking the account or your discipline.

Base the percent on your current account value and update it when the balance changes meaningfully. Pick a level you would keep through a bad month, because raising risk after wins and cutting it after losses defeats the purpose. Our guide to day trading for beginners covers the rest of a starting plan.

Plain arithmetic shows why. Here are ten losses in a row, each a fixed percent of the shrinking account:

  • 1% per trade: about 9.6% down.
  • 2% per trade: about 18.3% down.
  • 5% per trade: about 40% down, which then needs a 67% gain just to get back to even.

Rounding, fees, slippage and fractional shares

Round down, always. 147.06 becomes 147. Rounding 73.53 up to 74 in the short example would risk $125.80, a little over plan.

Your real loss at the stop is usually a bit bigger than the calculator's number. A stop order becomes a market order once triggered, so fast moves and gaps can fill you past it. Build that in by typing a slightly worse stop: in the long example, enter $41.92 instead of $41.95, and the size drops from 147 to 142 shares. If your broker charges commissions, lower the risk % a little so a full stop-out with costs stays near plan. Sales of US stocks also carry small regulatory fees.

Fractional shares help when the stock is expensive and the account is small. With $2,000 at 1% ($20) and a $480 stock with a $6 stop, the formula gives 3.33 shares; whole shares give 3, risking $18. If the result is below one share, the stop is too wide for your risk on that stock, so skip the trade rather than buying one share anyway. Fractional shares usually cannot be sold short, and some brokers limit which order types accept fractional quantities, stop orders included, so check yours.

How to size a trade with TradingView's Long Position tool

TradingView builds the same formula into a free drawing tool that recalculates as you drag the levels. The calculator on this page is quicker when the numbers arrive in an alert.

  1. In the left toolbar, open the forecasting and measurement group and pick Long Position, or Short Position for a short.
  2. Click your entry on the chart, then drag the red zone to your stop and the green zone to your target.
  3. Open the drawing's settings (double-click it) and go to Inputs. Enter your Account Size, set Risk as a percent or an amount, and keep Lot Size at 1 for stocks.
  4. Set Leverage to match your account, 1 for a cash account. TradingView then shows the smaller of the risk-based size and what the account can pay for, which handles the buying-power case above.
  5. Read Qty and the risk/reward ratio from the stats box, and round the quantity down if it shows decimals.

How UpTickFlow fits in

UpTickFlow is our invite-only TradingView indicator. Each signal comes with an entry (the next bar's open), a stop and a target, drawn on the chart and included in the alert. Type those three numbers into the calculator above with your account size and risk %, and you have the share count before the bar opens.

Stops tighter than 0.3 ATR are widened and setups that need a stop wider than 2 ATR are skipped, so the distance you size from stays in a workable range. If price opens away from the planned entry, the distance to the stop changes, so recheck the size. The indicator filters setups and gives a plan; it does not pick your risk % or predict the market, and any trade can still lose. See pricing, or compare free options in the best TradingView indicators.