The expectancy formula, with flat trades included
Let p be winning trades divided by all closed trades, z the fraction with zero P&L before the extra costs entered, W the average winning amount, L the positive average losing amount, and C the average extra cost across all closed trades.
Loss probability q = 1 − p − z
Gross expectancy = p × W − q × L
Net expectancy = p × W − q × L − C
Break-even p = ((1 − z) × L + C) / (W + L)
These gross/net labels assume pre-cost inputs. With net trade results, the first formula already gives net expectancy: leave extra cost at zero unless estimating a missing cost. Without flat trades, z = 0. With flats, loss rate is not simply 100% minus win rate.
The probability-weighted formula follows CME Group's mathematical expectation lesson. Solving net expectancy = 0 gives the break-even formula above; it is an algebraic threshold, not a required trading target.
A 100-trade example you can reconcile
Assume 40 winners average $200, 60 losers average $100, and no flats. Commission is $2 on entry plus $2 on exit; spread and slippage add $4 per completed trade. Average round-trip cost is $8. These are hypothetical inputs, not observed returns.
| Calculation | Result |
|---|---|
| Winning P&L | 40 × $200 = $8,000 |
| Losing P&L | 60 × −$100 = −$6,000 |
| Gross expectancy | ($8,000 − $6,000) / 100 = $20 |
| Total extra costs | 100 × $8 = $800 |
| Net expectancy | ($2,000 − $800) / 100 = $12 |
| Break-even win rate | ($100 + $8) / ($200 + $100) = 36% |
Without costs the threshold is 33.33%. At $20 per trade in costs, this sample breaks even; at $25, it averages −$5. Its gross profit factor is 8,000 / 6,000 = 1.33. The $12 net expectancy answers a different question: the amount left per trade.
If 10 of the 60 losers instead close flat, hold W, L and C fixed: gross expectancy becomes 0.40 × $200 − 0.50 × $100 = $30, and net becomes $22. Those 10 flats still count in the denominator and still incur the assumed average cost.
R multiples and changing position sizes
Define R from each trade's initial planned monetary risk. With fixed $100 initial risk, the worked example has a 2R average winner, 1R average loser and 0.08R cost. Gross expectancy is 0.20R and net expectancy is 0.12R. Average loss is only equal to 1R if the recorded exits actually average that amount.
Variable sizing changes the comparison. A +$100 trade risking $100 is +1R; a −$200 trade risking $400 is −0.5R. Their mean is +0.25R, while dollar expectancy is −$50. Dividing −$50 by the $250 average risk gives −0.20, which is not mean R. Normalize each trade first; never mix currency and R inputs.
A positive mean still has sample uncertainty
The inputs above omit sample size and the spread of individual results, so the calculator cannot estimate confidence bounds. Two samples can share the same averages but have different tail losses. Check expectancy with and without the largest winner, report both, and investigate the difference instead of quietly dropping outliers.
For approximately independent observations where a t interval is appropriate, a 95% mean interval is x̄ ± t × s / √n. Using a hypothetical n = 100, mean net P&L of $12, standard deviation s = $150, and t = 1.984 gives $12 ± $29.76, or −$17.76 to $41.76. The interval includes zero. This is an illustrative uncertainty calculation, not an output inferred from the inputs above. See NIST's confidence limits for the mean.
Overlapping positions, clustered losses, heavy tails and selecting the best backtest can invalidate a naive interval. Separate training and untouched test periods, keep strategy rules fixed, and examine drawdown and losing sequences alongside expectancy. Historical results do not guarantee future returns. This tool provides calculations for education, not investment advice.
Reconcile TradingView results before comparing
- Choose one symbol, timeframe, date range, currency and definition of a closed trade. Keep simulated and actual fills separate.
- Review commission and slippage settings. TradingView models commission and slippage separately; include only missing costs in this calculator.
- Count winners, losers and flats against the same total. Divide total net P&L by all closed trades as the reference mean.
- Check partial exits and position sizing before comparing dollar or R results. Exclude open positions from a closed-trade mean.
TradingView documents its cost simulation settings and defines Average PnL using completed trades. Missing costs and inconsistent trade grouping are reasons to investigate a mismatch, not evidence that either figure predicts live performance.
Sources checked October 17, 2026. Formula extensions and numerical examples are derived on this page.