How to calculate position size including fees
The standard position size formula divides your risk amount by the stop distance, so a stop-out costs the risk amount plus the fees. To make the stop-out cost what you decided, put the fees into the denominator:
loss per unit = |entry − stop| + entry × entry fee rate + stop × exit fee rate
position size = risk amount ÷ loss per unit
This page is for someone who can already size a trade from a stop — if not, start with how to calculate position size — and wants the planned loss and the realised loss to be the same number. By the end you will be able to add fees, a slippage allowance and expected funding to the calculation, and know when the adjustment is large enough to matter.
Why the basic formula undershoots
A fee is a percentage of notional, charged on the way in and again on the way out. A stop distance is a price difference. Both are costs per unit of the position, paid on the same quantity, so they add.
The position size calculator sizes from the stop distance alone and says so: treat its result as an upper bound. This page is how you turn the upper bound into the actual number.
Before you start
- Your own fee rates. They depend on your tier and volume, so read them from your venue’s fee schedule and check the round trip in the trading fee calculator.
- Which side of the book each leg is on. An entry can be a resting limit order; an exit on a stop almost always crosses the spread and pays the taker rate. See maker vs taker fees.
- Optional: a slippage estimate from your own fills, and the funding you expect to pay if the position will be held across settlements.
Every rate below is illustrative, chosen to be easy to follow. None of them is any venue’s schedule.
Step 1: Start from the plain calculation
Balance 10,000 USD, risk 1%, so the risk amount is 100. Long at 60,000, stop at
58,800, so the stop distance is 1,200. The plain size is 100 ÷ 1,200 = 0.08333 units, a notional of 5,000.
Step 2: Convert each fee into a cost per unit
With an illustrative taker rate of 0.05% on both legs:
entry fee per unit = 60,000 × 0.0005 = 30.00
exit fee per unit = 58,800 × 0.0005 = 29.40
The exit fee is charged on the price where the exit fills — the stop, not the entry — which is why the two differ slightly.
Step 3: Add them to the stop distance
loss per unit = 1,200 + 30.00 + 29.40 = 1,259.40
Step 4: Divide
position size = 100 ÷ 1,259.40 = 0.07940 units (notional 4,764.17)
Check it: 0.07940 × 1,259.40 = 100, made up of 95.28 of price loss and 4.72 of
fees. The plain size of 0.08333 units would have lost 104.95 at the stop —
about 5% over budget on every stopped-out trade.
The percentage version
If you think in percentages of notional rather than per unit, the same calculation for a long is:
notional = risk amount ÷ (stop % + entry fee % + exit fee % × (1 − stop %))
For a short, the exit fills above entry, so the last term uses (1 + stop %).
The quick approximation drops that last factor:
notional ≈ risk amount ÷ (stop % + round-trip fee %). Here that is
100 ÷ (2% + 0.1%) = 4,761.90, against the exact 4,764.17. For a long the
approximation comes out slightly small, which is the safe direction to be
wrong in. For a short it comes out slightly large, so use the exact form.
Adding slippage and funding
The principle generalises: any cost you will pay per unit if the stop is hit belongs in the denominator.
Slippage. Stops fill at the first available price after the trigger, and that is usually worse than the stop — see slippage and market impact. With an illustrative allowance of 0.1% of the stop price (58.80 per unit), the loss per unit becomes 1,318.20.
Funding. If you expect to hold across settlements while paying funding, add
roughly entry × rate per payment × number of payments. With an illustrative
0.01% per payment over 9 payments, that is 54 per unit. Estimate the payments
with the funding rate calculator; the
mechanics are in
how to calculate funding payments.
Only include funding you expect to pay. Funding you currently receive is not
a buffer to size against, because the rate can change sign.
The same example, adding one cost at a time:
| Costs included | Loss per unit | Size (units) | Notional | Loss at stop with plain size |
|---|---|---|---|---|
| Stop distance only | 1,200.00 | 0.08333 | 5,000.00 | 100.00 |
| + taker fees both legs | 1,259.40 | 0.07940 | 4,764.17 | 104.95 |
| + 0.1% slippage at stop | 1,318.20 | 0.07586 | 4,551.66 | 109.85 |
| + 9 funding payments | 1,372.20 | 0.07288 | 4,372.54 | 114.35 |
The last column is what the unadjusted size actually costs when the stop is hit. By the bottom row it is 14% over the plan.
Why tight stops feel this most
Fees scale with notional, and notional scales inversely with the stop. So the tighter the stop, the larger the fee share of every loss. Same 100 risk amount, same illustrative 0.05% on each leg:
| Stop | Plain notional | Loss at stop, plain size | Fee-aware notional | Fees as share of the loss |
|---|---|---|---|---|
| 0.5% | 20,000 | 119.95 | 16,673.61 | 16.6% |
| 1% | 10,000 | 109.95 | 9,095.04 | 9.1% |
| 2% | 5,000 | 104.95 | 4,764.17 | 4.7% |
| 5% | 2,000 | 101.95 | 1,961.75 | 1.9% |
At a 5% stop the adjustment is a rounding error. At 0.5% the unadjusted size loses nearly 20% more than planned. This is one concrete form of the argument in why tight stops can cost more, and over many trades it compounds into fee drag.
How to tell it worked
Before the trade: final size × (stop distance + per-unit costs) should equal the risk amount, after rounding down to the venue’s quantity step.
After the trade: compare planned and realised loss on every stopped-out trade. If realised losses run consistently above plan, your slippage allowance is too small, or an exit you assumed was maker is being filled as taker. That comparison only exists if you record both numbers — see what to record in a trading journal.
What usually goes wrong
1. Assuming the maker rate on the exit. A triggered stop becomes a market order and pays the taker rate. Using a maker entry is fine if that is what you actually do; using a maker exit for a stop-out understates the cost.
2. Charging the fee on margin instead of notional. At 10×, a fee of 0.05% of notional is 0.5% of the margin posted. Calculating it on margin understates it by the leverage factor.
3. Counting the round trip once. Entry and exit are both charged.
4. Subtracting fees from the risk amount as a percentage. “Fees are 0.1%, so risk 99.90 instead of 100” removes ten cents. The actual fee on this position is about 4.72. Fees are a percentage of notional, not of the risk amount.
5. Forgetting to round down again. The fee-aware size still has to be rounded down to the quantity step before it becomes an order.
FAQ
Should position size include trading fees?
Yes, if you want a stop-out to cost what you planned. Fees are charged on notional on both entry and exit, so a position sized from the stop distance alone loses the risk amount plus fees when stopped out. Adding the per-unit fees to the stop distance before dividing makes the total loss match the budget.
What fee rate should I assume on a stop-loss exit?
The taker rate. A stop that triggers becomes a market order that crosses the spread and removes liquidity, so it is charged as a taker regardless of how the entry was placed. Assuming the maker rate for a stop-out understates the cost of every losing trade.
How do I include slippage in position size?
Add an allowance for the expected slip, per unit, to the stop distance before dividing — for example 0.1% of the stop price if that is what your own fills suggest. The allowance should come from your recorded fills rather than a guess, because slippage varies by instrument, session and position size.
Does leverage change the fee I pay?
Not in currency. Fees are charged on the position’s notional value, which leverage does not change. What leverage changes is the fee relative to the margin you posted: at 10×, a 0.05% fee on notional is 0.5% of your margin, so fees consume margin faster at higher leverage.