Trading Risk · Guide
How Many Shares Should I Buy? Position Size Formula & Examples
Learn how to calculate how many shares to buy using account size, risk per trade, entry price, and stop-loss distance. Includes formulas and practical examples.
Open the related calculator →The number of shares you buy should not be based only on how much cash you have.
A better starting point is:
How much are you willing to lose if the trade is wrong?
Once you know your maximum risk and your stop-loss distance, you can calculate a position size that fits both.
The core formula is:
Number of shares = Maximum risk amount ÷ Risk per share
And:
Risk per share = |Entry price − Stop price|
For example, suppose:
Account size = $10,000 Risk per trade = 1% Entry price = $50 Stop price = $47.50
Your maximum risk is:
$10,000 × 1% = $100
Risk per share is:
$50 − $47.50 = $2.50
So the position size is:
$100 ÷ $2.50 = 40 shares
That means 40 shares is the risk-based position size before considering buying-power limits, fees, slippage, liquidity, and other portfolio constraints.
The Position Size Formula
The most useful position-sizing formula is:
Position size = Maximum risk amount ÷ Risk per share
Where:
Maximum risk amount = Account size × Risk percentage
And:
Risk per share = |Entry price − Stop price|
Put together:
Position size = (Account size × Risk percentage) ÷ |Entry price − Stop price|
This formula answers a much better question than “How many shares can I afford?”
It answers:
How many shares fit within the amount I am willing to risk?
Suppose:
Account size = $10,000 Risk per trade = 1% Entry = $40 Stop = $38
First calculate the risk budget:
$10,000 × 1% = $100
Then calculate risk per share:
$40 − $38 = $2
Now calculate shares:
$100 ÷ $2 = 50 shares
Position value:
50 × $40 = $2,000
So:
Position value = $2,000 Planned price risk = $100
Those are not the same thing.
This distinction is the foundation of risk-based position sizing.
If you only look at cash, the answer depends on the stock price.
For example:
Stock price = $20 Cash available = $1,000
The maximum cash-based position would be:
$1,000 ÷ $20 = 50 shares
But that does not tell you whether 50 shares is an appropriate risk.
Suppose your planned stop is $18.
Then:
Risk per share = $20 − $18 = $2
If you buy 50 shares:
50 × $2 = $100 planned price risk
If your account is only $1,000, that is 10% of the account.
So even though you can afford 50 shares in cash terms, you may not want that much risk.
Cash capacity and risk capacity are different.
Cash-Limited Position Size vs Risk-Limited Position Size
There are usually two ceilings on how many shares you can buy.
Risk Limit
This is the number of shares allowed by your risk budget.
Risk-based shares = Maximum risk ÷ Risk per share
Cash or Buying-Power Limit
This is the number of shares you can actually afford.
Cash-based shares = Available capital ÷ Entry price
The practical position size is usually the smaller of the two:
Practical position size = min(Risk-based shares, Cash-based shares)
For example:
Account = $5,000 Risk budget = $50 Entry = $100 Stop = $95
Risk per share:
$5
Risk-based shares:
$50 ÷ $5 = 10 shares
Cash-based shares:
$5,000 ÷ $100 = 50 shares
The risk limit is more restrictive, so 10 shares is the risk-based maximum.
Example: When Cash Is the Limiting Factor
Suppose:
Account size = $5,000 Risk per trade = 1% Entry = $300 Stop = $294
Maximum risk:
$5,000 × 1% = $50
Risk per share:
$300 − $294 = $6
Risk-based shares:
$50 ÷ $6 = 8.33 shares
Round down to 8 shares.
That would require:
8 × $300 = $2,400
This fits within the account.
But imagine the entry price were $900 instead.
Risk-based sizing might still allow several shares, while your actual buying power may not.
In that case, capital becomes the limiting factor.
Suppose you have:
Account = $20,000 Risk per trade = 1% Risk budget = $200 Entry = $50
Now compare different stops.
| Stop Price | Risk per Share | Position Size | Position Value |
|---|---|---|---|
| $49 | $1 | 200 shares | $10,000 |
| $48 | $2 | 100 shares | $5,000 |
| $46 | $4 | 50 shares | $2,500 |
| $45 | $5 | 40 shares | $2,000 |
The wider the stop, the fewer shares the risk model allows.
The narrower the stop, the more shares the model allows.
That is why position size should not be chosen before the stop-loss level.
Many investors use a fixed share count out of habit.
For example:
> I usually buy 100 shares.
But 100 shares can represent very different risks.
Trade A
Entry = $20 Stop = $19 Risk per share = $1
At 100 shares:
100 × $1 = $100 planned risk
Trade B
Entry = $80 Stop = $72 Risk per share = $8
At 100 shares:
100 × $8 = $800 planned risk
The share count is identical.
The risk is not.
A fixed-share approach ignores how much each trade can actually lose before the stop is reached.
If you use the 1% risk rule:
Maximum risk = Account size × 1%
Then:
Shares = Maximum risk ÷ Risk per share
Example:
Account = $25,000 Risk = 1% Entry = $75 Stop = $71
Maximum risk:
$25,000 × 1% = $250
Risk per share:
$75 − $71 = $4
Shares:
$250 ÷ $4 = 62.5
If trading whole shares, round down:
62 shares
Planned price risk:
62 × $4 = $248
This stays below the $250 risk budget.
For more on this approach, see The 1% Risk Rule in Trading.
What if I Do Not Use a Stop-Loss?
Then the simple risk-per-share formula no longer has a defined exit point.
Without a planned stop, you cannot calculate:
Risk per share = Entry − Stop
because the stop price does not exist.
You can still limit position size using other methods, such as:
- maximum percentage of portfolio;
- maximum dollar exposure;
- volatility-based sizing;
- drawdown limits;
- scenario-based loss estimates.
But those are different frameworks.
The classic position-size formula requires a defined price level where you plan to exit if the trade is wrong.
Position Size for Long Trades
For a long trade:
Risk per share = Entry price − Stop price
provided the stop is below the entry.
Example:
Entry = $60 Stop = $57
Then:
Risk per share = $3
If the risk budget is $150:
$150 ÷ $3 = 50 shares
Position Size for Short Trades
For a short trade, the stop is normally above the entry.
So:
Risk per share = Stop price − Entry price
Example:
Short entry = $50 Stop = $53
Risk per share:
$3
If the risk budget is $120:
$120 ÷ $3 = 40 shares
The same position-sizing logic works in both directions.
Should I Round Position Size Up or Down?
If you are trading whole shares, rounding down is usually more conservative.
Suppose:
Risk budget = $100 Risk per share = $2.70
Then:
$100 ÷ $2.70 = 37.03 shares
37 shares gives:
37 × $2.70 = $99.90
38 shares gives:
38 × $2.70 = $102.60
If your goal is to stay below the planned risk budget, 37 shares fits better.
Some brokers allow fractional-share trading.
In that case, you may be able to buy:
37.03 shares
instead of rounding to 37.
But whether fractional shares make sense depends on:
- broker rules;
- order types;
- liquidity;
- execution;
- whether the security supports fractional trading.
The risk logic does not change.
Only the precision of the share count changes.
Position Size and Fees
The simple position-size formula usually ignores fees.
For many highly liquid U.S. stocks, direct commissions may be small or zero at some brokers, but other costs can still matter.
Possible costs include:
- commissions;
- regulatory fees;
- spread;
- slippage;
- currency conversion;
- financing costs;
- borrow fees for short positions.
If expected costs are meaningful, you can reduce the risk budget available for price movement.
For example:
Total risk budget = $100 Estimated trading costs = $8
Then:
Risk budget for price movement = $92
If risk per share is $2:
$92 ÷ $2 = 46 shares
instead of 50.
Position Size and Slippage
Slippage means you do not exit exactly where you planned.
Suppose:
Entry = $100 Stop = $95 Risk per share = $5
You calculate 20 shares for a $100 risk budget.
But if the actual exit happens at $94:
Actual loss per share = $6
Then:
20 × $6 = $120 actual price loss
Position sizing can control planned risk, but it cannot guarantee the exact realized loss.
Position Size and Gap Risk
Gap risk is especially important around events.
A stock can close at $50 and open the next day at $44 without trading at every price in between.
If your stop was $48, the actual exit may occur below $48.
That can cause the loss to exceed the planned amount.
This matters around:
- earnings;
- FDA or clinical-trial announcements;
- regulatory decisions;
- macroeconomic releases;
- takeover news;
- court decisions;
- overnight geopolitical events.
If gap risk is unusually high, using a smaller position than the formula allows may be more prudent.
Position Size and Portfolio Concentration
A trade can fit your per-trade risk rule and still create too much portfolio concentration.
For example, suppose the formula allows a $10,000 position in one stock.
If your entire account is $20,000, that would put half the account in one name.
Even if the stop-based risk is only 1%, other risks remain:
- gap risk;
- company-specific risk;
- liquidity risk;
- concentration risk;
- correlation with existing positions.
Position sizing should therefore be checked at both the trade level and portfolio level.
Multiple Open Positions
If you have several positions at once, total open risk matters.
Suppose:
Trade A = 1% planned risk Trade B = 1% planned risk Trade C = 1% planned risk
Gross planned risk:
3%
If all three positions are exposed to the same market factor, actual portfolio risk may be even more concentrated than it appears.
This is especially important when several positions belong to the same:
- sector;
- industry;
- index;
- macro theme;
- earnings cycle.
Long-term investing is different from short-term trading.
If you do not use a stop-loss, a stop-based position-size formula may not be appropriate.
Long-term investors often size positions based on:
- target portfolio weight;
- diversification;
- valuation;
- conviction;
- maximum exposure to one company;
- sector exposure;
- ETF overlap;
- contribution schedule.
For example, if you have a $50,000 portfolio and want a 5% target weight in a stock:
Target position value = $50,000 × 5% = $2,500
If the stock price is $125:
$2,500 ÷ $125 = 20 shares
That is a portfolio-allocation calculation, not a stop-loss risk calculation.
The right method depends on whether you are managing a trade or building a long-term portfolio.
A low-priced stock is not automatically safer.
For example:
Stock A = $10 per share Stock B = $200 per share
You might assume you should buy more shares of Stock A because it is cheaper.
But what matters is the combination of:
- position value;
- volatility;
- stop distance;
- liquidity;
- account risk.
A $10 stock can easily create more risk than a $200 stock if you buy too many shares or if it moves more violently.
A Practical Position-Sizing Workflow
A simple process is:
- Decide how much of your account you are willing to risk.
- Identify your planned entry.
- Identify the stop-loss level.
- Calculate risk per share.
- Divide the risk budget by risk per share.
- Round down if needed.
- Check whether you can afford the resulting position.
- Check whether it creates too much portfolio concentration.
- Adjust for slippage, gaps, liquidity, and fees where relevant.
In formula form:
Maximum risk = Account size × Risk %
Then:
Risk per share = |Entry − Stop|
Then:
Shares = Maximum risk ÷ Risk per share
You can calculate this directly with the BasisPilot Position Size Calculator.
If you need to calculate the stop percentage first, see How to Calculate Stop-Loss Percentage.
Frequently Asked Questions
How do I calculate how many shares to buy?
Use:
Shares = Maximum risk amount ÷ Risk per share
Where:
Maximum risk = Account size × Risk percentage
and:
Risk per share = |Entry price − Stop price|
How many shares should I buy with a $10,000 account?
There is no fixed number.
It depends on your risk budget and stop distance.
For example, with a 1% risk limit:
Maximum risk = $100
If risk per share is $2:
$100 ÷ $2 = 50 shares
If risk per share is $5:
$100 ÷ $5 = 20 shares
Should I use all of my available cash?
Not necessarily.
The amount you can afford and the amount you should risk are different.
A position may fit your cash balance but still be too large relative to your planned loss.
Is buying 100 shares a good position size?
Not by itself.
100 shares may be reasonable in one trade and excessive in another.
The risk depends on entry price, stop distance, volatility, and account size.
What if the formula gives more shares than I can afford?
Use the smaller cash-based position.
Your practical position cannot exceed available buying power unless you intentionally use leverage.
What if the formula gives a fractional number of shares?
If your broker only supports whole shares, round down to stay within the risk budget.
If fractional shares are supported, you may use a more precise amount.
Does position sizing guarantee I cannot lose more than planned?
No.
Stops can fill at worse prices because of gaps, slippage, volatility, or low liquidity.
Position sizing controls planned risk, not guaranteed maximum loss.
The Key Idea
The question is not simply:
> How many shares can I buy?
A more useful question is:
> How many shares can I buy while keeping the planned loss within my risk limit?
The core formula is:
Shares = (Account size × Risk %) ÷ |Entry − Stop|
That turns share count into a risk decision instead of a guess.
Keep calculating
Related tools
Keep learning
More guides
BasisPilot provides educational calculations and does not provide personalized investment, trading, tax or legal advice.