Position Sizing for Stock Trades: A Risk-Based Formula and Practical Examples
position-sizingrisk-managementstop-lossportfolio-risktrading-plan

Position Sizing for Stock Trades: A Risk-Based Formula and Practical Examples

SShareMarket Bot Editorial Team
2026-11-14
7 min read

Learn how to calculate stock position size from account risk, entry price, stop loss, costs, volatility, and portfolio exposure limits.

Position sizing turns a trading idea into a defined financial decision. This guide shows how to calculate the number of shares to buy from your account equity, permitted risk, entry price, stop-loss level, and an allowance for fees or slippage. It also provides worked examples, portfolio limits, and a spreadsheet-ready worksheet you can revisit before each trade.

Overview

Position sizing is the process of deciding how many shares a trade should contain. The goal is not to predict whether a stock will rise or fall. It is to make sure that an incorrect trade does not cause more damage than your trading plan allows.

A position can be too large even when the stop-loss is technically correct. A wide stop requires fewer shares than a tight stop because each share carries more price risk. Similarly, a highly volatile stock may need a smaller position than a stable stock, even when both have the same share price.

A useful starting point is to define three limits before entering:

  • Trade risk: the maximum amount you are prepared to lose if the stop is reached.
  • Position value: the cash value of the shares you will hold.
  • Portfolio exposure: the proportion of your account committed to one stock, sector, or correlated group of trades.

Position sizing should be separate from the strength of a stock signal. A bullish stock signal, technical setup, earnings catalyst, or automated trading alert can help define a trade, but none removes the need for a risk limit. For more context on evaluating a setup, see the stock technical analysis checklist and the guide to validating stock trading signals.

How to estimate

The core position-sizing formula is:

Shares = Maximum trade risk ÷ Risk per share

First calculate maximum trade risk:

Maximum trade risk = Account equity × Risk percentage

Then calculate risk per share, including a practical allowance for execution costs:

Risk per share = Entry price − Stop price + Estimated cost per share

Combining the two formulas gives:

Shares = (Account equity × Risk percentage) ÷ (Entry price − Stop price + Estimated cost per share)

Round the result down to a whole share unless your broker supports fractional shares and your trading plan permits them. Rounding down prevents the planned risk from being exceeded by the final order size.

Example: Assume an account equity of $20,000, a maximum risk of 0.5% per trade, an entry price of $50, and a stop at $47. The planned account risk is $100. If fees and expected slippage are estimated at $0.10 per share, total risk per share is $3.10. The calculation is $100 ÷ $3.10 = 32.25, so the position size is 32 shares. The approximate position value is $1,600, before transaction costs.

If the stop is a sell order, the actual exit price may differ from the stop level, particularly during rapid moves, gaps, or thin trading conditions. Treat the cost allowance as an assumption, not a guarantee. A trading bot should use the same conservative assumptions in its position-sizing logic rather than sizing from the displayed stop price alone.

Inputs and assumptions

Use the following inputs in a stock trade risk calculator or spreadsheet:

InputWhat it meansPractical check
Account equityThe account value used for the calculationUse a current figure and decide whether unsettled cash, open profit, or margin is included.
Risk percentageThe fraction of equity allowed to be lost on one tradeChoose the limit before reviewing the trade's potential reward.
Entry priceThe expected fill priceUse a realistic limit or market-fill assumption rather than an idealized quote.
Stop priceThe price that invalidates the trade thesisPlace the stop at a logical level, not merely where it produces a preferred position size.
Fees and slippageEstimated trading and execution costsCheck your broker's current schedule and allow more for volatile or less liquid stocks.
Exposure capThe maximum value allocated to one position or correlated groupReduce shares if the risk formula creates too much concentration.

The risk percentage is a planning choice, not a universal rule. A conservative investor may use a smaller limit, while a trader with a well-tested system may use a different one. The important requirement is consistency and the ability to tolerate a series of losing trades without abandoning the plan.

Consider a second cap based on portfolio exposure. For example, if your plan limits one stock to 10% of a $20,000 account, the maximum position value is $2,000. At a $50 entry price, that exposure cap allows no more than 40 shares. The risk formula in the example allowed 32 shares, so the risk limit remains the binding constraint. If the risk formula had produced 50 shares, the exposure cap would reduce the order to 40 shares.

Volatility-adjusted sizing follows the same principle. If a stock's recent trading range, average true range, or expected event risk makes a wider stop appropriate, recalculate using that wider stop. Do not keep the old share count simply because the entry price has not changed.

Worked examples

Fixed-dollar risk

Suppose your plan permits a fixed $75 loss on any individual trade. You expect to buy at $30 and place the stop at $28.50. With $0.05 per share reserved for costs, risk per share is $1.55. The position size is $75 ÷ $1.55 = 48.38, so the order is 48 shares. The approximate position value is $1,440.

Percentage-based risk

With $12,000 in account equity and a 0.75% risk limit, maximum trade risk is $90. If the entry is $80, the stop is $76, and estimated costs are $0.08 per share, risk per share is $4.08. The calculation produces 22.05 shares, so the position is 22 shares. The planned position value is $1,760.

Different stop distances

Assume the same $90 risk limit and $80 entry price. With a $4 stop distance and $0.08 in estimated costs, the position is 22 shares. If market conditions require a $6 stop distance, total risk per share becomes $6.08 and the position falls to 14 shares. The smaller position preserves the same approximate dollar risk while giving the trade more room to fluctuate.

Spreadsheet worksheet

Copy these labels into a spreadsheet. The formulas assume the values are entered in the corresponding cells:

  • Account equity: enter the current account value.
  • Risk percentage: enter the permitted percentage as a decimal, such as 0.005 for 0.5%.
  • Maximum risk: Account equity × Risk percentage.
  • Entry price: enter the expected fill.
  • Stop price: enter the invalidation level.
  • Cost per share: enter the estimated fee and slippage allowance.
  • Risk per share: Entry price − Stop price + Cost per share.
  • Risk-based shares: Maximum risk ÷ Risk per share.
  • Exposure cap shares: Maximum position value ÷ Entry price.
  • Final shares: round down the smaller of risk-based shares and exposure cap shares.

For short positions, use the same logic with the directional price difference reversed: the distance between the entry and stop must be positive before adding costs. Confirm that the resulting order size also fits any broker margin, short-sale, options, or fractional-share requirements that apply to your account.

When to recalculate

Recalculate position size before every new trade, even when the setup resembles a previous one. At minimum, update the worksheet when account equity changes materially, your risk tolerance changes, the entry price moves, or the stop must be widened. Recheck the calculation after a significant change in volatility, around an earnings report, during major macro events, or when liquidity is unusually low.

Also revisit your assumptions when your broker changes its fee schedule, execution features, margin terminology, or fractional-share rules. These details can affect the usable position size. If a bot places orders automatically, test that its inputs, rounding rules, stop logic, maximum exposure limits, and failure handling match your written plan. A practical review of bot configuration can complement this worksheet; see the stock trading bot configuration checklist.

Before submitting an order, complete this short checklist:

  1. Record current account equity and your permitted risk percentage.
  2. Define the entry and the price that invalidates the trade.
  3. Add a realistic allowance for fees, spread, and slippage.
  4. Calculate shares and round down.
  5. Apply position and correlated-exposure caps.
  6. Check upcoming earnings, economic releases, gaps, and liquidity conditions.
  7. Record the assumptions so you can review the decision later.

Position sizing does not make a trade profitable, and a stop cannot guarantee an exact exit price. It does, however, create a repeatable boundary around uncertainty. Revisit the calculation whenever its inputs change, and let the smallest applicable risk or exposure limit determine the final order size.

Related Topics

#position-sizing#risk-management#stop-loss#portfolio-risk#trading-plan
S

ShareMarket Bot Editorial Team

Senior SEO Editor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.