ExecGuard › Tools › Slippage calculator
Free tool
Forex slippage calculator
Enter what you asked for and what you got. This works out the slippage in pips and in your account currency, with the sign handled correctly for buys and for sells, and it will take a whole batch of trades and tell you the mean, the median, the worst fill, and how often the market went your way rather than against you.
Nothing you type leaves your browser.
The calculation is plain JavaScript running on this page. There is no upload, no account, no server call carrying your figures. You can disconnect from the internet after this page loads and it will still work. Trade data is sensitive and there is no reason a calculator should ever need to see it.
The calculator
How the calculation works
There is no proprietary anything in here. It is three lines of arithmetic, and they are worth reading because the one that gets implemented wrongly most often is the second.
Slippage in pips or points
Take the difference between the price you were filled at and the price you asked for, and divide it by the pip or point size of the instrument. Dividing is what makes the number comparable between instruments: 0.00004 on EURUSD and 0.004 on USDJPY are both 0.4 pips, and neither is meaningful as a raw price difference.
The sign convention
This is the part that matters. A higher fill is not universally bad. It depends on which way the order went, and the rule that covers every case is about the order rather than the position: a buy order is hurt by a higher fill, and a sell order is hurt by a lower fill. Closing a long is a sell order, so it is hurt by a lower fill. Closing a short is a buy order, so it is hurt by a higher fill. You never need to know whether a trade was an entry or an exit, only which side the order was.
Worked examples, all four cases
These are on EURUSD at 1.00 lot with a pip worth $10.00, and every one of them can be checked without the formula. Buying 100,000 units at 1.10003 instead of 1.10000 costs 100,000 × 0.00003 = $3.00, which is exactly what row one reports.
| Order | Requested | Filled | Adverse | Cash | Reading |
|---|---|---|---|---|---|
| Buy | 1.10000 | 1.10003 | +0.30 pips | −$3.00 | Paid more than asked |
| Buy | 1.10000 | 1.09995 | −0.50 pips | +$5.00 | Paid less than asked |
| Sell | 1.10000 | 1.09996 | +0.40 pips | −$4.00 | Received less than asked |
| Sell | 1.10000 | 1.10002 | −0.20 pips | +$2.00 | Received more than asked |
What the batch summary reports
- Mean — the average adverse fill delta. Sensitive to a single large outlier, which is why it is not shown on its own.
- Median — the middle fill. Usually the more honest headline number, because slippage is heavy-tailed and one news-release fill can drag a mean a long way.
- Worst — the single most adverse fill in the batch, and best, the most favourable one. The gap between them is the shape of your tail.
- Share against, in favour, and exact — how the fills split three ways. On a fast, neutral fill process, against and in favour should be roughly balanced. A persistent imbalance across a large sample is the thing worth looking into.
- Net cash — the sum of the cash column, with favourable fills netted off against adverse ones. This is the number that answers "what did this actually cost me".
Assumptions this calculator makes
Stated plainly, because a calculator that hides its assumptions is worse than no calculator.
- Pip value is fixed and supplied by you. For pairs quoted against your account currency it genuinely is roughly constant. For a pair like USDJPY it moves with the exchange rate, and for a cross it moves with a third rate. The preset values are typical figures, not your broker's figures.
- One instrument per batch. Every line in the batch uses the instrument settings in panel 1. Pip statistics across mixed instruments are meaningless, so run one symbol at a time. Cash totals across instruments are legitimate; pip means and medians are not.
- One fill per line. If an order was filled across several price levels, the calculator treats whatever single filled price you supply as the fill. Volume-weight it yourself first if you want the real answer.
- Slippage only. Commission, swap, and the spread itself are separate costs and are not included. Slippage is measured against the price you requested, not against the mid.
- The requested price is the one you actually sent. This is the assumption most likely to be wrong in practice. On some MT5 servers the recorded open price of a market order is written with the execution price, in which case every trade shows exactly zero slippage. If your batch comes back all zeroes, that is what to suspect first — see where the requested price actually lives in MT5.
- No conversion. The account currency field is a label. If your pip value is in USD, the result is in USD.
What this calculator cannot tell you
It does the arithmetic on the trades you give it, and that is the whole of what it does. It cannot tell you whether a fill was reasonable given the conditions at that moment, because it does not know what the spread or the volatility was. It cannot tell you whether a pattern in your fills is a pattern or a coincidence, because that needs a much larger sample and a split by session, symbol and order type. And it cannot tell you anything at all about why a fill happened the way it did — a record of adverse fills shows what the market and the path in between charged you, which is a legitimate basis for a specific question to a broker's support desk, and is not a finding of misconduct.
The full guide to measuring slippage on MT5 covers the parts this tool cannot: how many fills you need before a number means anything, how to read a distribution rather than an average, and how to separate ordinary volatility slippage from something systematic.
Questions
Is slippage on a sell order calculated differently from a buy?
The sign flips. A buy order is hurt by a higher fill, because you paid more than you asked. A sell order is hurt by a lower fill, because you received less than you asked. The calculator multiplies the raw price difference by plus one for buys and minus one for sells, so a positive result always means the fill went against you regardless of direction.
Does this calculator upload my trades anywhere?
No. All arithmetic runs in your browser in JavaScript on this page. There is no upload, no account, no analytics call carrying your figures, and no server involved in the calculation. If you disconnect from the internet after the page has loaded, the calculator still works.
Why does the calculator show favourable slippage as well as adverse slippage?
Because favourable slippage is real, and a calculator that ignores it will overstate what execution costs you. Fills that land better than requested happen continuously, and on a fast, neutral fill process they should be close to as frequent as fills that land worse. The share of fills in your favour is one of the most informative numbers in the batch summary.
Doing this on a hundred trades is the easy part
Pasting a batch in here works once. It stops working when the question becomes "has this got worse since March", or "is it worse on gold than on EURUSD", or "is it worse at 15:30 than at 11:00" — because answering any of those needs the requested price recorded on every trade as it happens, and MT5 does not keep that for you. ExecGuard is a tracking Expert Advisor that records both halves of every trade at the moment of the trade, and keeps the raw rows. The EA will be published in full, so what it records will be inspectable rather than something you have to take on trust.
It is not finished, and the waitlist exists to decide what it should do next rather than to sell you anything. If you join, the useful thing to tell us is what you were trying to work out when you opened this calculator. That is the question we are actually trying to answer.