With regard to futures contracts as well as other financial instruments, slippage is the difference between where the computer signaled the entry and exit for a trade and where actual clients, with actual money, entered and exited the market using the computer’s signals. Market-impacted, liquidity, and frictional costs may also contribute.
Using initial mid price
Nassim Nicholas Taleb (1997) defines slippage as the difference between the average execution price and the initial midpoint of the bid and the offer for a given quantity to be executed.
Using initial execution price
Knight and Satchell mention a flow trader needs to consider the effect of executing a large order on the market and to adjust the bid-ask spread accordingly. They calculate the liquidity cost as the difference of the execution price and the initial execution price.
Victor Niederhoffer says: "In statistical terms, I figure I have traded about 2 million contracts, with an average profit of $70 per contract (after slippage of perhaps $20). This average is approximately 700 standard deviations away from randomness".
The associated image depicts the Level II (Market Depth) quotes of the SPY ETF (Exchange-Traded Fund) at a given instant in time.
The left hand side of the image contains the market depth for the current BID prices and the right hand side of the image contains the market depth for the current ASK prices. Each side of the image contains three columns:
MM Name: This is the Market Maker name column
Price: This is the "market depth" price.
Size: This is the number of shares at this price level (represented in hundreds). So, 2 actually means 200 shares.
The top left of the image represents the current BID price ($151.07) and the top right of the image represents the current ASK price ($151.08). At the $151.07 bid price point, there are 300 shares available (200 by the ARCA Market Maker and 100 by the DRCTEDGE). At the $151.08 ask price point, there are 3900 shares available (2800 by the ARCA Market Maker and 1100 by the BATS Market Maker). This is typically represented in quote form as: $151.07 X 300 by $151.08 X 3900).
To properly understand slippage, let's use the following example: Say, you (as a trader) wanted to purchase 20,000 shares of SPY right now. The problem here is that the current ASK price of $151.08 only contains 3900 shares being offered for sale, but you want to purchase 20,000 shares. If you need to purchase those shares now, then you must use a market order and you will incur slippage by doing so. Using a market order to purchase your 20,000 shares would yield the following executions (assuming no hidden orders in the market depth):
Buy 2800 @ $151.08
Buy 1100 @ $151.08
Buy 3800 @ $151.09
Buy 900 @ $151.10
Buy 3700 @ $151.11
Buy 1200 @ $151.12
Buy 3700 @ $151.13
Buy 200 @ $151.14
Buy 1000 @ $151.15
Buy 400 @ $151.18
Buy 100 @ $151.22
Buy 600 @ $151.24
Buy 500 @ $151.25 (only 500 shares out of the 2000 being offered at this print point are executed, because this will represent our entire 20,000 share order).
The average purchase price of the above execution is: $151.11585. The difference between the current ASK price ($151.08) and your average purchase price ($151.11585) represents your slippage. In this case, the cost of slippage would be calculated as follows: 20,000 X $151.08 - 20,000 X $151.11585 = $-717.00
Slippage phenomenon in retail forex trading
It's been reported that some traders trading consistently in profit were becoming to suffer from excessive slippage, allegedly generated by a broker. Unfortunately, the absence of single clearing centre along with lack of transparency in execution of retail brokerage firms leave no chances for a trader to uncloak that techniques. 
Reverse slippage as described by Taleb occurs when the purchase of a large position is done at increasing prices, so that the mark to market value of the position increases. The danger occurs when the trader attempts to exit his position. If the trader manages to create a squeeze large enough then this phenomenon can be profitable.
- Taleb, Nassim Nicolas (1997). Dynamic Hedging: Managing Vanilla and Exotic Options. New York: John Wiley & Sons. ISBN 978-0-471-15280-4.
- John L. Knight, Stephen Satchell (2003). Forecasting Volatility in the Financial Markets. Butterworth-Heinemann. ISBN 978-0-7506-5515-6.
- Niederhoffer, Victor (1998). The Education of a Speculator. New York: John Wiley & Sons. p. 156. ISBN 0-471-24948-3.