A bid-ask spread is the amount by which the ask price surpasses the bid price for an asset in the market.
Essentially a spread is the difference between the ask price and the bid price. In other words, it is the cost of trading. For instance, if the Euro to US dollar is trading with an ask price of 1.12020 and a bid price of 1.12000, then the spread will be the ask minus the bid price, in this scenario, 0.0002. As a result the spread of 0.0002 equals one pip.
Spreads are calculated in the same way for yen-based currencies like USDJPY.
Equally if the yen to the US dollar is trading with an ask price of 121.72 and a bid price of 121.70, then the spread will be 0.02 (121.72 – 121.70). This equals 2 pips.