Educational only, not financial advice. Trading involves risk of loss. Full disclaimer

Position size calculator: how many shares or contracts to trade

A position size calculator works out how many shares, units or contracts to trade from a chosen share of the account and a stop distance. Position size = (account × risk %) ÷ |entry − stop|. This page also subtracts commissions and per-unit fees so the calculated size reflects those costs. For a stock, units are shares, and the same formula applies.

Trade math calculator

Trade setup (hypothetical)
Sizing & fees
Gross R:R
-
Net R:R after fees
-
Position size-
Net $ at risk-
Net $ potential gain-
Total fees-
Break-even win rate (net)-
Expected value / trade-

Outputs are arithmetic on the numbers you enter. They are not predictions and not a recommendation to trade.

Track the size you actually took

After you have a position size, the way to know whether you actually took that size, and what you paid in fees, is to log fills and compare them with the planned entry, stop and size. See Charting and trade journaling for how traders review this.

Heads up: the TraderSync link below is an affiliate link. If you sign up or subscribe through it, I may earn a commission, at no extra cost to you.

TraderSync

To import your fills and compare your planned prices with your actual ones.

Try TraderSync Affiliate link

Worked examples

I subtract the round-trip commission from the risk budget, then divide by the stop distance plus the loss fee per unit. I use that size for the net R:R, the fees, the break-even win rate, and the expected value.

Example 1: $10,000 account, 1% risk

A long at 100, stop 95, and target 115, on a $10,000 account risking 1%. Commission is $2 round trip, fees are 0.05% per side, and the assumed win rate is 40%.

Gross R:R1 : 3.00
Net R:R after fees1 : 2.84
Position size19.23 units
Net $ at risk$100.00
Net $ potential gain$284.31
Fees on a loss$3.87
Fees on a win$4.07
Break-even win rate (net)26.0%
Expected value / trade$53.72 (0.54R)

Example 2: $5,000 account, 2% risk

A long at 20, stop 18, and target 26, on a $5,000 account risking 2%. Commission is $1 round trip, fees are 0.1% per side, and the assumed win rate is 45%.

Gross R:R1 : 3.00
Net R:R after fees1 : 2.88
Position size48.58 units
Net $ at risk$100.00
Net $ potential gain$288.23
Fees on a loss$2.85
Fees on a win$3.23
Break-even win rate (net)25.8%
Expected value / trade$74.70 (0.75R)

Example 3: $25,000 account, 0.5% risk

A long at 50, stop 48, and target 54, on a $25,000 account risking 0.5%. Commission is $0, fees are 0% per side, and the assumed win rate is 55%.

Gross R:R1 : 2.00
Net R:R after fees1 : 2.00
Position size62.5 units
Net $ at risk$125.00
Net $ potential gain$250.00
Fees on a loss$0.00
Fees on a win$0.00
Break-even win rate (net)33.3%
Expected value / trade$81.25 (0.65R)

The formula

Position size = (Account × Risk %) ÷ |Entry − Stop|. Fixed-fraction sizing is a common educational example of how a single loss can be limited to a set share of an account. With fees: size = (budget − commission) ÷ (stop distance + per-unit fees).

The same formula applies to a NinjaTrader position when the stop is in the same units. For a hypothetical $10,000 account, 1% risk, and a $5 stop distance, the size is 20 units before fees; the calculator then subtracts the commission and per-unit fees you enter. This page does not publish NinjaTrader's tick values or fees.

Frequently asked questions

How do I calculate position size?

Position size = (account × risk %) ÷ |entry − stop|. This calculator also subtracts the commission and per-unit fees you enter.

How do I calculate stock position size?

For a stock, units are shares. The same formula applies: (account × risk %) ÷ |entry − stop|, then commissions and per-unit fees if you enter them. This page does not invent a broker commission.

Can I use this as a NinjaTrader position size calculator?

The same formula can size a NinjaTrader position when you enter the stop in the same units and that instrument's commissions and per-unit fees. This page does not publish NinjaTrader's fees.

Related lessons