The bid-ask spread is the difference between the bid price for a security and its ask price (or offer). It represents the difference between the highest price a buyer is willing to pay (bid) for a security and the lowest price a seller is willing to accept.
Bid-Ask Spread = Ask Price – Bid Price
For example, if the bid price of a stock is $100.10 and the ask price is 100.15, then the bid-ask spread is $100.15 - $100.10, which is $0.05 or 5 cents:
Bid-Ask Spread = $100.15 - $100.10 = $0.05
The term bid-ask spread refers to a two-way price benchmark that represents the best price at which a trading instrument can be bought and sold at a given time. A trade transaction or exchange of goods occurs when a seller and a buyer agree on a price for an asset. The proposed price gap is a valid indicator for the liquidity of an asset.
In general, a narrower or tighter spread will indicate a higher liquidity for the trading instrument within its market. Therefore, a bid-ask spread of $100.15 - $100.10 would indicate a higher liquidity than a bid-ask spread of $100.15 - $100.05.
Traders will be competing against one another to get the best price possible, which will naturally cause the bid-offer spread to tighten as buyers increase their bid prices to attract sellers and sellers decrease their ask prices to attract buyers until a trade is conducted. Bid-ask spreads typically widen at time periods when there is more volatility in the market, which also results in less liquidity due to a lack in trading confidence.
With the bid-ask spread of $100.15 - $100.05, there is a price gap of $0.05. In a securities market, a market maker, which is considered the counterparty of the trade and is typically a brokerage firm, would collect the $0.05 as a profit. A price taker is another name for a trader, and for them the $0.05 could be considered a transaction cost for the trade. For example, a market maker would buy at the bid price and sell at the ask price, where the price taker will buy at the ask price and sell at the bid price.
Please refer to the following video that describes the relation between bid-ask spread and the underlying liquidity and volatility in details: