Trading Risk · Guide

Position Size vs Stop-Loss: Which Should You Calculate First?

Learn the difference between position size and stop-loss, why the stop should usually come first, and how to calculate shares from account risk.

Open the related calculator →

A stop-loss price defines where the planned trade should exit if the market moves against it. Position size defines how many shares or units can be traded while keeping the planned loss within a selected risk limit.

For risk-based position sizing, the stop should usually be selected first:

1. Choose the entry price.
2. Identify the price where the trade idea is invalid.
3. Use that level to define the planned stop.
4. Calculate the distance between entry and stop.
5. Divide the maximum risk amount by that distance.

The basic formula is:

Position size
= Maximum risk amount ÷ Risk per share

If an account has $10,000, the maximum risk is 1%, the entry price is $50 and the stop price is $47.50:

Maximum risk amount
= $10,000 × 1%
= $100
Risk per share
= $50.00 − $47.50
= $2.50
Position size
= $100 ÷ $2.50
= 40 shares

The stop determines the risk per share. The position-size calculation then determines how many shares fit within the $100 risk budget.

Calculate shares with the BasisPilot Position Size Calculator →

Position size vs stop-loss: the difference

Position size and stop-loss are connected, but they answer different questions.

Tool or decisionMain questionTypical output
Stop-loss planningAt what price is the trade idea invalid or the selected risk rule reached?Stop price
Position sizingHow many shares fit within the maximum planned loss?Share or unit quantity
Risk-reward analysisIs the planned reward large enough relative to the risk?Reward-to-risk ratio
Trade expectancyDoes the strategy have positive average value under the selected assumptions?Expected value per trade

A stop price by itself does not control account risk. A position of 10 shares and a position of 1,000 shares can use the same stop price but create very different dollar losses.

Position size by itself also does not define a valid stop. Choosing a fixed number of shares before identifying where the trade idea fails may force the stop into an arbitrary location.

Stop-loss determines risk per share

For a long trade:

Risk per share
= Entry price − Stop price

For a short trade:

Risk per share
= Stop price − Entry price

Position size determines total planned risk

Total planned price risk
= Position size × Risk per share

When fees and expected slippage are included:

Total planned risk
= Position size × Adjusted risk per share
+ Fixed trading costs

Why the stop should usually come first

In a risk-based process, the stop should represent the point where the original trade thesis is no longer valid or where a predefined risk rule requires an exit.

Once that price is known, the distance from entry to stop can be measured. Position size is then adjusted to fit the account-risk limit.

The recommended sequence is:

Trade idea
→ Entry
→ Invalidation level
→ Planned stop
→ Risk per share
→ Position size

A weaker sequence is:

Desired number of shares
→ Desired dollar position
→ Stop adjusted to fit the position

The second sequence may place the stop:

  • inside ordinary price volatility;
  • above or below the intended technical level;
  • at an arbitrary round number;
  • farther away than the trade thesis justifies;
  • closer only to make a larger position appear affordable.

Example: deciding the share count first

Assume:

Account size: $10,000
Maximum risk: 1% = $100
Entry price: $50
Logical stop price: $47.50

The valid risk-based position is:

$100 ÷ $2.50
= 40 shares

Suppose the trader decides first that they want 100 shares.

100 shares × $2.50 risk per share
= $250 planned loss

The position now risks 2.5% of the account, not 1%.

To force the planned loss back to $100 while keeping 100 shares, the stop would need to be only $1 below entry:

$100 ÷ 100 shares
= $1 risk per share
Forced stop
= $50 − $1
= $49

If $49 has no connection to the trade thesis or market structure, the risk calculation has distorted the stop rather than controlling the position.

How to calculate position size from a stop-loss

Step 1: Calculate the maximum risk amount

If risk is specified as a percentage of the account:

Maximum risk amount
= Account size × Risk percentage

Example:

Account size: $25,000
Risk per trade: 0.75%
Maximum risk amount
= $25,000 × 0.75%
= $187.50

Risk can also be entered as a fixed amount:

Maximum risk amount: $150

The percentage and fixed-amount methods should not both be applied at the same time.

Step 2: Calculate risk per share

For a long trade:

Entry: $42.00
Stop: $39.50
Risk per share
= $42.00 − $39.50
= $2.50

For a short trade:

Entry: $42.00
Stop: $44.50
Risk per share
= $44.50 − $42.00
= $2.50

Step 3: Divide maximum risk by risk per share

Using the $187.50 risk budget:

Position size
= $187.50 ÷ $2.50
= 75 shares

Step 4: Apply capital and rounding limits

Position value:

75 × $42
= $3,150

Capital allocation:

$3,150 ÷ $25,000
= 12.60%

If the account permits a maximum position allocation of 10%, the capital constraint becomes:

Maximum position value
= $25,000 × 10%
= $2,500
Shares allowed by capital limit
= $2,500 ÷ $42
= 59.52 shares

If fractional shares are unavailable:

Final position size
= 59 shares

The final result is limited by capital allocation, not the original risk budget.

Position-sizing formula with fees

A more realistic formula subtracts fixed costs from the risk budget and adds per-share costs to risk per share.

Available risk budget
= Maximum risk amount − Fixed round-trip fees
Adjusted risk per share
= Price risk per share + Per-share round-trip fees
Shares allowed by risk
= Available risk budget ÷ Adjusted risk per share

Final shares:

Recommended shares
= Minimum of:
- shares allowed by risk;
- shares allowed by capital;
- shares allowed by available buying power.

The final quantity should be rounded down so that rounding does not push planned risk above the selected limit.

How to calculate a stop-loss price

There is no single stop-loss formula that is correct for every security or strategy. A calculator can convert a chosen rule into a price, but it cannot determine whether that rule is appropriate for a specific trade.

Common methods include:

  1. Percentage stop
  2. ATR-based stop
  3. Technical or thesis-based stop
  4. Fixed-risk stop based on a known position size

Convert a selected rule into a stop price →

Percentage, ATR and technical stops

Percentage stop

For a long position:

Stop price
= Entry price × (1 − Stop percentage)

Example:

Entry price: $50
Stop distance: 5%
Stop price
= $50 × (1 − 5%)
= $47.50

For a short position:

Stop price
= Entry price × (1 + Stop percentage)

A fixed percentage is easy to calculate, but the same percentage may represent very different amounts of normal volatility across different securities.

ATR-based stop

Average True Range, or ATR, is commonly used as a measure of recent price range. An ATR-based rule scales the stop distance using a selected ATR value and multiplier.

For a long trade:

Stop price
= Entry price − ATR × Multiplier

For a short trade:

Stop price
= Entry price + ATR × Multiplier

Example:

Entry price: $50
ATR: $1.20
Multiplier: 2
Stop distance
= $1.20 × 2
= $2.40
Long stop price
= $50 − $2.40
= $47.60

With a $100 risk budget:

Position size
= $100 ÷ $2.40
= 41.66 shares

Without fractional shares:

Recommended position
= 41 shares

Planned price risk:

41 × $2.40
= $98.40

ATR is an input to the rule, not a guarantee that the stop will avoid normal volatility, gaps or rapid market moves.

Technical or thesis-based stop

A technical stop may be placed beyond a price level that defines whether the setup remains valid, such as:

  • a prior swing low or high;
  • a support or resistance level;
  • a breakout level;
  • a trend boundary;
  • an event-specific invalidation level.

Example:

Entry price: $50.00
Support level: $48.00
Selected buffer: $0.30
Planned stop: $47.70
Risk per share
= $50.00 − $47.70
= $2.30

With a $100 risk budget:

$100 ÷ $2.30
= 43.47 shares

Rounded down:

43 shares

Planned price risk:

43 × $2.30
= $98.90

The calculator does not determine whether $48 is valid support. The user supplies the market or strategy logic; the calculator converts that logic into a risk-based quantity.

Fixed-risk stop from a known position

If position size is already fixed, the stop distance can be calculated from a maximum loss:

Risk per share
= Maximum risk amount ÷ Position size

For a long position:

Stop price
= Entry price − Risk per share

Example:

Entry: $50
Position: 40 shares
Maximum loss: $100
Risk per share
= $100 ÷ 40
= $2.50
Stop price
= $50 − $2.50
= $47.50

This method is mathematically valid, but the resulting stop should still be checked against the actual trade thesis. A mathematically convenient stop is not automatically a defensible stop.

How fees and slippage change position size

The simple formula assumes the position exits exactly at the stop and that trading is free. Actual execution may differ.

Assume:

Account size: $10,000
Maximum risk: 1% = $100
Entry: $50
Planned stop: $47.50
Estimated stop slippage: 1%
Fixed round-trip fees: $2
Per-share round-trip fees: $0.02

For a long trade, a 1% adverse stop slippage assumption gives:

Estimated stop execution
= $47.50 × (1 − 1%)
= $47.025

Price risk per share:

$50.00 − $47.025
= $2.975

Adjusted risk per share:

$2.975 + $0.02
= $2.995

Available risk budget:

$100 − $2
= $98

Shares allowed by risk:

$98 ÷ $2.995
= 32.72 shares

Rounded down:

32 shares

Estimated total planned risk:

32 × $2.995 + $2
= $97.84

Ignoring fees and slippage would have produced 40 shares. Including them reduces the position to 32 shares under these assumptions.

A stop price is not a guaranteed execution price. The SEC explains that a stop order becomes a market order once the stop price is reached, while FINRA warns that volatile conditions can produce an execution price significantly different from the stop price.

Gap-risk scenarios

Position-size calculations should distinguish between:

  • planned loss at the stop;
  • estimated loss with ordinary slippage;
  • larger losses if price gaps through the stop.

Using:

Entry: $50
Stop: $47.50
Position: 40 shares
Exit scenarioExit pricePrice lossAccount loss on $10,000
Planned stop$47.50$1001.00%
1% below stop$47.03$1191.19%
3% below stop$46.08$1571.57%
5% below stop$45.13$1951.95%

The table excludes fees. Its purpose is to show that the selected risk percentage is a planning target, not a hard maximum guaranteed by the market.

Maximum capital allocation can limit position size

Risk-based sizing can sometimes produce a position that uses too much capital.

Assume:

Account size: $10,000
Risk budget: $100
Entry: $200
Stop: $198
Risk per share: $2

Risk-based shares:

$100 ÷ $2
= 50 shares

Position value:

50 × $200
= $10,000

The trade uses 100% of the account.

If the selected maximum capital allocation is 20%:

Maximum position value
= $10,000 × 20%
= $2,000
Shares allowed by capital
= $2,000 ÷ $200
= 10 shares

Final position:

10 shares

Planned price risk:

10 × $2
= $20

The capital-allocation limit, not the risk budget, determines the result.

A useful position-size result should identify the binding constraint:

Position limited by: Maximum capital allocation

Other possible constraints include:

  • maximum risk budget;
  • available buying power;
  • whole-share rounding;
  • broker or market minimums;
  • short-sale availability.

Long vs short position sizing

The core sizing formula is the same for long and short positions:

Position size
= Maximum risk amount ÷ Absolute distance to stop

The direction of the stop changes.

Long position

Entry: $50
Stop: $47
Risk per share: $3

Short position

Entry: $50
Stop: $53
Risk per share: $3

For a $150 maximum risk:

$150 ÷ $3
= 50 shares

Both examples produce 50 shares before fees and capital limits.

Short selling introduces additional risks and costs that a basic stock position-size formula may not capture, including:

  • potentially unlimited price loss;
  • stock-borrow fees;
  • buy-in risk;
  • dividend obligations;
  • margin requirements;
  • limited share availability.

The SEC warns that leverage and short sales can magnify risk, and margin accounts can produce losses greater than the amount initially invested.

Stop order vs stop-limit order

The stop price used in a position-size calculation is a planning assumption. The type of order used for execution affects what can happen after the trigger.

Stop order

A stop order generally becomes a market order after the stop price is reached.

Potential advantage:

  • higher likelihood of execution after triggering.

Primary risk:

  • the fill price may be worse than the stop price, especially during gaps or fast markets.

Stop-limit order

A stop-limit order becomes a limit order after the stop price is reached.

Potential advantage:

  • the order will not execute beyond the selected limit price.

Primary risk:

  • the order may not execute at all if the market moves through the limit.

The more important risk depends on the user’s objective:

  • execution certainty;
  • price certainty.

Position sizing should not assume that either order type guarantees a specific maximum loss.

Stop price vs stop trigger vs actual fill

These values should not be treated as interchangeable:

Planned stop price
The level used in the risk calculation.

Stop trigger price
The level that activates the broker order under its rules.

Actual fill price
The price at which the order is executed.

The actual fill can differ because of:

  • market gaps;
  • bid-ask spread;
  • low liquidity;
  • trading halts;
  • partial fills;
  • extended-hours conditions;
  • order type;
  • broker trigger rules.

FINRA notes that orders may be partially filled or not filled when a firm cannot find a buyer or seller meeting the terms, with this more likely for certain order types, large orders or less frequently traded stocks.

Position sizing with leverage or margin

A stop-based position size can control the planned price loss, but leverage adds further constraints.

A leveraged position may involve:

  • margin interest;
  • maintenance requirements;
  • forced liquidation;
  • losses exceeding deposited capital;
  • broker-specific buying-power rules.

The SEC states that margin investors may lose more than the amount invested, may need to deposit additional funds on short notice and may have positions sold by the brokerage firm without prior consultation.

For leveraged products, options, futures, forex or contracts with multipliers, the stock-share formula in this guide may be incomplete. The calculation must include:

  • contract multiplier;
  • tick value;
  • leverage;
  • liquidation rules;
  • funding or financing costs;
  • instrument-specific gap risk.

BasisPilot’s standard stock position-size tool should not be presented as a universal leverage calculator.

Common position-sizing mistakes

1. Choosing the number of shares before the stop

This can force the stop into an arbitrary location and disconnect it from the trade thesis.

2. Using the same stop percentage for every security

A fixed percentage can represent very different volatility conditions across securities.

3. Rounding the share quantity up

Rounding up can push planned risk beyond the selected limit. Whole-share results should be rounded down.

4. Ignoring fees

Fixed and per-share costs reduce the risk budget available for price movement.

5. Assuming the stop guarantees the loss

Gaps and slippage can produce a larger loss.

6. Ignoring maximum capital allocation

A tight stop can produce an extremely large theoretical position.

7. Confusing position value with risk

A $5,000 position is not necessarily risking $5,000. Planned risk depends on the distance to the stop, while the full position value remains exposed to more extreme events.

8. Using an ATR value without a defined period or data source

Different ATR settings or price data can produce different stop distances.

9. Applying stock formulas to leveraged instruments

Options, futures and leveraged products require multiplier- and contract-specific calculations.

10. Treating account-risk percentage as a universal recommendation

The calculator converts the user’s selected risk limit into a quantity. It does not determine an appropriate risk percentage for a specific user.

Position size, stop-loss and reward target workflow

A practical workflow is:

1. Define the setup and entry.
2. Identify the invalidation level.
3. Select the planned stop.
4. Calculate risk per share.
5. Select the maximum account risk.
6. Include estimated fees and slippage.
7. Apply maximum capital allocation.
8. Round the share quantity down.
9. Select a defensible reward target.
10. Review reward-to-risk and break-even win rate.
11. Review gap-risk scenarios.

Tools should support this workflow without pretending to select the trade levels automatically.

Useful next steps:

Common questions

What is the difference between position size and stop-loss?

The stop-loss price defines the planned exit level. Position size defines how many shares can be traded while keeping the planned loss within a selected limit.

Should I calculate stop-loss or position size first?

In a risk-based process, identify the entry and logical stop first. Then calculate position size from the distance between those prices.

What is the formula for position size?

Position size
= Maximum risk amount ÷ Risk per share

For a long trade:

Risk per share
= Entry price − Stop price

For a short trade:

Risk per share
= Stop price − Entry price

How do I calculate maximum risk amount?

Maximum risk amount
= Account size × Selected risk percentage

A $20,000 account at a selected 0.5% risk level has a $100 risk budget.

Why is position size rounded down?

Rounding down prevents the share quantity from exceeding the selected risk or capital limit. Rounding up can increase the planned loss beyond the input.

Can the actual loss exceed the planned risk?

Yes. The actual fill can be worse than the stop price because of gaps, volatility, liquidity or order execution. Fees and financing costs can also increase the loss.

Does a stop-limit order guarantee a smaller loss?

No. It provides a limit on the acceptable execution price, but the order may remain unfilled if the market moves through that price.

Can I calculate the stop from a fixed position size?

Yes. Divide the maximum risk amount by the number of shares to find the allowable risk per share, then subtract it from entry for a long position or add it for a short position. The resulting stop should still be checked against the trade thesis.

Is ATR better than a percentage stop?

Neither method is universally better. ATR adapts the stop distance to a selected measure of recent price range, while a percentage rule is simpler. Both depend on assumptions and neither guarantees execution or prevents losses.

Does a larger position always mean more risk?

Not necessarily. A larger position with a very tight stop may have the same planned price risk as a smaller position with a wider stop. However, larger positions can create more capital concentration, liquidity risk and gap exposure.

Does the formula work for options or futures?

Not without modification. Those instruments may require contract multipliers, tick values, premiums, leverage and instrument-specific risk rules.

Sources

Methodology and limitations

The examples use simplified stock-share calculations. They do not account for every broker, market, order type, tax rule or security structure.

The formulas estimate planned risk from user-selected inputs. They do not predict market movement, identify technical support or guarantee an exit price.

BasisPilot provides educational calculations and does not provide personalized investment, tax, legal or trading advice.

BasisPilot provides educational calculations and does not provide personalized investment, trading, tax or legal advice.