How to use the trading cost calculator
There are three tools. Cost per trade adds up everything you pay to buy a position and sell it again. Impact on returns shows what those costs do to a strategy. Slippage measured works out the slippage on a real fill so you can feed realistic numbers into the first tool.
For the cost per trade:
- Enter the number of shares and the share price.
- Choose how your broker charges commission: per share (often with a minimum per order) or a flat amount per trade. Either way it is charged twice.
- Enter the bid-ask spread in cents, from the quote at the time you would trade.
- Enter your average slippage per side in cents. If you do not know it, measure a few dozen fills with the third tool.
- Choose whether to include US regulatory fees on the sale.
For the impact on returns, enter the average gross return per trade from a backtest or your journal, the round-trip cost as a percentage of the position, and how many trades you make a year.
The formulas
Cost in basis points = Round-trip cost ÷ (N × P) × 10,000C is the commission per side (per-share rate × N, but not below the order minimum, or the flat fee), S the full bid-ask spread per share, s the slippage per share on each side, N the number of shares and P the share price.
The spread appears once, not twice. Measured from the midpoint, you pay half the spread when you buy at the ask and the other half when you sell at the bid, so a round trip costs the full spread on every share.
FINRA TAF = Shares sold × $0.000166, at most $8.30Charged on the sale only, so once per round trip. Brokers usually round these to the cent; the calculator does not.
Share of gross profit lost = Cost ÷ Gross return
Annual cost drag = Cost × Trades per yearAll as a percentage of the position. Slippage = (Fill − Expected) × Shares for a buy, (Expected − Fill) × Shares for a sell; a negative result is price improvement.
A worked example
You buy 500 shares at $40, a $20,000 position, and sell them later at the same price. Commission is $0.005 a share with a $1 minimum, the spread is 2 cents and you lose 1 cent a share to slippage on each fill.
Commissions come to $5.00, the spread costs $10.00, slippage another $10.00, and the regulatory fees on the sale add $0.50. The round trip costs $25.50, which is 12.7 bps of the position. The stock has to move $0.0510 a share in your favor before the trade breaks even.
The commission is the smallest part: spread and slippage together cost four times as much.
Where the money goes: commission, spread or slippage
Switching brokers changes only one line of the bill. For the same trade:
| Commission plan | Round-trip cost | Basis points |
|---|---|---|
| $0.005 a share, $1 minimum | $25.50 | 12.7 bps |
| $4.95 flat per trade | $30.40 | 15.2 bps |
| Zero commission | $20.50 | 10.2 bps |
Even the zero-commission version costs $20.50, because the spread and slippage are paid to the market, not to the broker. For an active trader, a broker that fills orders a cent better can be worth more than one that charges nothing.
Why small orders and cheap stocks cost more
Costs quoted in cents behave differently from costs quoted in percent:
| Trade | Round-trip cost | Basis points |
|---|---|---|
| 50 shares at $40 | $4.05 | 20.2 bps |
| 500 shares at $40 | $25.50 | 12.7 bps |
| 5,000 shares at $40 | $254.95 | 12.7 bps |
| 4,000 shares at $5 | $201.08 | 100.5 bps |
The 50-share order pays the $1 minimum on each side, which lifts its cost to 20.2 bps. Above that size, spread and slippage scale with the share count, so the cost in basis points stays roughly flat.
The last row is the same $20,000 in a $5 stock. A two-cent spread is 0.05% of a $40 share but 0.4% of a $5 share, so the round trip costs 100.5 bps. Low-priced stocks are expensive to trade even when every per-share cost is identical.
Commission impact on a trading strategy
A strategy’s edge is a small number, and costs come straight out of it. With an average gross return of 0.6% per trade and costs of 0.15%, each trade keeps 0.45%: costs take 25.0% of the gross profit. At 100 trades a year the costs add up to 15.0% of the capital traded.
Two things make this worse in practice:
- Thin edges. If the same strategy averaged only 0.2% gross, the same costs would take 75.0% of it, leaving 0.05% a trade. A small rise in spread or slippage would erase it.
- Higher frequency. At 250 trades a year the drag rises to 37.5%. Edges per trade usually shrink as frequency rises while costs per trade do not.
A useful habit is to run every backtest with costs at least as high as your measured average, and to check how much the result degrades if they double.
Measuring slippage properly
Slippage is the cost most traders guess at. To measure it, record the price at the moment you decided to trade (the quote, or the signal price for a systematic strategy) and compare it with the average fill price from the execution report.
The example buy order expected $40 and filled at $40.03: $15.00 of slippage on 500 shares, or 7.50 bps. For a sell, the sign flips: selling at $39.97 against an expected $40 also costs $15.00.
Judge slippage on the average of many fills, split by entries and exits and by order type. Stop and market orders in fast markets slip the most; limit orders slip less but sometimes do not fill, and missed trades are a cost no fill report shows.
What this calculator does not include
- Market impact. Large orders relative to a stock’s trading volume push the price, and that cost grows faster than the order size. Use the market impact calculator for big orders.
- Short-sale costs. Borrow fees and dividends owed while short are not included.
- Margin interest on borrowed money.
- Exchange and clearing fees that some brokers pass through separately. Add them to the commission if yours does.
- Other markets. Options, futures and forex have different fee structures.
The regulatory fees are US rates that change over time; the SEC resets its fee at least once a year.