The formula, worked once
Take the defaults: a 45% win rate, winners averaging 1.8 R, losers averaging 1 R, costs of 0.05 R per trade. Expectancy = 0.45 × 1.8 − 0.55 × 1 − 0.05 = 0.81 − 0.55 − 0.05 = +0.21 R. Each trade contributes about a fifth of a risk unit on average — risk $100 a trade and the process earns roughly $21 per trade over a large sample. The break-even check runs the other way: at 1.8-to-1 payoffs with those costs, you need (1 + 0.05) ÷ (1.8 + 1) = 37.5% wins just to stop bleeding. The 7.5-point gap between 45% and 37.5% is the entire edge.
Costs are a subtraction most calculators skip
Spread, commission and slippage arrive on every trade, win or lose, which makes them a straight subtraction from expectancy — and the most commonly deleted term in the formula. At 0.05 R per trade, costs consume 0.05 R of edge per trade; a strategy showing +0.04 R before costs is a losing strategy after them. We wrote a full teardown of this arithmetic in the spread piece; the input exists here so the number you compute is the one your account experiences, not the one the backtest brags about.
A positive number is a hypothesis, not a property
All four inputs are estimates from your own history, and small samples estimate badly: at 50 trades, a true 45% win rate routinely shows up anywhere from the mid-30s to the mid-50s, and one outlier winner distorts the average win for months. Treat the output as the hypothesis your next hundred trades keep testing — measured in R, in a journal that computes it from real fills. That's the job TradeLens automates from your MT4/MT5 history; this page does the arithmetic on whatever numbers you bring. Nothing you type leaves your browser.