What the martingale calculator shows
A martingale increases the position after every loss, so that one win recovers everything lost before it plus a small profit. It feels safe because most series end with that small profit. The calculator shows the other side: the size of the last lot, the loss when a whole series goes wrong, and how likely that is over the number of series you plan to run.
It covers the two forms you'll find in Expert Advisors:
- Classic: one trade at a time. After a loss, the next trade is the multiplier times bigger. A win ends the series.
- Grid (averaging down): positions stay open. Each time price moves a set number of pips against the basket, a bigger position is added, and the whole basket closes at a take-profit beyond its average entry price.
How to use it
- Choose the type, then enter the starting lot, the multiplier and the maximum number of trades or positions.
- Enter the lot step (0.01 at most brokers), the value of one pip for one lot and your balance.
- Classic: enter the stop-loss and take-profit of each trade, your win rate for a single trade and how many series you expect to run, for example in a year.
- Grid: enter the grid step and the basket take-profit.
The table lists every level: the lot, the money at risk, the share of your balance and what a win (or a bounce) brings at that point.
The formulas
lot at level k = starting lot × multiplier^(k − 1) rounded to the lot step
classic, after k losses
total lost = Σ lot × stop × pip value
one series loses all = (1 − win rate)^levels
at least one in N = 1 − (1 − (1 − win rate)^levels)^N
grid, with k positions open
open loss = Σ lot × (distance now − entry distance) × pip value
bounce to take-profit = distance now − average entry distance + take-profit
Worked example
Classic. Start at 0.01 lot on EUR/USD ($10 per pip per lot), double after each loss, at most 8 trades, 20-pip stop and target, $10,000 balance:
- Lots: 0.01, 0.02, 0.04, 0.08, 0.16, 0.32, 0.64 and 1.28.
- Every winning series nets $2: the first trade's target.
- Eight losses in a row cost $510, 5.1% of the balance.
- At a 50% win rate, a series loses all 8 trades 0.39% of the time. Over 100 series, the chance of at least one full loss is 32.4%.
- Expected result per series: $0.00, exactly the same as a single flat trade with no edge. Doubling changes the shape of the results, not their average.
Grid. Start at 0.01 lot, multiply by 1.5, a new position every 20 pips against, at most 8 positions, take-profit 10 pips beyond the average entry. After rounding, the lots are 0.01, 0.02, 0.02, 0.03, 0.05, 0.08, 0.11 and 0.17. When the 8th opens, 140 pips against, the basket holds 0.49 lots with an open loss of $166, and price must come back 43.9 pips to close it at the take-profit for $49. Use 0.10 lot and a multiplier of 2 on a $5,000 account instead, and a move of about 140 pips against you wipes out the balance.
Why the average doesn't change
If one trade has no edge, its expected result is zero, and a series made of such trades is still zero: the many small wins are paid for by rare, large losses. With a real edge, the martingale keeps it but puts more of the account at risk to collect it. The risk of ruin calculator and the Monte Carlo simulator show the same trade-off for fixed-fraction sizing.
What the calculator leaves out
- Margin. Brokers close positions at the stop-out level, usually well before the balance reaches zero. Check the margin of the last levels with the margin calculator.
- Costs. Spread, commission and swap grow with the lot size and with the time a basket stays open.
- Gaps and news. A weekend gap can skip grid levels or stops entirely.
- Win rate after losses. In trending markets losses cluster, so long streaks come more often than the independent-trade formula suggests.
For the full picture on MetaTrader 5, with an EA that caps the levels and stops at an equity floor, read martingale EAs on MT5: the math and the guardrails.